Skip to content

can not install deepspeed #397

Closed
Closed

Description

@chaoyanghe

When I run "bash install.sh", I got the following errors:

/usr/include/c++/7/bits/move.h(48): error: identifier "__builtin_addressof" is undefined
detected during:
instantiation of "_Tp *std::__addressof(_Tp &) [with _Tp=const std::_Bind<lambda [](std::function<c10::IValue ()>)->void (std::function<c10::IValue ()>)>]"
/usr/include/c++/7/bits/std_function.h(174): here
instantiation of "_Functor *std::_Function_base::_Base_manager<_Functor>::_M_get_pointer(const std::_Any_data &) [with _Functor=std::_Bind<lambda [](std::function<c10::IValue ()>)->void (std::function<c10::IValue ()>)>]"
/usr/include/c++/7/bits/std_function.h(316): here
instantiation of "void std::_Function_handler<void (_ArgTypes...), _Functor>::_M_invoke(const std::_Any_data &, _ArgTypes &&...) [with _Functor=std::_Bind<lambda [](std::function<c10::IValue ()>)->void (std::function<c10::IValue ()>)>, _ArgTypes=<>]"
/usr/include/c++/7/bits/std_function.h(694): here
instantiation of "std::function<_Res (_ArgTypes...)>::function(_Functor) [with _Res=void, _ArgTypes=<>, _Functor=std::_Bind<lambda [](std::function<c10::IValue ()>)->void (std::function<c10::IValue ()>)>, =void, =void]"
/home/chaoyanghe/miniconda/envs/bert/lib/python3.7/site-packages/torch/include/ATen/core/ivalue_inl.h(353): here

32 errors detected in the compilation of "/tmp/tmpxft_0000132c_00000000-6_fused_lamb_cuda_kernel.cpp1.ii".
error: command '/usr/bin/nvcc' failed with exit status 1
Error on line 195
Fail to install deepspeed

