Skip to content

install issue in Windows 10 #435

Closed
Closed

Description

@rvalenciaaz

I'm experiencing almost the same issue in Windows 10

CUDA 10.1
Pytorch 16 in conda environment
gcc
g++
Visual Studio 2019 plus C++ development tools

(pytorch) C:\Users\rgval>nvidia-smi
Thu Sep 24 11:31:36 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 431.40 Driver Version: 431.40 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 166... WDDM | 00000000:01:00.0 Off | N/A |
| N/A 50C P8 3W / N/A | 153MiB / 6144MiB | 0% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

(pytorch) C:\Users\rgval>python -c "import torch; print(torch.version.cuda)"
10.1

(pytorch) C:\Users\rgval>gcc --version
gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(pytorch) C:\Users\rgval>g++ --version
g++ (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(base) C:\Users\rgval>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

bash install.sh
......

C:/Users/rgval/miniconda3/envs/pytorch/lib/site-packages/torch/include\c10/util/ThreadLocalDebugInfo.h(12): warning: modifier is ignored on an enum specifier

csrc/lamb/fused_lamb_cuda_kernel.cu(284): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<double, true>, GRAD_T=double]"
(370): here

csrc/lamb/fused_lamb_cuda_kernel.cu(290): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<double, true>, GRAD_T=double]"
(370): here

csrc/lamb/fused_lamb_cuda_kernel.cu(284): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<float, true>, GRAD_T=float]"
(370): here

csrc/lamb/fused_lamb_cuda_kernel.cu(290): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<float, true>, GRAD_T=float]"
(370): here

csrc/lamb/fused_lamb_cuda_kernel.cu(284): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<c10::Half, true>, GRAD_T=c10::Half]"
(370): here

csrc/lamb/fused_lamb_cuda_kernel.cu(290): error: expected a ")"
detected during instantiation of "void lamb_cuda_kernel_part3(T *, GRAD_T *, T *, T *, const GRAD_T *, float, float, float, float, float, float, float, size_t, adamMode_t, float, T *, T *, T *) [with T=at::acc_type<c10::Half, true>, GRAD_T=c10::Half]"
(370): here

6 errors detected in the compilation of "C:/Users/rgval/AppData/Local/Temp/tmpxft_00002c9c_00000000-10_fused_lamb_cuda_kernel.cpp1.ii".
error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin\nvcc.exe' failed with exit status 1
Error on line 195
Fail to install deepspeed

Cheers!

Originally posted by @rvalenciaaz in #397 (comment)

Activity

  1. changed the title [-]I'm experiencing almost the same issue in Windows 10[/-] [+]install issue in Windows 10[/+] on Sep 24, 2020
  2. tjruwase commented on Sep 24, 2020

    @tjruwase
    Contributor

    @rvalenciaaz Thanks for opening as a new issue.

    This looks like a g++ compiler issue in Windows, which we are not seeing in Linux which is our normal development environment. Can you help test how many of the kernels have compiler issues by disabling the kernels one by one. So for example, can you disable the LAMB kernel which is causing the error you are seeing now by running the following:
    DS_LAMB_BUILD=0 install.sh ...

  3. Teravus commented on Nov 10, 2020

    @Teravus

    I think what you are dealing with is... things that are warnings in g++ are errors in windows.

    To get it to compile in windows, I had to;

    • comment out the error() function in the SharedMemory struct. That technique, default (unspecialized) fallback for the template, doesn't work on windows.

    • I also had to change instances of the word 'and' to &&.

    There are still issues building.. but that gets us past the lamb kernel.
    cl : Command line error D8021 : invalid numeric argument '/Wno-reorder'
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Icsrc/includes -IC:\ProgramData\Anaconda3\envs\deepspeed\lib\site-packages\torch\include -IC:\ProgramData\Anaconda3\envs\deepspeed\lib\site-packages\torch\include\torch\csrc\api\include -IC:\ProgramData\Anaconda3\envs\deepspeed\lib\site-packages\torch\include\TH -IC:\ProgramData\Anaconda3\envs\deepspeed\lib\site-packages\torch\include\THC -IC:\Cuda\v11.1\include -IC:\ProgramData\Anaconda3\envs\deepspeed\include -IC:\ProgramData\Anaconda3\envs\deepspeed\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tpcsrc/transformer/ds_transformer_cuda.cpp /Fobuild\temp.win-amd64-3.6\Release\csrc/transformer/ds_transformer_cuda.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -std=c++14 -g -Wno-reorder -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=transformer_cuda -D_GLIBCXX_USE_CXX11_ABI=0

  4. Teravus commented on Nov 10, 2020

    @Teravus

    I can take /Wno-reorder out of setup.py and it compiles up until it attempts to resolve the external links to cublas. So that's next!
    I recognize that I may have to reorder structs for it to work properly.. but we'll give it a whirl.

  5. Teravus commented on Nov 12, 2020

    @Teravus

    I wasn't able to get it to include cublas.lib cudnn.lib curand.lib, but I was able to set the system path to include the build tools and run the last line of the commands (which is the linker) manually and include the libs. At first, this stopped with unable to find rc.exe.. but then I copied rc.exe and rc.dll from my windows dev kit to the visual studio build directory. After that it linked successfully. I then did it a few times so it would print out the last link command on the console.. so I can copy it and paste it and include the libs. Eventually, it built the wheel. Finally... there isn't a clang-format package for windows apparently.. so I had to use;
    pip install --no-dependencies dist/deepspeed-0.3.0+unknown-cp36-cp36m-win_amd64.whl

    as an aside, visual studio has a clang-format.exe.. which is probably the same thing.

    Now to figure out how to test it ;P

  6. Teravus commented on Nov 12, 2020

    @Teravus

    Testing... using the unit tests reveals that triton isn't installed also so deepspeed.ops.sparse_attention.cpp_utils can't be imported.
    I guess that's next!

  7. Teravus commented on Nov 12, 2020

    @Teravus

    Aaaaand.. I turns out there was another step for deepspeed.ops.sparse_attention.cpp_utils

    I recompiled it now running the unit tests directly with pytest.. and they're failing with RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch) nvrtc compilation failed:

    My guess is they don't like compute_85(Cuda 11.1) or I'm missing an environment variable... Trying with a 3090.

  8. Teravus commented on Nov 13, 2020

    @Teravus

    So, I re-did my pytorch installation with the latest daily and added 'arch=compute_80,code=compute_80', to the setup script..

    and.. it no longer complains about gpu-architecture.
    Now a few tests are upset about pickling..

    • AttributeError: Can't pickle local object 'distributed_test..dist_wrap..dist_init'
      and a few are upset because they're missing no_grad().
    • "Leaf variable was used in an inplace operation"

    I'm still trying to build Triton... Maybe that'll use a different set of code that doesn't suffer from these issues once that is installed.

  9. self-assigned this
    on Sep 6, 2024
  10. jomayeri commented on Sep 6, 2024

    @jomayeri
    Collaborator

    Please see latest release for DeepSpeed on Windows.

  11. added a commit that references this issue on Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions