Repository navigation
engine/sglang: upstream patches for FA4 hd256 (SM90) and the sgl-kernel sm_90a build - #226
Conversation
…sgl-kernel sm_90a build Two format-patches on upstream SGLang f6fcda8827 (both also apply to the pin), with a README section linking their upstream status: 0001 (FA4 paged-KV ceil-divide + SM90 test) is the fix in sgl-project/sglang#35757, where the test is offered in a comment; 0002 (sm_90a gencode for common_ops without FA3) is sgl-project/sglang#42263.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: REQUEST CHANGES at 8ea4f03 The patches are right: both are exactly what was posted or offered upstream, and both apply as stated. One sentence in the README says more than the posted #42263 body does. That sentence is the only blocking item. Blocking
Optional
What I checked
On the next head I will check the delta for item 1, any optional items taken, Codex on that head and the pre-commit result. |
Row 0002 now says that common_ops in the inspected aarch64 wheel (sglang-kernel 0.4.8) lacks sm_90a, as the posted sgl-project/sglang#42263 body does, instead of saying all aarch64 wheels carry none. Row 0001 names Qwen3.5-4B, lists the head dims checked, and says sgl-project/sglang#35757 writes the ceil-divide as cute.ceil_div.
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: REQUEST CHANGES at 026ecdd I re-checked only the delta from 8ea4f03: one commit that changes two README rows. My blocker and all four optional items are done as suggested. One new problem: since this head was written, our #35757 comment has been edited (updated 2026-10-02 22:02 UTC), and the new 0001 sentence no longer matches it. Blocking
Re-checked
On the next head I will check the 0001 sentence against the live comment and run Codex. |
Row 0001 now says, as the edited sgl-project/sglang#35757 comment does, that at head_dim 160 and 224 the ceil-divide gets past the compile error but not to correct output.
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…ches # Conflicts: # engine/sglang/README.md
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: APPROVE at 60d6d6b This is a delta review from 026ecdd, my predecessor's last verdict (REQUEST CHANGES on one README sentence). What I re-checked
Optional
|
…es and the upstream patches BF16 (#222, evidence/bf16_paths): the served benchmark read both gross positions as ill-conditioned in BF16. #222 supports that for a4db11ff/333 only. At 579ae7ce/439, the paper's 8.9-nat position, transformers in BF16 keeps FP32's top token in all 16 readings, FP32 under one-rounding noise moves 1756 by at most 0.52 nats, and no single SGLang kernel swap removes the miss: an SGLang outlier at a selected position, whose frequency the unselected positions cannot compare with transformers'. The abstract and §4.5 add "unlike transformers'"; App E.5, the served README (two places) and a new notes subsection give the reading; register entry bf16-paths in both registers. Low-concurrency probes (#220, evidence/speed_lowc): one notes paragraph (split-KV verify dropped by its rule; FA4's head-dim-256 compile failure and backport; one-session served FA4 probes, exactness not classified; fused GDN chain passed its rule but not built), H6, "What did not work", register entry speed-lowc, and the missing index rows. Upstream (#226): one notes paragraph and register entry upstream-patches (the FA4 test as a comment on sgl-project/sglang#35757; the sgl-kernel sm_90a build fix open as sgl-project/sglang#42263). The two FP8 lines say the CUTLASS GEMM "fails" rather than "aborts", consistent with the engine README. Reviewer's optional item from #227: "calls of up to 30-64 positions" in the abstract and §4.5 (largest certified calls at each point). Paid for in §4.5's paragraph with no claim dropped; the main text still ends at the foot of p10.
Adds the session's two upstream SGLang patches as format-patches under
engine/sglang/patches/upstream/, with a section inengine/sglang/README.md. Both are single commits on upstream SGLangmainatf6fcda8827, and both also apply to the paper's pin (git apply --checkonbd66ce343e).0001-fa4-ceil-divide-paged-kv-page-entries-sm90.patch: FA4 paged KV on SM90 at head_dim 256. It ceil-dividespage_entry_per_thread, the hunk from [CuTe] Fix forward dynamic-shape correctness Dao-AILab/flash-attention#2745, and adds an SM90 regression test totest_flash_attention_4.py. Upstream already has the same ceil-divide open in fix: FA4 paged-KV zero-size page-table registers on SM90 sgl-project/sglang#35757 (written there ascute.ceil_div), so this was not opened as a PR. The test and our GH200 confirmation were posted as a comment there.0002-sgl-kernel-build-common-ops-for-sm90a-without-fa3.patch: sgl-kernel's CMake adds the sm_90a gencode forcommon_opsandspatial_opswhenever CUDA >= 12.4, not only when FA3 is built. Opened upstream as sgl-project/sglang#42263, with the same diff on a newermain. The PR body there has the GH200 measurements.The README section describes the patches and links their upstream status. It cites no local evidence: the measurements are in the upstream threads. The patch files are byte-identical to
git format-patchof local commits 4eba651f81 and 8e08130136, both on upstreamf6fcda8827. The commit on sgl-project/sglang#42263 is 6027833579 on upstreammain0098b9d29d: the same patch (git range-diffgives "="). Repository pre-commit passes on the changed files.