Activity

  1. chaoyanghe commented on Sep 10, 2020

    @chaoyanghe
    Author

    Package Version


    certifi 2020.6.20
    mkl-fft 1.1.0
    mkl-random 1.1.1
    mkl-service 2.3.0
    numpy 1.19.1
    olefile 0.46
    Pillow 7.2.0
    pip 20.2.2
    protobuf 3.13.0
    psutil 5.7.2
    Pygments 2.6.1
    readme-renderer 25.0
    requests-toolbelt 0.9.1
    setuptools 49.6.0.post20200814
    six 1.15.0
    tensorboardX 2.1
    torch 1.6.0
    torchvision 0.7.0
    tqdm 4.48.2
    twine 3.1.1
    wheel 0.35.1

    OS: Ubuntu 18.04

  2. chaoyanghe commented on Sep 10, 2020

    @chaoyanghe
    Author

    why is my issue closed without answering?

  3. tjruwase commented on Sep 10, 2020

    @tjruwase
    Contributor

    @chaoyanghe, I closed issue #396, not this one. Issue #396 is incomplete and looks like it was replaced by #397. Is this correct?

  4. chaoyanghe commented on Sep 11, 2020

    @chaoyanghe
    Author

    Okay. Now this one is open.

  5. tjruwase commented on Sep 11, 2020

    @tjruwase
    Contributor

    @chaoyanghe can you please share your versions of the following tools

    CUDA,
    nvcc,
    g++,
    gcc

  6. chaoyanghe commented on Sep 11, 2020

    @chaoyanghe
    Author

    chaoyanghe@ChaoyangHe-GPU-RTX2080Tix4:/workspace/bert/data$ nvcc --version
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2018 NVIDIA Corporation
    Built on Sat_Aug_25_21:08:01_CDT_2018
    Cuda compilation tools, release 10.0, V10.0.130

  7. chaoyanghe commented on Sep 11, 2020

    @chaoyanghe
    Author

    chaoyanghe@ChaoyangHe-GPU-RTX2080Tix4:/workspace/bert/data$ gcc --version
    gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
    Copyright (C) 2017 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

  8. chaoyanghe commented on Sep 11, 2020

    @chaoyanghe
    Author

    chaoyanghe@ChaoyangHe-GPU-RTX2080Tix4:/workspace/bert/data$ nvidia-smi
    Thu Sep 10 21:54:26 2020
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
    |-------------------------------+----------------------+----------------------+
    | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
    | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
    |===============================+======================+======================|
    | 0 GeForce RTX 208... Off | 00000000:19:00.0 Off | N/A |
    | 30% 34C P8 12W / 250W | 1MiB / 11019MiB | 0% Default |
    +-------------------------------+----------------------+----------------------+
    | 1 GeForce RTX 208... Off | 00000000:1A:00.0 Off | N/A |
    | 30% 37C P8 7W / 250W | 1MiB / 11019MiB | 0% Default |
    +-------------------------------+----------------------+----------------------+
    | 2 GeForce RTX 208... Off | 00000000:67:00.0 Off | N/A |
    | 30% 43C P8 13W / 250W | 1MiB / 11019MiB | 0% Default |
    +-------------------------------+----------------------+----------------------+
    | 3 GeForce RTX 208... Off | 00000000:68:00.0 On | N/A |
    | 30% 45C P8 22W / 250W | 2145MiB / 11016MiB | 4% Default |
    +-------------------------------+----------------------+----------------------+

    +-----------------------------------------------------------------------------+
    | Processes: GPU Memory |
    | GPU PID Type Process name Usage |
    |=============================================================================|
    | 3 481 G ...AAgAAAAAAAAA --service-request-channel- 43MiB |
    | 3 8635 G /usr/bin/gnome-shell 130MiB |
    | 3 13956 G /usr/lib/xorg/Xorg 785MiB |
    | 3 14070 G /usr/bin/gnome-shell 531MiB |
    | 3 14525 G ...75376,131072 --enable-features=CastMedi 26MiB |
    | 3 14759 G ...AAAAAAAAAAAACAAAAAAAAAA= --shared-files 599MiB |

  9. tjruwase commented on Sep 11, 2020

    @tjruwase
    Contributor

    I notice two issues with your compiler toolchain. Can you please address them to see if issue will be fixed

    1. gcc is quite old, can you upgrade to newer? We use 7.5.0

    2. nvcc is for CUDA 10.0, while nvidia-smi is for CUDA 10.2. Can you check the pytorch version as well by doing
      python -c "import torch; print(torch.version.cuda)".
      This suggests that you have multiple CUDA versions installed, which could cause issues. Can you please remove the older ones and keep the 10.2?

  10. tjruwase commented on Sep 16, 2020

    @tjruwase
    Contributor

    @chaoyanghe Are you still experiencing this issue?

  11. rvalenciaaz commented on Sep 24, 2020

    @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!

  12. tjruwase commented on Sep 24, 2020

    @tjruwase
    Contributor

    @rvalenciaaz can you please open a new issue? It is not clear that these are similar issues, for example the environments are different: Windows vs Linux.

  13. tjruwase commented on Oct 1, 2020

    @tjruwase
    Contributor

    @chaoyanghe We have made some improvements to the installation process. Can you please try the latest code?

  14. chaoyanghe commented on Oct 1, 2020

    @chaoyanghe
    Author

    @tjruwase thanks. I will try. We also attempt to build a library from scratch for our own project.

  15. Teravus commented on Nov 6, 2020

    @Teravus

    A side note, I too have experienced this error.
    Probably different environment though.

  16. 3 remaining items

  17. Teravus commented on Nov 26, 2020

    @Teravus

    @tjruwase
    Step 2: (DeepSpeed) C:\DeepSpeed>pip install deepspeed
    Collecting deepspeed
    Downloading deepspeed-0.3.7.tar.gz (258 kB)
    |████████████████████████████████| 258 kB 6.4 MB/s
    Requirement already satisfied: torch>=1.2 in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from deepspeed) (1.8.0.dev20201112)
    Requirement already satisfied: torchvision>=0.4.0 in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from deepspeed) (0.9.0.dev20201112)
    Requirement already satisfied: tqdm in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from deepspeed) (4.51.0)
    Requirement already satisfied: tensorboardX==1.8 in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from deepspeed) (1.8)
    Requirement already satisfied: ninja in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from deepspeed) (1.10.0.post2)
    Requirement already satisfied: typing_extensions in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from torch>=1.2->deepspeed) (3.7.4.3)
    Requirement already satisfied: numpy in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from torch>=1.2->deepspeed) (1.19.2)
    Requirement already satisfied: dataclasses in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from torch>=1.2->deepspeed) (0.7)
    Requirement already satisfied: pillow>=4.1.1 in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from torchvision>=0.4.0->deepspeed) (8.0.1)
    Requirement already satisfied: six in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from tensorboardX==1.8->deepspeed) (1.15.0)
    Requirement already satisfied: protobuf>=3.2.0 in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from tensorboardX==1.8->deepspeed) (3.13.0)
    Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\deepspeed\lib\site-packages (from protobuf>=3.2.0->tensorboardX==1.8->deepspeed) (50.3.0.post20201103)
    Building wheels for collected packages: deepspeed
    Building wheel for deepspeed (setup.py) ... done
    Created wheel for deepspeed: filename=deepspeed-0.3.7-py3-none-any.whl size=252507 sha256=99a7f9b6ce95c73bd08f932da7118b801cf117b89f4bfbb96ef1d3dbbed2808f
    Stored in directory: c:\users\dcolive\appdata\local\pip\cache\wheels\00\29\e9\2db78de5c887b1b6c6a4be61c6fd4db570ec39386a17f6d4f8
    Successfully built deepspeed
    Installing collected packages: deepspeed
    Successfully installed deepspeed-0.3.7

    Step 3:
    (DeepSpeed) C:\DeepSpeed>python ds_report.py
    C:\DeepSpeed\deepspeed\ops\sparse_attention\softmax.py:8: UserWarning: Unable to import triton, sparse attention will not be accessible
    warnings.warn("Unable to import triton, sparse attention will not be accessible")
    C:\DeepSpeed\deepspeed\ops\sparse_attention\matmul.py:8: UserWarning: Unable to import triton, sparse attention will not be accessible
    warnings.warn("Unable to import triton, sparse attention will not be accessible")
    Traceback (most recent call last):
    File "ds_report.py", line 3, in
    from deepspeed.env_report import main
    File "C:\DeepSpeed\deepspeed_init_.py", line 7, in
    from . import ops
    File "C:\DeepSpeed\deepspeed\ops_init_.py", line 5, in
    from . import sparse_attention
    File "C:\DeepSpeed\deepspeed\ops\sparse_attention_init_.py", line 3, in
    from .matmul import MatMul
    File "C:\DeepSpeed\deepspeed\ops\sparse_attention\matmul.py", line 17, in
    class _sparse_matmul(torch.autograd.Function):
    File "C:\DeepSpeed\deepspeed\ops\sparse_attention\matmul.py", line 86, in sparse_matmul
    cpp_utils = importlib.import_module('deepspeed.ops.sparse_attention.cpp_utils')
    File "C:\ProgramData\Anaconda3\envs\DeepSpeed\lib\importlib_init
    .py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'deepspeed.ops.sparse_attention.cpp_utils'

    So it looks like the part of install.sh/setup.py that enables those ops didn't build.


    I ran the tests/unit/test_sparse_attention.py tests and it gave me;
    (DeepSpeed) C:\DeepSpeed\tests\unit>pytest test_sparse_attention.py
    ================================================= test session starts =================================================
    platform win32 -- Python 3.6.12, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
    rootdir: C:\DeepSpeed
    plugins: forked-1.3.0
    collected 0 items / 1 error

    ======================================================= ERRORS ========================================================
    ________________________________ ERROR collecting tests/unit/test_sparse_attention.py _________________________________
    test_sparse_attention.py:10: in
    if not deepspeed.ops.installed_ops['sparse-attn']:
    E AttributeError: module 'deepspeed.ops' has no attribute 'installed_ops'
    =============================================== short test summary info ===============================================
    ERROR test_sparse_attention.py - AttributeError: module 'deepspeed.ops' has no attribute 'installed_ops'
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    ================================================== 1 error in 1.04s ===================================================

    When I use my custom built wheel on windows.. that I outlined the steps in issues/435 and run the test_sparse_attention.py tests, I get this;
    (DeepSpeed) C:\DeepSpeed\dist>pip install "deepspeed-0.3.0+unknown-cp36-cp36m-win_amd64.whl" --no-deps
    Processing c:\deepspeed\dist\deepspeed-0.3.0+unknown-cp36-cp36m-win_amd64.whl
    Installing collected packages: deepspeed
    Successfully installed deepspeed-0.3.0+unknown

    (DeepSpeed) C:\DeepSpeed\tests\unit>pytest test_sparse_attention.py
    ================================================= test session starts =================================================
    platform win32 -- Python 3.6.12, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
    rootdir: C:\DeepSpeed
    plugins: forked-1.3.0
    collected 54 items

    test_sparse_attention.py .............sssssssssssssssssssssssssssssssssssssssss [100%]

    ================================================== warnings summary ===================================================
    ......\programdata\anaconda3\envs\deepspeed\lib\site-packages\deepspeed\ops\sparse_attention\softmax.py:8
    c:\programdata\anaconda3\envs\deepspeed\lib\site-packages\deepspeed\ops\sparse_attention\softmax.py:8: UserWarning: Unable to import triton, sparse attention will not be accessible
    warnings.warn("Unable to import triton, sparse attention will not be accessible")

    ......\programdata\anaconda3\envs\deepspeed\lib\site-packages\deepspeed\ops\sparse_attention\matmul.py:8
    c:\programdata\anaconda3\envs\deepspeed\lib\site-packages\deepspeed\ops\sparse_attention\matmul.py:8: UserWarning: Unable to import triton, sparse attention will not be accessible
    warnings.warn("Unable to import triton, sparse attention will not be accessible")

    -- Docs: https://docs.pytest.org/en/stable/warnings.html
    ===================================== 13 passed, 41 skipped, 2 warnings in 0.99s ======================================

  18. Teravus commented on Nov 26, 2020

    @Teravus

    @tjruwase I built current master from source and it went a lot smoother than the last time. but it doesn't look like any of the ops installed.

    python setup.py -v build
    python setup.py bdist_wheel
    pip uninstall deepspeed
    pip install dist\deepspeed-0.3.0+unknown-cp36-cp36m-win_amd64.whl --no-deps
    python ds_report.py
    (DeepSpeed) C:\DeepSpeed>python ds_report.py

    DeepSpeed C++/CUDA extension op report

    NOTE: Ops not installed will be just-in-time (JIT) compiled at
    runtime if needed. Op compatibility means that your system
    meet the required dependencies to JIT install the op.

    JIT compiled ops requires ninja
    ninja .................. [OKAY]

    op name ................ installed .. compatible

    cpu_adam ............... [NO] ....... [OKAY]
    fused_adam ............. [NO] ....... [OKAY]
    fused_lamb ............. [NO] ....... [OKAY]
    The system cannot find the file specified.
    The system cannot find the file specified.
    [WARNING] sparse_attn requires one of the following commands '['llvm-config', 'llvm-config-9']', but it does not exist!
    The system cannot find the file specified.
    [WARNING] sparse_attn requires the 'cmake' command, but it does not exist!
    sparse_attn ............ [NO] ....... [NO]
    transformer ............ [NO] ....... [OKAY]
    stochastic_transformer . [NO] ....... [OKAY]
    utils .................. [NO] ....... [OKAY]

    DeepSpeed general environment info:
    torch install path ............... ['C:\ProgramData\Anaconda3\envs\DeepSpeed\lib\site-packages\torch']
    torch version .................... 1.8.0.dev20201112
    torch cuda version ............... 11.0
    nvcc version ..................... 11.0
    deepspeed install path ........... ['C:\DeepSpeed\deepspeed']
    deepspeed info ................... 0.3.7+unknown, unknown, unknown
    deepspeed wheel compiled w. ...... torch 1.8, cuda 11.0

  19. Teravus commented on Nov 26, 2020

    @Teravus

    I attempted to build current git master source fresh.. and it ultimately ended up in an unusable wheel that couldn't be installed because the platform was 'unknown'. so pip rejected it.

    I was able to hack one together though by using the old setup.py script for the setup.py -v bdist_wheel part and then modifying /opt/init.py inside the installed directory and fixing the reference to git_version_info. the wheel build got confused and didn't pick a path separator. so instead of ../git_version_info, it ended up as ..git_version_info.

    Build Steps:
    I set DS_BUILD default to 1 and ran a build. And it couldn't find the cpu_adam.h header file.

    So, I skipped cpu_adam and continued the build. Each of the ops compiles up until the cl.exe call.. then the build errors because it doesn't understand the -Wno-reorder parameter.. which is clang only.

    cl : Command line error D8021 : invalid numeric argument '/Wno-reorder'
    so I end up removing that argument from the various python op scripts.

    Then I end up at the linking stage and the paths to cublas, curand cudnn are not included properly.. so I run the failed linker command manually and add cublas.lib, cudnn.lib, and curand.lib to the included lib list. It links. Then I rerun the setup.py script until I get to the next linking statement.. and do this for each of the ops.

    Then I build the wheel.. python setup.py -v bdist_wheel. It produces an 'unknown' system wheel.

    So I used the setup.py from 3 weeks ago with modifications for the bdist_wheel.. and it generates a win_amd64 wheel.

    I can then install the wheel with pip using --no-deps because clang.

    I then had to modify module structure call into supported ops because some of them are parent calls.

    I can then... set a HOME directory.

    Finally I can run python ds_report.py

    (DeepSpeed) C:\DeepSpeed>python ds_report.py

    DeepSpeed C++/CUDA extension op report

    NOTE: Ops not installed will be just-in-time (JIT) compiled at
    runtime if needed. Op compatibility means that your system
    meet the required dependencies to JIT install the op.

    JIT compiled ops requires ninja
    ninja .................. [OKAY]

    op name ................ installed .. compatible

    cpu_adam ............... [NO] ....... [OKAY]
    fused_adam ............. [YES] ...... [OKAY]
    fused_lamb ............. [YES] ...... [OKAY]
    The system cannot find the file specified.
    The system cannot find the file specified.
    [WARNING] sparse_attn requires one of the following commands '['llvm-config', 'llvm-config-9']', but it does not exist!
    The system cannot find the file specified.
    [WARNING] sparse_attn requires the 'cmake' command, but it does not exist!
    sparse_attn ............ [NO] ....... [NO]
    transformer ............ [YES] ...... [OKAY]
    stochastic_transformer . [YES] ...... [OKAY]
    utils .................. [YES] ...... [OKAY]

    DeepSpeed general environment info:
    torch install path ............... ['C:\ProgramData\Anaconda3\envs\DeepSpeed\lib\site-packages\torch']
    torch version .................... 1.8.0.dev20201112
    torch cuda version ............... 11.0
    nvcc version ..................... 11.0
    deepspeed install path ........... ['C:\DeepSpeed\deepspeed']
    deepspeed info ................... 0.3.7+unknown, unknown, unknown
    deepspeed wheel compiled w. ...... torch 1.8, cuda 11.0


    edit:
    But I spoke too soon. Actually running anything other than the compatible and installed op display reveals that there are 'parent' path lookups in the module structure, so all of the tests fail looking up the compatible ops.


    edit:
    After re-working the module imports.. I can get the unit tests to run and at least be where it was on the previous version
    (DeepSpeed) C:\DeepSpeed\tests\unit>pytest test_sparse_attention.py
    ===================================================================================== test session starts ======================================================================================
    platform win32 -- Python 3.6.12, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
    rootdir: C:\DeepSpeed
    plugins: forked-1.3.0
    collected 54 items

    test_sparse_attention.py .............sssssssssssssssssssssssssssssssssssssssss [100%]

    ================================================================================ 13 passed, 41 skipped in 1.02s ================================================================================

    The backwards and forwards tests have errors in them.. they're not using .no_grad():.. but I don't think that is related to the op itself.. that's just the test.
    DeepSpeed Transformer config is {'layer_id': 0, 'batch_size': 3, 'hidden_size': 1024, 'intermediate_size': 1024, 'max_seq_length': 56, 'heads': 16, 'attn_dropout_ratio': 0.0, 'hidden_dropout_ratio': 0.0, 'num_hidden_layers': 24, 'initializer_range': 0.02, 'fp16': True, 'pre_layer_norm': False, 'local_rank': -1, 'seed': -1, 'normalize_invertible': False, 'gelu_checkpoint': False, 'adjust_init_range': True, 'test_gemm': False, 'training': True, 'is_grad_enabled': True, 'attn_dropout_checkpoint': False, 'stochastic_mode': False}
    =================================================================================== short test summary info ====================================================================================
    FAILED test_cuda_backward.py::test_backward[3-1024-120-16-24-True-False-0.05] - RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
    FAILED test_cuda_backward.py::test_backward[3-1024-120-16-24-True-True-0.05] - RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
    FAILED test_cuda_backward.py::test_backward[3-1024-56-16-24-False-False-0.1] - RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
    FAILED test_cuda_backward.py::test_backward[3-1024-56-16-24-False-True-0.2] - RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
    ====================================================================================== 4 failed in 4.95s =======================================================================================

  20. tjruwase commented on Nov 26, 2020

    @tjruwase
    Contributor

    @Teravus, thanks so much for putting a lot of effort into getting this work and for sharing your experience. It does seem that our Windows installation is broken. Due to bandwidth limitations we have not put much effort into Windows. We will share updates on the Windows front as soon as possible. By the way, is Linux an option for you?

  21. tjruwase commented on Nov 26, 2020

    @tjruwase
    Contributor

    @Teravus, I just noticed your unit test updates as I was typing the previous message. I wonder if the following error is a result of torch 1.8 changes. We have only tested up to 1.6. Can you try that? On my side, I will check if the error is repro'd with 1.8.

    RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.

  22. tjruwase commented on Nov 26, 2020

    @tjruwase
    Contributor

    @Teravus, I just noticed that you are using a dev version of torch since 1.7 is the latest release. Can you please try < 1.8, as we are tested against those?

    DeepSpeed general environment info:
    torch install path ............... ['C:\ProgramData\Anaconda3\envs\DeepSpeed\lib\site-packages\torch']
    torch version .................... 1.8.0.dev20201112
    
  23. Teravus commented on Nov 26, 2020

    @Teravus

    I can, but it can't be today. I will have to rebuild torch from source because it is running on CUDA 11.0 compute 8.6

  24. Teravus commented on Nov 26, 2020

    @Teravus

    Here are my changes to get the ops to build on Windows. You still have to run the linker command manually.

    winbuild.patch.txt

  25. tjruwase commented on Nov 26, 2020

    @tjruwase
    Contributor

    @Teravus, thanks for sharing your patch. I took a quick look and it seems it is not against the latest deepspeed sources. Is this correct? For example, setup.py no longer has references to cpufeature.

    Also, could please provide this as a PR, since it is a non-trivial contribution. That way credits and licensing issues are appropriately handled. Thanks so much.

  26. Teravus commented on Nov 26, 2020

    @Teravus

    @tjruwase The patch is from current master head sources. I moved setup.py to setup.updated.py in the patch so I can use the older setup.py for the setup.py -v bdist_wheel step.

    I'll see if I can do a push request. Github tools are not installed on this machine so.. it'll take a bit.

  27. PuyangChen commented on Sep 14, 2021

    @PuyangChen

    hi, @tjruwase @Teravus
    When I install deepspeed in a windows server, it met a error as bellow...
    C:\Users\mfg_puyangch>Pip3 install deepspeed
    Collecting deepspeed
    ERROR: Command errored out with exit status 1:
    command: 'e:\software\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mfg_puyangch\AppData\Local\Temp\4\pip-install-x3aza12f\deepspeed\setup.py'"'"'; file='"'"'C:\Users\mfg_puyangch\AppData\Local\Temp\4\pip-install-x3aza12f\deepspeed\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
    cwd: C:\Users\mfg_puyangch\AppData\Local\Temp\4\pip-install-x3aza12f\deepspeed
    Complete output (10 lines):
    Traceback (most recent call last):
    File "", line 1, in
    File "C:\Users\mfg_puyangch\AppData\Local\Temp\4\pip-install-x3aza12f\deepspeed\setup.py", line 135, in
    abort(f"Unable to pre-compile {op_name}")
    File "C:\Users\mfg_puyangch\AppData\Local\Temp\4\pip-install-x3aza12f\deepspeed\setup.py", line 43, in abort
    assert False, msg
    AssertionError: Unable to pre-compile cpu_adam
    DS_BUILD_OPS=1
    [WARNING] One can disable cpu_adam with DS_BUILD_CPU_ADAM=0
    [ERROR] Unable to pre-compile cpu_adam
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

    Could you help me to figure out what's wrong it happen?

    the configurations:
    Operation system: windows server 2016
    CUDA version: 11.2
    pytorch version: 1.9.0+cu111
    gcc & g++ version: 8.1.0

  28. Teravus commented on Sep 15, 2021

    @Teravus

    At least for me.. I'd say it really isn't supported in Windows. Even if you can get DeepSpeed to compile(I did with changes), It is of limited use without Nvidia Triton which /definitely/ isn't supported in Windows because some of its dependencies.

    You might be better off running the docker container or using a Hypervisor that allows you to assign the graphics card to your Linux VM.

  29. PuyangChen commented on Sep 15, 2021

    @PuyangChen

    @Teravus thanks for your reply and suggestion.
    Besides the docker solution, is there any way to train a bigger model with limited GPUs in the Windows system?

  30. Teravus commented on Sep 18, 2021

    @Teravus

    You said windows server 2016, so I'm not sure. Windows 10 insider builds, I've heard (and not yet tried).... HyperV, apparently supports assigning video card resources. But only in the insider builds. I've not seen it outside of that. If you were able to get it to function.. You could possibly use the Windows Subsystem for Linux to get it to run. You would be better off just using a supported system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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