Hello folks… can anyone advise why after upgrade to Pytorch 2.2.0 ( using pip in win10, RTX A2000 GPU) I am getting the following warning:
AppData\Roaming\Python\Python311\site-packages\torch\nn\functional.py:5476: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at …\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:263.)
attn_output = scaled_dot_product_attention(q, k, v, attn_mask, dropout_p, is_causal)
My code wasnt change, I use same as was using with torch 2.1
Release notes claims FlashAttention-v2 support, but due some reason pytorch wheel is no compiled with it… why ? any way to fix it ?
In general after the warning all continue to work as usual, but the warning is annoiyng.
unfortunately this didnt help… I set the env, but still have same warning
I thinks
this is not related to env of any other settings… the wheel was not compiled with FA support… so far it not supposed to run with any setting, isnt it ?
It seems that your wheel is just not compiled with flash attention.
If you own the environment, just do:
pip3 install --force-reinstall --pre torch torchtext torchvision torchaudio torchrec --extra-index-url https://download.pytorch.org/whl/nightly/cu121
thanks for you efforts… but unfortunately no progress
I have installed
while checking got
Device name: NVIDIA RTX A2000
FlashAttention available: True
torch version: 2.3.0.dev20240122+cu121
but then, when I start my code I still got same warning \AppData\Roaming\Python\Python311\site-packages\torch\nn\functional.py:5504: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at …\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:308.)
guess the night build still compiled with no FlashAttention support…
I assume it’s specific to FlashAttentionV2, but also am not using Windows and thus cannot verify the support of previous implementations.
Based on e.g. this comment it seems to be the case.