DeepSpeed
DeepSpeed copied to clipboard
Windows 11 build error, cl.exe exited with error code 2
Describe the bug
csrc/transformer/inference/csrc/pt_binding.cpp(1977): note: voir la référence à l'instanciation de la fonction modèle 'std::vector<at::Tensor,std::allocatorat::Tensor> ds_rms_mlp_gemm
To Reproduce Steps to reproduce the behavior:
- set DS_BUILD_AIO=0
- set DS_BUILD_SPARSE_ATTN=0
- python setup.py bdist_wheel
Expected behavior Install deepspeed
ds_report output Not recognize
**System info
- OS: windows11
- 1x rtx3070 mobile
- Python 3.10.11
- Cuda compilation tools, release 11.8, V11.8.89
Hi @anto18671 -
Can you please share more of the error log output? I see cl.exe failed with exit code 2.
Also can you confirm that you're running in an administrator command window? You can do that by running the build_win.bat script at the root of the repo?
csrc/transformer/inference/includes\inference_context.h(169): note: utilisez '%zu' dans la chaîne de format
csrc/transformer/inference/includes\inference_context.h(169): warning C4477: 'printf' : la chaîne de format '%lu' nécessite un argument de type 'unsigned long', mais l'argument variadique 2 est de type 'size_t'
csrc/transformer/inference/includes\inference_context.h(169): note: utilisez '%zu' dans la chaîne de format
csrc/transformer/inference/includes\inference_context.h(169): warning C4477: 'printf' : la chaîne de format '%lu' nécessite un argument de type 'unsigned long', mais l'argument variadique 3 est de type 'size_t'
csrc/transformer/inference/includes\inference_context.h(169): note: utilisez '%zu' dans la chaîne de format
csrc/transformer/inference/csrc/pt_binding.cpp(536): error C2398: Élément « 1 » : la conversion de « size_t » en « _Ty » nécessite une conversion restrictive
with
[
_Ty=int64_t
]
csrc/transformer/inference/csrc/pt_binding.cpp(1977): note: voir la référence à l'instanciation de la fonction modèle 'std::vector<at::Tensor,std::allocatorat::Tensor> ds_softmax_context
I tried running the build_win.bat in admin, but i got the same error.
Thanks, @anto18671 - since exit code 2 is that the system cannot find the path to CL.exe, do you know if you installed python first or Visual Studio? Could you try re-installing python after getting the Visual Studio runtime, since that way the path should be able to be found here?
Also anecdotally, I've seen that this tends to work on Windows with python 3.8.10 but not always with python 3.10, if you could try that as well and if that works we can debug more into it.
I confirmed on Windows 11 that python 3.11 fails with this error but 3.8 works fine for me, so that is a solution we can use.
This seems to be a similar issue, also recommending either Python 3.8 or an additional set of steps to take to fix the libs: https://stackoverflow.com/questions/71242919/pip-install-results-in-this-error-cl-exe-failed-with-exit-code-2
Hi @anto18671 - I'm going to close this for now since I can't do any other confirmation on this, though if you do have time, please check the above solution and let me know if that fixes it. If so I can update our installation docs for Windows.