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

Add support for memory efficient attention for AMD/ROCm #1390

Closed
Looong01 opened this issue Apr 15, 2024 · 3 comments
Closed

Add support for memory efficient attention for AMD/ROCm #1390

Looong01 opened this issue Apr 15, 2024 · 3 comments

Comments

@Looong01
Copy link

🚀 The feature, motivation and pitch

Enable support for Flash Attention Memory Efficient and SDPA kernels for AMD GPUs.

At present using these gives below warning with latest nightlies (torch==2.4.0.dev20240413+rocm6.0, pytorch-triton-rocm 3.0.0+0a22a91d04):

/site-packages/diffusers/models/attention_processor.py:1117: UserWarning: 1Torch was not compiled with memory efficient attention. (Triggered internally at ../aten/src/ATen/native/transformers/hip/sdp_utils.cpp:505.)

Alternatives

Users cannot use the native PyTorch APIs with memory efficient attention.

Additional context

No response

@Epliz
Copy link

Epliz commented May 3, 2024

Hi,

Not sure what is the status, but looks like AMD has been working on it: pytorch#114309

@taylding-amd
Copy link

Hi @Looong01, the support should already be included, please refer to this issue for more details: pytorch#112997

@Looong01
Copy link
Author

Looong01 commented Dec 3, 2024

Thanks!

@Looong01 Looong01 closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants