DeepSpeed
DeepSpeed copied to clipboard
Run build_win.bat got error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Describe the bug Run build_win.bat got error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe' failed with exit code 2
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
ds_report output
Please run ds_report to give us details about your setup.
Screenshots
csrc/transformer/inference/csrc/pt_binding.cpp(1570): error C2398: 元素“3”: 从“const size_t”转换为“_Ty”需要收缩转换
with
[
_Ty=int64_t
]
csrc/transformer/inference/csrc/pt_binding.cpp(1977): note: 查看对正在编译的函数 模板 实例化“std::vector<at::Tensor,std::allocatorat::Tensor> ds_rms_mlp_gemm
System info (please complete the following information):
- OS: win11
- RTX 3060
- Interconnects (if applicable) [e.g., two machines connected with 100 Gbps IB]
- Python 3.10
- Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.35.32215
Launcher context
Are you launching your experiment with the deepspeed launcher, MPI, or something else?
Docker context Are you using a specific docker image that you can share?
Additional context Add any other context about the problem here.
Hi @micronetboy - this looks to be the same issue as #3447, could you try the same thing I suggested there, re-installing python after you've installed the VS libraries. that way we can try to find if they are in the path?
Also if you could try with python 3.8.10, I've seen anecdotally that has worked, though not sure why.
This StackOverflow post seems to be a similar issue albeit with another package, I'd try those steps as well: https://stackoverflow.com/questions/71242919/pip-install-results-in-this-error-cl-exe-failed-with-exit-code-2
Going to close this issue and move discussion on this to 3447
1 Install pytorch, such as pytorch 1.8 + cuda 11.1 2 Install visual cpp build tools, such as VS2019/2022 C++ x64/x86 build tools 3 Launch cmd console with Administrator privilege for creating required symlink folders 4 download deepspeed 0.9.4 5 Modify csrc/transformer/inference/csrc/pt_binding.cpp:
536:hidden_dim * (unsigned)InferenceContext
537:k * (int)InferenceContext
545:hidden_dim * (unsigned)InferenceContext
546:k * (int)InferenceContext
1570: input.size(1), (int)mlp_1_out_neurons
6 run build_win.bat 7 cd dist 8 pip install xxx.whl
This problem bothered me for a while, I'm so happy to finally be solved, thank you