Closed Moemu closed 1 week ago
try to replace
shutil.copytree('.\\csrc', '.\\deepspeed\\ops')
shutil.copytree('.\\op_builder', '.\\deepspeed\\ops')
with
shutil.copytree('.\\csrc', '.\\deepspeed\\ops\\csrc')
shutil.copytree('.\\op_builder', '.\\deepspeed\\ops\\op_builder')
But I'm not sure if this will work well
Thanks you. At the same time, I deleted files (.\\deepspeed\\accelerator
, .\\deepspeed\\ops\\csrc
and .\\deepspeed\\ops\\op_builder
) and it could work.
But I met a new error :(
creating build\lib.win-amd64-cpython-311\deepspeed\inference\v2\ragged\csrc
copying deepspeed\inference\v2\ragged\csrc\fast_host_buffer.cu -> build\lib.win-amd64-cpython-311\deepspeed\inference\v2\ragged\csrc
copying deepspeed\inference\v2\ragged\csrc\ragged_ops.cpp -> build\lib.win-amd64-cpython-311\deepspeed\inference\v2\ragged\csrc
copying deepspeed\ops\sparse_attention\trsrc\matmul.tr -> build\lib.win-amd64-cpython-311\deepspeed\ops\sparse_attention\trsrc
copying deepspeed\ops\sparse_attention\trsrc\softmax_bwd.tr -> build\lib.win-amd64-cpython-311\deepspeed\ops\sparse_attention\trsrc
copying deepspeed\ops\sparse_attention\trsrc\softmax_fwd.tr -> build\lib.win-amd64-cpython-311\deepspeed\ops\sparse_attention\trsrc
running build_ext
C:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\utils\cpp_extension.py:418: UserWarning: The detected CUDA version (12.3) has a minor version mismatch with the version that was used to compile PyTorch (12.1). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'deepspeed.ops.adam.fused_adam_op' extension
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\csrc
creating build\temp.win-amd64-cpython-311\Release\csrc\adam
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Muice-Vtuber\Neuro-master\DeepSpeed-master\csrc\includes -IC:\Muice-Vtuber\Neuro-master\DeepSpeed-master\csrc\adam -IC:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\include -IC:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\include\TH -IC:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -IC:\Users\Moemu\.conda\envs\Neuro\include -IC:\Users\Moemu\.conda\envs\Neuro\Include /EHsc /Tpcsrc/adam/fused_adam_frontend.cpp /Fobuild\temp.win-amd64-cpython-311\Release\csrc/adam/fused_adam_frontend.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -O2 -DVERSION_GE_1_1 -DVERSION_GE_1_3 -DVERSION_GE_1_5 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=fused_adam_op -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
fused_adam_frontend.cpp
C:\Users\Moemu\.conda\envs\Neuro\Lib\site-packages\torch\include\c10/core/DeviceType.h(10): fatal error C1083: 无法打开 包括文件: “cstddef”: No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\Hostx64\\x64\\cl.exe' failed with exit code 2
@Moemu, it looks like MSVC can't find cstddef
, which is a standard C++ include file. Please make sure to run build_win.bat
from a "Developer Command Prompt for VS 2022" which sets the correct environment variables for the compiler. In addition, you can build the costineseanu/windows_inference_build
branch which has more fixes for the Windows build (including the one about not being able to copy files).
Thank you. Change the code in setup.py
and deletes the 3 files could work. I find this change commit in https://github.com/microsoft/DeepSpeed/pull/5596 and shutil.copytree
cannot cover the exists file.
Description:
I encountered some issues while building DeepSpeed on Windows systems. The generation process failed, it indicates that the folder already exists.
Environment:
Steps to Reproduce:
Error Log: