[Kernel] Phase 4 (activation): move JIT activation ops into kernels.ops.activation (RFC #29630) - #31694
Closed
BBuf wants to merge 6 commits into
Closed
[Kernel] Phase 4 (activation): move JIT activation ops into kernels.ops.activation (RFC #29630)#31694BBuf wants to merge 6 commits into
BBuf wants to merge 6 commits into
Conversation
…jit (RFC sgl-project#29630) Relocates the shared JIT build/runtime infrastructure (compile pipeline, arch detection, deps, common utils) from sglang.jit_kernel.utils to an internal sglang.kernels._jit package. Behavior unchanged: - KERNEL_PATH already resolves via find_spec('sglang.jit_kernel'), so csrc/ and include/ (the per-op C++ sources + shared headers) and every JIT operator stay in sglang.jit_kernel; the build root is unaffected. - ~90 'sglang.jit_kernel.utils' import sites rewritten to 'sglang.kernels._jit'. - __main__ build CLI stays at sglang.jit_kernel (invocation unchanged). Operators are not touched here; they migrate group-by-group in Phase 4. Namespace import stays metadata-only (invariant CLEAN); 68 kernels tests pass; lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
BBuf
requested review from
Fridge003,
Qiaolin-Yu,
hebiao064,
hnyls2002,
ispobock,
kpham-sgl and
merrymercy
as code owners
July 19, 2026 03:48
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
BBuf
requested review from
DarkSharpness,
Edwardf0t1,
HaiShaw,
HydraQYH,
Ying1123,
celve,
ch-wan,
mickqian,
yingluosanqian and
yuan-luo
as code owners
July 19, 2026 03:48
| import torch | ||
|
|
||
| from sglang.jit_kernel.utils import cache_once | ||
| from sglang.kernels._jit import cache_once |
Collaborator
There was a problem hiding this comment.
Is _jit a good naming? I'd prefer .jit. names start with _ really looks like something private (only relative import).
…ps.activation (RFC sgl-project#29630) sglang.jit_kernel.activation -> sglang.kernels.ops.activation._jit_activation; group forward_jit (gated acts + relu2) now imports the local module. Compat shim at the old path re-exports everything (removed in Phase 5). csrc stays in sglang.jit_kernel. Stacked on sgl-project#31666. Invariant CLEAN; 68 tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
BBuf
force-pushed
the
bbuf/kernels-phase4-activation
branch
from
July 21, 2026 13:09
175e37f to
5bfefd5
Compare
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
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.
RFC #29630 Phase 4 for activation (stacked on #31666).
sglang.jit_kernel.activation→sglang.kernels.ops.activation._jit_activation; groupforward_jit(gated acts + relu2) imports the local module. Compat shim re-exports everything (Phase 4 step 8; removed Phase 5). csrc stays in jit_kernel. Invariant CLEAN; 68 CPU tests pass; lint clean.🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ⏳ Run #29840561304
Latest PR Test (Extra): ⏳ Run #29840560510