Skip to content

opencl: fix rms_norm_mul#17250

Merged
max-krasnyansky merged 2 commits intoggml-org:masterfrom
qualcomm:lh/rms-norm-mul-fix
Nov 16, 2025
Merged

opencl: fix rms_norm_mul#17250
max-krasnyansky merged 2 commits intoggml-org:masterfrom
qualcomm:lh/rms-norm-mul-fix

Conversation

@lhez
Copy link
Copy Markdown
Contributor

@lhez lhez commented Nov 13, 2025

The rms_norm_mul kernel produces incorrect result when ne00 = 768. This PR changes how the kernel does reduction to get the sum. This seems to fix the issue.

@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning OpenCL Issues specific to the OpenCL backend labels Nov 13, 2025
@lhez lhez marked this pull request as ready for review November 14, 2025 19:32
Copy link
Copy Markdown
Member

@max-krasnyansky max-krasnyansky left a comment

Choose a reason for hiding this comment

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

@lhez would be good to remove the commented-out code in the next round of updates

@max-krasnyansky max-krasnyansky merged commit 52e5d42 into ggml-org:master Nov 16, 2025
72 checks passed
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
* opencl: use subgrroup reduce for reduction in rms_norm_mul

* opencl: add comment about workgroup size
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* opencl: use subgrroup reduce for reduction in rms_norm_mul

* opencl: add comment about workgroup size
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
* opencl: use subgrroup reduce for reduction in rms_norm_mul

* opencl: add comment about workgroup size
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 OpenCL Issues specific to the OpenCL backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants