Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in deepspeed installation with python 3.8 #2191

Closed
yuanzhiyong1999 opened this issue Aug 6, 2022 · 4 comments
Closed

Issue in deepspeed installation with python 3.8 #2191

yuanzhiyong1999 opened this issue Aug 6, 2022 · 4 comments

Comments

@yuanzhiyong1999
Copy link

yuanzhiyong1999 commented Aug 6, 2022

I got the following output when I installed using pip:

(yzy) C:\Users\hg>pip install deepspeed
Collecting deepspeed
  Using cached deepspeed-0.7.0.tar.gz (629 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      系统找不到指定的文件。
      系统找不到指定的文件。
      系统找不到指定的文件。
      系统找不到指定的文件。
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\hg\AppData\Local\Temp\pip-install-gz8c7roz\deepspeed_c511425150b843d3883abfc7c9977037\setup.py", line 151, in <module>
          abort(f"Unable to pre-compile {op_name}")
        File "C:\Users\hg\AppData\Local\Temp\pip-install-gz8c7roz\deepspeed_c511425150b843d3883abfc7c9977037\setup.py", line 46, in abort
          assert False, msg
      AssertionError: Unable to pre-compile sparse_attn
      DS_BUILD_OPS=1
       [WARNING]  cpu_adam requires the 'lscpu' command, but it does not exist!
       [WARNING]  cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
       [WARNING]  cpu_adam requires the 'lscpu' command, but it does not exist!
       [WARNING]  cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
       [WARNING]  cpu_adagrad requires the 'lscpu' command, but it does not exist!
       [WARNING]  cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
       [WARNING]  cpu_adagrad requires the 'lscpu' command, but it does not exist!
       [WARNING]  cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
       [WARNING]  please install triton==1.0.0 if you want to use sparse attention
       [WARNING]  One can disable sparse_attn with DS_BUILD_SPARSE_ATTN=0
       [ERROR]  Unable to pre-compile sparse_attn
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What is the reason for this, please?

@mrwyattii
Copy link
Contributor

@yuanzhiyong1999 It seems you are trying to pre-compile sparse attention but are missing dependencies:

       [WARNING]  please install triton==1.0.0 if you want to use sparse attention
       [WARNING]  One can disable sparse_attn with DS_BUILD_SPARSE_ATTN=0
       [ERROR]  Unable to pre-compile sparse_attn

You can disable this if it is a feature you will not be using it (DS_BUILD_SPARSE_ATTN=0) or install triton (pip install triton==1.0.0)

@DrMemoryFish
Copy link

@yuanzhiyong1999 It seems you are trying to pre-compile sparse attention but are missing dependencies:

       [WARNING]  please install triton==1.0.0 if you want to use sparse attention
       [WARNING]  One can disable sparse_attn with DS_BUILD_SPARSE_ATTN=0
       [ERROR]  Unable to pre-compile sparse_attn

You can disable this if it is a feature you will not be using it (DS_BUILD_SPARSE_ATTN=0) or install triton (pip install triton==1.0.0)

I'm getting something similar

(base) C:\Users\Abdullah>pip install deepspeed
Collecting deepspeed
  Using cached deepspeed-0.7.3.tar.gz (717 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      The system cannot find the file specified.
      The system cannot find the file specified.
      The system cannot find the file specified.
      The system cannot find the file specified.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Abdullah\AppData\Local\Temp\pip-install-2z3uwv_4\deepspeed_19b186a76bf043edb9043fcca365c68f\setup.py", line 151, in <module>
          abort(f"Unable to pre-compile {op_name}")
        File "C:\Users\Abdullah\AppData\Local\Temp\pip-install-2z3uwv_4\deepspeed_19b186a76bf043edb9043fcca365c68f\setup.py", line 46, in abort
          assert False, msg
      AssertionError: Unable to pre-compile sparse_attn
      DS_BUILD_OPS=1
      Installed CUDA version 11.4 does not match the version torch was compiled with 11.6 but since the APIs are compatible, accepting this combination
      ←[93m [WARNING] ←[0m cpu_adam requires the 'lscpu' command, but it does not exist!
      ←[93m [WARNING] ←[0m cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
      ←[93m [WARNING] ←[0m cpu_adam requires the 'lscpu' command, but it does not exist!
      ←[93m [WARNING] ←[0m cpu_adam attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
      Installed CUDA version 11.4 does not match the version torch was compiled with 11.6 but since the APIs are compatible, accepting this combination
      ←[93m [WARNING] ←[0m cpu_adagrad requires the 'lscpu' command, but it does not exist!
      ←[93m [WARNING] ←[0m cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
      ←[93m [WARNING] ←[0m cpu_adagrad requires the 'lscpu' command, but it does not exist!
      ←[93m [WARNING] ←[0m cpu_adagrad attempted to query 'lscpu' after failing to use py-cpuinfo to detect the CPU architecture. 'lscpu' does not appear to exist on your system, will fall back to use -march=native and non-vectorized execution.
      Installed CUDA version 11.4 does not match the version torch was compiled with 11.6 but since the APIs are compatible, accepting this combination
      Installed CUDA version 11.4 does not match the version torch was compiled with 11.6 but since the APIs are compatible, accepting this combination
      ←[93m [WARNING] ←[0m please install triton==1.0.0 if you want to use sparse attention
      ←[93m [WARNING] ←[0m One can disable sparse_attn with DS_BUILD_SPARSE_ATTN=0
      ←[31m [ERROR] ←[0m Unable to pre-compile sparse_attn
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

(base) C:\Users\Abdullah>

i tried pip install triton==1.0.0

but got:

(base) C:\Users\Abdullah>pip install triton==1.0.0
ERROR: Could not find a version that satisfies the requirement triton==1.0.0 (from versions: 0.1, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0)
ERROR: No matching distribution found for triton==1.0.0

(base) C:\Users\Abdullah>

@Thomas-MMJ
Copy link
Contributor

Thomas-MMJ commented Oct 14, 2022

i tried pip install triton==1.0.0

There is no pypi 1.0.0 build for triton for windows. There is nothing recent. You will have to get triton built from source on windows to use it, but unfortunately I haven't had any luck, perhaps someone more familiar with it will get it built and share instructions for how to do so or will distribute prebuilt versions. Until that time you can't use it on windows conda.

@loadams
Copy link
Contributor

loadams commented Aug 15, 2023

Closing this issue as the issue is resolved/not with deepspeed.

@loadams loadams closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants