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

Failed to build flash-attn #108

Open
xiaoyerrr opened this issue Jul 5, 2024 · 0 comments
Open

Failed to build flash-attn #108

xiaoyerrr opened this issue Jul 5, 2024 · 0 comments

Comments

@xiaoyerrr
Copy link

Hello, I encountered an issue with pip install flash attn=0.2.2 where the graphics card is using rtx4090, torch=1.9.0+cu111

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-ncrd_tnc/flash-attn_b32280981de747f2914fb394c375bec5/setup.py", line 157, in
setup(
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/init.py", line 104, in setup
return distutils.core.setup(**attrs)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 368, in run
self.run_command("build")
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 132, in run
self.run_command(cmd_name)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/dist.py", line 967, in run_command
super().run_command(command)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 91, in run
_build_ext.run(self)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
self.build_extensions()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
self._build_extensions_serial()
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
self.build_extension(ext)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
_build_ext.build_extension(self, ext)
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 560, in build_extension
objects = self.compiler.compile(
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/users/zhaoyang.hu/miniconda3/envs/cmt/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for flash-attn
Running setup.py clean for flash-attn
Failed to build flash-attn
ERROR: Could not build wheels for flash-attn, which is required to install pyproject.toml-based projects

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

1 participant