在PyTorch的2.6.1+das.opt2.dtk24043中的版本说明写已知问题有一项是“暂不支持FlashAttention”,但是
FlashAttention的2.6.1+das.opt2.dtk24043里,却写着支持torch2.3.0软件栈。这应该如何理解。在安装完
triton 版本2.1.0+das.opt1.dtk24042和直接pip install pytest后,运行验证命令 python -c "import flash_attn; print(flash_attn .__version__)"
显示:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.2.5 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "<string> ", line 1, in <module>
File "/home/user/anaconda3/envs/py31110/lib/python3.11/site-packages/flash_attn/init.py", line 13, in <module>
from flash_attn.flash_attn_triton_interface import flash_attn_func as triton_flash_attn_func
File "/home/user/anaconda3/envs/py31110/lib/python3.11/site-packages/flash_attn/flash_attn_triton_interface.py", line 3, in <module>
from flash_attn import flash_attn_triton
File "/home/user/anaconda3/envs/py31110/lib/python3.11/site-packages/flash_attn/flash_attn_triton.py", line 544, in <module>
empty = torch.empty(128, device="cuda")
/home/user/anaconda3/envs/py31110/lib/python3.11/site-packages/flash_attn/flash_attn_triton.py:544: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at /data/jenkins_workspace/workspace/pytorch@13/torch/csrc/utils/tensor_numpy.cpp:84.)
empty = torch.empty(128, device="cuda")
2.6.1
这意思是安装成功了还是没成功?知否只要更换numpy的版本就行,还是说这个empty = torch.empty(128, device="cuda")说明会有什么问题?

暂无数据