Repository navigation
Conversation
This was referenced Oct 17, 2026
…xpu-prefill-lut-standalone
…xpu-prefill-lut-standalone
main renamed BaseFusedOp.dispatch_forward to _resolve_forward_method and removed GeluTanhAndMulOp, so the prefill LUT checks the renamed resolver and builds its table with sgl_kernel's gelu_tanh_and_mul, the kernel GeluAndMul.forward_xpu runs.
This was referenced Nov 9, 2026
This branch has not been deployed
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.
Gemma4 E2B's 4,096-token XPU prefill chunks spend substantial device time in GELU-and-multiply after their gate/up projections. This adds a Triton activation that looks up the native BF16 GELU result for each BF16 gate value, then multiplies by the up projection with the existing rounding sequence. The original gate/up and down GEMMs remain unchanged.
The Gemma4 integration enables this path for unquantized BF16 E2B at TP1 on B70, for both intermediate widths (6,144 and 12,288), only at 4,096 rows. A single nonpersistent 128 KiB table is initialized after weight loading through the existing native activation and shared by all 35 MLPs. Other shapes, forced activation backends, replaced activation methods, hooks, and unsupported configurations use the original path. No new sgl-kernel-xpu GEMM API is required.
Stacked on #44905 (which builds on #44890). This GELU activation table is separate from that PR's softcap comparison-rank table. Model weights remain BF16 and unchanged.
Validation on Arc Pro B70, Torch 2.13.0+xpu:
Final serving comparison uses unchanged BF16 target and assistant snapshots, the original featureful native wheel, no experimental native-GEMM overlay, and an ABBA sequence (24 uncached samples per workload per block; one output token):
Both candidate blocks beat both controls. Control drift was 0.18–0.19%. Four queued requests execute four 4,096-row prefill chunks. These measurements include HTTP/request handling and measure one-output request latency.
All 16 separate compatibility cases match output IDs, text, and every returned logprob field across all four blocks, including nonempty top-5 logprobs for all 16 output tokens. Canonical c8 decode TPOT was 6.234 / 6.295 / 6.310 / 6.309 ms in ABBA order: candidate mean is 0.49% slower than mean controls, within 1.20% control drift, and 0.10% faster than the final control. All 64 requests per block completed without errors and produced 128 tokens. No decode improvement is claimed.
Draft status: a causal model-quality effect remains unresolved. The following evidence is preserved rather than treating aggregate score differences as a quality pass:
Source is frozen at
ebc9d5476aa68dceae837acf39b85ca25c8bbf0d. Evidence archives, independently verified locally: final source/tests/ABBA540cda67f3025997d61bc8e2b0192dac8d45d9c873e485491021ef09aea366dd(96 files); paired concurrent quality6e6908b4609d4f5ac4e576ebcfeb33e5d5af4f400ac94d031632899f021050c4(34 files); same-input oraclecba522973e782bf4d088b3c7d4990d6c9d5af7f759ee978eca317aaf42c1dd67(19 files); serialized qualitye3efbfb804d5829296c19d59b14b047d5f789e95669242409b3d8365d7bf0ead(30 files); baseline repeat0a0a35dea12a92b7f2950672b7da9461fe12033aa06178c6c8d2382a71186a8b(18 files). No full-feature native GEMM wheel or experimental GEMM API is required by this integration.CI States
Latest PR Test (Base): ❌ Run #42150936992
Latest PR Test (Extra): ❌ Run #42150936885
Latest PR Test (AMD ROCm 10): ❌ Run #42150936931
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: