diff --git a/build_win.bat b/build_win.bat index af5c5103f..18ff17347 100644 --- a/build_win.bat +++ b/build_win.bat @@ -1,22 +1,15 @@ @echo off +set DISTUTILS_USE_SDK=1 + set DS_BUILD_AIO=0 set DS_BUILD_CUTLASS_OPS=0 set DS_BUILD_EVOFORMER_ATTN=0 set DS_BUILD_FP_QUANTIZER=0 +set DS_BUILD_INFERENCE_CORE_OPS=0 set DS_BUILD_RAGGED_DEVICE_OPS=0 set DS_BUILD_SPARSE_ATTN=0 - -echo Administrative permissions required. Detecting permissions... - -net session >nul 2>&1 -if %errorLevel% == 0 ( - echo Success: Administrative permissions confirmed. -) else ( - echo Failure: Current permissions inadequate. - goto end -) - +set DS_BUILD_TRANSFORMER_INFERENCE=0 python setup.py bdist_wheel diff --git a/csrc/includes/simd.h b/csrc/includes/simd.h index 73e41216a..f5bfb45dd 100644 --- a/csrc/includes/simd.h +++ b/csrc/includes/simd.h @@ -12,6 +12,7 @@ #define TILE (128 * 1024 * 1024) #if defined(__AVX512__) or defined(__AVX256__) +#include template inline T readAs(const void* src) diff --git a/csrc/quantization/pt_binding.cpp b/csrc/quantization/pt_binding.cpp index a42108970..e74c54169 100644 --- a/csrc/quantization/pt_binding.cpp +++ b/csrc/quantization/pt_binding.cpp @@ -241,7 +241,7 @@ std::vector quantized_reduction(at::Tensor& input_vals, .device(at::kCUDA) .requires_grad(false); - std::vector sz(input_vals.sizes().begin(), input_vals.sizes().end()); + std::vector sz(input_vals.sizes().begin(), input_vals.sizes().end()); sz[sz.size() - 1] = sz.back() / devices_per_node; // num of GPU per nodes const int elems_per_in_tensor = at::numel(input_vals) / devices_per_node; auto output = torch::empty(sz, output_options); diff --git a/setup.py b/setup.py index 839941b98..408b300a7 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ The wheel will be located at: dist/*.whl """ import os +import shutil import sys import subprocess from setuptools import setup, find_packages @@ -207,21 +208,10 @@ else: git_hash = "unknown" git_branch = "unknown" - -def create_dir_symlink(src, dest): - if not os.path.islink(dest): - if os.path.exists(dest): - os.remove(dest) - assert not os.path.exists(dest) - os.symlink(src, dest) - - if sys.platform == "win32": - # This creates a symbolic links on Windows. - # It needs Administrator privilege to create symlinks on Windows. - create_dir_symlink('.\\deepspeed\\ops\\csrc', '..\\..\\csrc') - create_dir_symlink('.\\deepspeed\\ops\\op_builder', '..\\..\\op_builder') - create_dir_symlink('.\\deepspeed\\accelerator', '..\\accelerator') + shutil.copytree('.\\csrc', '.\\deepspeed\\ops') + shutil.copytree('.\\op_builder', '.\\deepspeed\\ops') + shutil.copytree('.\\accelerator', '.\\deepspeed\\accelerator') egg_info.manifest_maker.template = 'MANIFEST_win.in' # Parse the DeepSpeed version string from version.txt.