Skip to content

Commit

Permalink
Merge branch 'master' into mrwyattii/pydantic-2-support
Browse files Browse the repository at this point in the history
  • Loading branch information
adk9 authored Jun 3, 2024
2 parents a04de7f + e7dd28a commit 08c16c1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 27 deletions.
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
Binary file not shown.
2 changes: 1 addition & 1 deletion op_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_default_compute_capabilities():
cuda_minor_mismatch_ok = {
10: ["10.0", "10.1", "10.2"],
11: ["11.0", "11.1", "11.2", "11.3", "11.4", "11.5", "11.6", "11.7", "11.8"],
12: ["12.0", "12.1", "12.2", "12.3"],
12: ["12.0", "12.1", "12.2", "12.3", "12.4", "12.5"],
}


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

0 comments on commit 08c16c1

Please sign in to comment.