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

CUDA: fix Volta FlashAttention logic #11615

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

JohannesGaessler
Copy link
Collaborator

Fixes #11583 (comment) .

The problem is that the kernel selection logic is wrong. The "tile" and "vec" kernels should be used when no tensor cores are available at all, not when the new tensor core type is unavailable.

@github-actions github-actions bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Feb 3, 2025
@ggerganov
Copy link
Member

I'm now getting this error:

/home/ggml/work/llama.cpp/ggml/src/ggml-cuda/template-instances/../fattn-mma-f16.cuh:453: ERROR: CUDA kernel flash_attn_ext_f16_process_tile has no device code compatible with CUDA arch 700. ggml-cuda.cu was compiled for: 700

@JohannesGaessler
Copy link
Collaborator Author

The code seems to have also been missing a return statement.

Copy link
Member

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works now.

@ggerganov ggerganov merged commit 21c84b5 into ggml-org:master Feb 3, 2025
46 checks passed
Nexesenex added a commit to Nexesenex/croco.cpp that referenced this pull request Feb 4, 2025
tinglou pushed a commit to tinglou/llama.cpp that referenced this pull request Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants