sycl: *glu flat path - #26354
Merged
Merged
Conversation
perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split.
They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped.
o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
arthw
approved these changes
Jul 31, 2026
arthw
left a comment
Contributor
There was a problem hiding this comment.
It's good job!
With Qwen3.6-27B-UD-Q4_K_XL.gguf on B60, there is still increasing.
| Test | fa | Base t/s | Primary t/s | Increase Rate (Primary vs Base) |
|---|---|---|---|---|
| pp512 | 0 | 190.05 | 190.15 | 0.05% |
| pp512 | 1 | 187.94 | 188.02 | 0.04% |
| tg128 | 0 | 16.98 | 16.98 | 0.00% |
| tg128 | 1 | 16.98 | 16.99 | 0.06% |
Thank you!
Titaniumtown
marked this pull request as ready for review
July 31, 2026 16:26
arthw
approved these changes
Aug 1, 2026
miltos22
pushed a commit
to miltos22/llama.cpp-wackMall-merge-request
that referenced
this pull request
Aug 10, 2026
* tests: add SWIGLU perf cases perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split. * sycl: consolidate fused-GLU kernels They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped. * sycl: contiguous fast path for the fused GLU ops o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 11, 2026
* tests: add SWIGLU perf cases perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split. * sycl: consolidate fused-GLU kernels They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped. * sycl: contiguous fast path for the fused GLU ops o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
satindergrewal
pushed a commit
to satindergrewal/llama.cpp
that referenced
this pull request
Aug 12, 2026
* tests: add SWIGLU perf cases perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split. * sycl: consolidate fused-GLU kernels They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped. * sycl: contiguous fast path for the fused GLU ops o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
huaxel
pushed a commit
to huaxel/CachyLLama
that referenced
this pull request
Aug 12, 2026
* tests: add SWIGLU perf cases perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split. * sycl: consolidate fused-GLU kernels They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped. * sycl: contiguous fast path for the fused GLU ops o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
brittlewis12
pushed a commit
to brittlewis12/llama.cpp
that referenced
this pull request
Aug 17, 2026
* tests: add SWIGLU perf cases perf mode had no GLU coverage. Adds SWIGLU at 17408 columns, 512 and 2048 tokens, f16 and f32, with the operands both fused and split. * sycl: consolidate fused-GLU kernels They differed only in which op_* they called, so take the op as an argument and share a common launcher. Their block sizes were all 256, so launch geometry is unchanged; SYCL_GELU_BLOCK_SIZE and SYCL_SILU_BLOCK_SIZE lose their last users so are dropped. * sycl: contiguous fast path for the fused GLU ops o0 == n and o1 == n collapse the de-interleave index math to the identity, so dispatch a flat kernel in that case. It fires for ggml_glu_split with packed operands; a fused [gate|up] tensor keeps the strided path. test-backend-ops perf -o SWIGLU on an Arc Pro B70: split +14% f16 and +4% f32, fused unchanged.
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.
Overview
Adds a flat path for
*GLUkernels.Also deduplicated shared
*GLUcodepaths to use a newggml_sycl_op_unary_gatedfunction.In addition, I added performance metrics so performance could be measured.
Additional information
I'm not 100% on the terminology used to describe my changes. Please let me know how I could better explain :)
Marking this as a draft for further review and feedback.
Benchmarks
PP perf uplift
On Intel Arc B70:
SWIGLU perf (avg over 3 runs)
On Intel Arc B70:
Requirements