Repository navigation
[Kernel] Move CUDA and ROCm speculative kernels to JIT - #40033
Merged
Merged
Conversation
hnyls2002
requested review from
BBuf,
DarkSharpness,
FlamingoPg,
Fridge003,
HaiShaw,
HydraQYH,
Kangyan-Zhou,
Qiaolin-Yu,
Ying1123,
bingxche,
celve,
ispobock,
kpham-sgl,
merrymercy,
yizhang2077 and
yuan-luo
as code owners
September 17, 2026 22:40
Collaborator
Author
|
/tag-and-rerun-ci |
Collaborator
Author
|
/rerun-test test_eagle_utils.py test_ngram_utils.py test_speculative_sampling.py |
Contributor
|
Results for 🚀 |
Contributor
|
Results for 🚀 |
Contributor
|
Results for 🚀 |
# Conflicts: # test/registered/kernels/ops/speculative/test_eagle_utils.py # test/registered/kernels/ops/speculative/test_ngram_utils.py # test/registered/kernels/ops/speculative/test_speculative_sampling.py
Contributor
|
Results for 🚀 |
5 tasks done
This was referenced Sep 18, 2026
4 of 5 tasks
Merged
5 tasks
4 of 5 tasks
3 of 5 tasks
yeahdongcn
added a commit
to yeahdongcn/sglang
that referenced
this pull request
Nov 17, 2026
… MUSA FlashInfer API The AOT MUSA wheel has been failing since sgl-project#40033 turned the AOT speculative header into an include of the JIT one: jit/include/sgl_kernel/speculative/sampling.cuh:156:5: error: no matching function for call to 'DeviceSamplingFromProb' flashinfer/sampling.cuh:602:3: note: candidate function not viable: requires 7 arguments, but 8 were provided The JIT header tracks the newer FlashInfer API, where the fallback index is thread-local and `DeviceSamplingFromProb` takes it as an extra argument. The MUSA build compiles the same header against the revision `setup_musa.py` pins (`bc29697`), where that index lives in `temp_storage` and the call takes seven arguments. `USE_MUSA` is defined by `setup_musa.py` only, so the guard keeps the CUDA and JIT compilations on the eight-argument call and gives the AOT MUSA build the seven-argument one. Nothing else in the kernel changes, including the accept rule sgl-project#40033 fixed.
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.
Routes the EAGLE tree, greedy verify, ngram reconstruction, and target-only sampling kernels through
sglang.kernels.ops.speculative(JIT) on CUDA and ROCm, with the device kernels shared as headers so the MUSA AOT build keeps using the same source. No functional change: every device kernel is byte-identical to main modulo whitespace.CI States
Latest PR Test (Base): 🚫 Run #35289016252
Latest PR Test (Extra): ❌ Run #35289016113
Latest PR Test (AMD ROCm 10): ❌ Run #35289016194