Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the Windows build. #5596

Merged
merged 3 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions build_win.bat
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions csrc/includes/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#define TILE (128 * 1024 * 1024)
#if defined(__AVX512__) or defined(__AVX256__)
#include <immintrin.h>

template <typename T>
inline T readAs(const void* src)
Expand Down
2 changes: 1 addition & 1 deletion csrc/quantization/pt_binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ std::vector<at::Tensor> quantized_reduction(at::Tensor& input_vals,
.device(at::kCUDA)
.requires_grad(false);

std::vector<long int> sz(input_vals.sizes().begin(), input_vals.sizes().end());
std::vector<int64_t> 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);
Expand Down
18 changes: 4 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"""

import os
import shutil
import sys
import subprocess
from setuptools import setup, find_packages
Expand Down Expand Up @@ -207,21 +208,10 @@ def op_enabled(op_name):
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.
Expand Down
Loading