cuda : add FILL op support#17851
Merged
am17an merged 2 commits intoggml-org:masterfrom Dec 8, 2025
Merged
Conversation
am17an
reviewed
Dec 8, 2025
Contributor
am17an
left a comment
There was a problem hiding this comment.
I'm not sure why this should just not be a cudaMemsetAsync
Contributor
Author
|
@am17an cudaMemsetAsync writes only one byte value repeatedly and dosent interpret floats/doubles. It works for 0.0f but fails for numbers like 1.0f (0x3F800000) as it would write 0x3F to every byte. This kernel writes the full float/double per element, so works for any number. Essentially, byte-wise vs element-wise writing. |
Contributor
|
You need to also enable this kernel via |
am17an
reviewed
Dec 8, 2025
am17an
reviewed
Dec 8, 2025
d22704c to
43f3b5f
Compare
am17an
approved these changes
Dec 8, 2025
43f3b5f to
ae71397
Compare
ae71397 to
179ddb5
Compare
0Marble
pushed a commit
to 0Marble/llama.cpp
that referenced
this pull request
Dec 18, 2025
* cuda : add FILL op support * cuda : add missing FILL op files
Anico2
added a commit
to Anico2/llama.cpp
that referenced
this pull request
Jan 15, 2026
* cuda : add FILL op support * cuda : add missing FILL op files
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 2026
* cuda : add FILL op support * cuda : add missing FILL op files
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* cuda : add FILL op support * cuda : add missing FILL op files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CUDA backend support for the GGML_OP_FILL, which was previously missing (CPU and Vulkan had it). This operation is used by the Qwen3-Next model (discussion in #16623).
Tested with test-backend-ops -o FILL on Tesla T4:
FILL(type=f32,ne=[10,10,4,3],c=0.000000): OK
FILL(type=f32,ne=[303,207,11,3],c=2.000000): OK
FILL(type=f32,ne=[800,600,4,4],c=-152.000000): OK
FILL(type=f32,ne=[2048,512,2,2],c=3.500000): OK
4/4 tests passed