FlashAttentionのインストールエラー:「CUDA 11.6以上」が必要とのエラーメッセージ
こんにちは、
pip
を使用してflash-attn
(バージョン2.6.3)をインストールしようとしたところ、エラーメッセージに「CUDA 11.6以上が必要」と表示されました。しかし、私の環境ではCUDA 11.8を使用しており(torch.__version__ = 2.5.0+cu118
)、メタデータ生成の段階でインストールが失敗してしまいます。どうすればよいかわからないので、以下にエラーメッセージの詳細を記載します。
Collecting flash-attn
Using cached flash_attn-2.6.3.tar.gz (2.6 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
fatal: not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-ur6gdyxq/flash-attn_8aaa3421ed454954b43cbcebfe9bb28e/setup.py", line 160, in <module>
raise RuntimeError(
RuntimeError: FlashAttention is only supported on CUDA 11.6 and above. Note: make sure nvcc has a supported version by running nvcc -V.
torch.__version__ = 2.5.0+cu118
[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.
nvcc -V
コマンドでCUDAのバージョンを確認したところ、CUDA 11.8がインストールされていることを確認しました。
この問題を解決するために、何かアドバイスや提案をいただけないでしょうか?flash-attn
との互換性を確保するために他に確認すべき点があれば教えてください。
どうぞよろしくお願いいたします。
0 likes