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

Can CUDA 12.1.1 really be used for compilation? #691

Closed
leizhao1234 opened this issue Feb 29, 2024 · 4 comments
Closed

Can CUDA 12.1.1 really be used for compilation? #691

leizhao1234 opened this issue Feb 29, 2024 · 4 comments
Labels
bug Something isn't working build Build system

Comments

@leizhao1234
Copy link

I use cuda 12.1.1 to build TE form source, stable、main and v1.3 branch, all of them can install successfully, but flash-attention installed by TE doesn’t work at all.
import flash_attn_2_cuda as flash_attn_cuda ImportError: /share/home/zl/miniconda/envs/mega/lib/python3.10/site-packages/flash_attn_2_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

@ptrendx
Copy link
Member

ptrendx commented Feb 29, 2024

The undefined symbol actually comes from pyTorch, the CUDA version seems unrelated.

@ptrblck Do you have some recommendations on debugging this symbol issue?

@leizhao1234
Copy link
Author

It should have nothing to do with PyTorch. If I compile FlashAttention directly from the source code, there’s no issue, but when I install FlashAttention through TE, I encounter undefined symbols.

@lucifer1004
Copy link

This is related to the version of flash-attn. TE currently forces flash-attn<=2.4.2 and there seems to be some issue with v2.4.2. Installing from source or installing v2.5.5 can help.

See #689

@ptrendx ptrendx added build Build system bug Something isn't working labels May 16, 2024
@ptrendx
Copy link
Member

ptrendx commented May 16, 2024

We updated the flash-attn version to 2.5.8 (current latest). Closing this issue based on the previous comment, but please reopen if you still see the problem.

@ptrendx ptrendx closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Build system
Projects
None yet
Development

No branches or pull requests

3 participants