Skip to content

CUDA: fix logic for V100 + GGML_CUDA_FORCE_MMQ #12098

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

Merged

Conversation

JohannesGaessler
Copy link
Collaborator

Fixes LostRuins#1390 .

The logic for the combination of V100s and GGML_CUDA_FORCE_MMQ seems to be wrong on master. By default, when compiling without GGML_CUDA_FORCE_MMQ, the MMQ kernels should only be compiled for batch sizes up to MMQ_DP4A_MAX_BATCH_SIZE if FP16 tensor core hardware is available but int8 tensor core hardware is not (basically only V100s). Template specializations for higher batch sizes will never be used. However, the condition for this seems to have been inverted. Without GGML_CUDA_FORCE_MMQ unneeded template specializations were being compiled and with it the host code could attempt to run nonexistent kernels.

@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 27, 2025
@LostRuins
Copy link
Collaborator

thanks for the help.

@JohannesGaessler JohannesGaessler merged commit 9c42b17 into ggml-org:master Feb 28, 2025
43 checks passed
mglambda pushed a commit to mglambda/llama.cpp that referenced this pull request Mar 8, 2025
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Mar 19, 2025
mostlyuseful pushed a commit to mostlyuseful/llama.cpp that referenced this pull request May 12, 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.

CUDA Kernel Compatibility Error with Tesla V100 (Volta, sm_70) GPUs
3 participants