diff --git a/bin/deepspeed.bat b/bin/deepspeed.bat new file mode 100644 index 000000000000..8e488bde380c --- /dev/null +++ b/bin/deepspeed.bat @@ -0,0 +1,2 @@ +@echo off +python "%~dp0\ds" %* diff --git a/bin/ds_report.bat b/bin/ds_report.bat new file mode 100644 index 000000000000..78c7225f147c --- /dev/null +++ b/bin/ds_report.bat @@ -0,0 +1,2 @@ +@echo off +python "%~dp0\ds_report" %* diff --git a/build_win.bat b/build_win.bat index 6e67cb8c2aa2..9c326aae552d 100644 --- a/build_win.bat +++ b/build_win.bat @@ -1,5 +1,6 @@ @echo off +set CUDA_HOME=%CUDA_PATH% set DISTUTILS_USE_SDK=1 set DS_BUILD_AIO=0 diff --git a/deepspeed/env_report.py b/deepspeed/env_report.py index 85a2f9b2b6c0..37e33b1e8739 100644 --- a/deepspeed/env_report.py +++ b/deepspeed/env_report.py @@ -110,7 +110,7 @@ def installed_cann_version(): def get_shm_size(): try: shm_stats = os.statvfs('/dev/shm') - except (OSError, FileNotFoundError, ValueError): + except (OSError, FileNotFoundError, ValueError, AttributeError): return "UNKNOWN", None shm_size = shm_stats.f_frsize * shm_stats.f_blocks diff --git a/setup.py b/setup.py index f39eab41938a..183d42907e82 100755 --- a/setup.py +++ b/setup.py @@ -285,6 +285,14 @@ def op_enabled(op_name): with open(os.path.join(thisdir, 'README.md'), encoding='utf-8') as fin: readme_text = fin.read() +if sys.platform == "win32": + scripts = ['bin/deepspeed.bat', 'bin/ds', 'bin/ds_report.bat', 'bin/ds_report'] +else: + scripts = [ + 'bin/deepspeed', 'bin/deepspeed.pt', 'bin/ds', 'bin/ds_ssh', 'bin/ds_report', 'bin/ds_bench', 'bin/dsr', + 'bin/ds_elastic' + ] + start_time = time.time() setup(name='deepspeed', @@ -303,10 +311,7 @@ def op_enabled(op_name): extras_require=extras_require, packages=find_packages(include=['deepspeed', 'deepspeed.*']), include_package_data=True, - scripts=[ - 'bin/deepspeed', 'bin/deepspeed.pt', 'bin/ds', 'bin/ds_ssh', 'bin/ds_report', 'bin/ds_bench', 'bin/dsr', - 'bin/ds_elastic' - ], + scripts=scripts, classifiers=[ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9',