Repository navigation
[Chore] [NVIDIA] deps: Bump FlashInfer to 0.7.3 and migrate the NVLink one-sided all-to-all to flashinfer.moe_ep - #48468
Merged
Conversation
trevor-m
approved these changes
Nov 4, 2026
Fridge003
marked this pull request as ready for review
November 4, 2026 23:36
Fridge003
requested review from
BBuf,
CatherineSue,
Edwardf0t1,
Fridge003,
HaiShaw,
JustinTong0323,
Ying1123,
ch-wan,
ishandhanani,
ispobock,
merrymercy,
slin1237,
sogalin and
yctseng0211
as code owners
November 4, 2026 23:36
This comment has been minimized.
This comment has been minimized.
5 tasks
…FromProb FlashInfer 0.7.3 (flashinfer-ai/flashinfer#5352) added an int& last_valid_index parameter to flashinfer::sampling::DeviceSamplingFromProb, so the JIT tree speculative sampling kernel no longer compiled and EAGLE verify crashed the scheduler. Keep the per-thread candidate across the scan, as FlashInfer's own chain speculative sampling kernel now does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
leejnau
requested review from
DarkSharpness,
HydraQYH,
celve and
yuan-luo
as code owners
November 5, 2026 01:12
…e-ep Co-Authored-By: Claude Opus 5.5 <[email protected]>
4 of 5 tasks
…e-ep # Conflicts: # python/sglang/kernels/ops/moe/moe_finalize_fuse_shared.py
Collaborator
This was referenced Nov 7, 2026
This was referenced Nov 7, 2026
4 of 5 tasks
3 tasks done
4 tasks done
tohaowu
added a commit
to tohaowu/sglang
that referenced
this pull request
Nov 11, 2026
…lm_mla decode FlashInfer changed trtllm_batch_decode_with_kv_cache_mla to default to backend="auto", which constructs every candidate backend runner, sizes CuTe-DSL workspaces, and queries AutoTuner.choose_one on each eager decode call. FlashInfer 0.7.3 (pinned in sgl-project#48468) also removed the legacy private runner classes used by the earlier tactic-cache prototype. Remove the obsolete private-runner cache and pass backend="trtllm-gen" explicitly from TRTLLMMLABackend._run_decode_kernel when self.backend == "trtllm-gen" on SM10x outside trtllm-gen's (64, 128) head-count hole, keeping FlashInfer's "auto" fallback for SM12x XQA and 64 < H < 128. Signed-off-by: Hao Wu <[email protected]>
detain
added a commit
to detain/sglang
that referenced
this pull request
Nov 11, 2026
…nd the flashinfer wheel/floor pairing REVERTED to the fork's 0.7.2 Found by the damage batteries + the entry-228 pairing rule (not in the conflict set -- silent auto-merge cargo): - upstream sgl-project#48468 bumped flashinfer floor pyproject==0.7.3 + engine.py assert 0.7.3 as a clean hunk. Prod venv ships the 0.7.2 wheel (READ-ONLY here); assert_pkg_version is MIN-version semantics -> boot dies. BOTH lines flipped back to 0.7.2 with a TODO(merge6) zone=b6 marker recording the paired adoption path (wheel first, then pin+assert together). - sgl-deep-gemm (venv 0.2.3.post2 vs tree ==0.2.7) and sgl-flash-mla (venv 1.0.0 vs ==1.0.4): upstream pins TAKEN (no recorded fork pairing; no boot asserts gate them) + OPERATOR-OWED WHEEL CHECK markers zone=b6. - test_scheduler_hybrid_ssm_admission_retry / test_scheduler_running_batch_ finished: DisaggregationMode import retargeted to upstream's new disaggregation/mode.py home. - test_ngram_mamba_verify_update: mock target retargeted to layers.dp_attention.get_eager_max_batch_size (upstream moved the helper out of utils/common during the module prune). - qwen3_moe.py: merged the grafted get_mixed_precision_moe_quant_algos import into the existing configs.quant_utils import. Marker census after this commit: 125 = b1 12 / b2 23 / b3 18 / b4 39 / b5 17 / b6 16. Gates: py_compile + ruff (F401,F821,F823,UP037) + ruff format clean on all touched files; batteries re-run post-change (managers/spec totals unchanged -- the blake3 env class masks these fixes until the wheel lands).
detain
added a commit
to detain/sglang
that referenced
this pull request
Nov 11, 2026
…server_args field-order markers, C2's own file) -- WHEEL PAIRING RESOLVED AS VERIFICATION + TWO TREE-SIDE REVERTS TO VENV TRUTH pairing matrix (tree pin | venv | verdict): flashinfer_python[cu13]==0.7.2 | 0.7.2 | MATCH -- engine assert 0.7.2 matches too, sgl-project#48468's 0.7.3 stays HELD (entry-228 rule: wheel+floor move together; docker/Dockerfile* FLASHINFER_VERSION=0.7.3 leaked in with the window -> REVERTED to 0.7.2 to honor pyproject's own "keep aligned with Dockerfile" comment). sglang-kernel==0.4.10 | 0.4.10 | MATCH, engine floor 0.4.9 <= installed (floor-assert is a floor, not a pin). blake3>=1.0.0 | 1.0.11 | SATISFIED (sgl-project#47120 dep). torch==2.14.1 | 2.14.1 | MATCH. nvidia-cutlass-dsl[cu13]==4.8.0 | 4.8.0 | MATCH (b12x >=4.6.0 requirement satisfied). triton: unpinned in pyproject | 3.8.0 | n/a. drift pair REVERTED TO VENV (live-tree law: fix tree, never venv; era base 2d87757 -- the FIRST POST-MERGE PROD BOOT 321 -- pinned exactly the venv versions and the check_dockerfile_wheel_pins gate passed at the base): sgl-deep-gemm 0.2.7->0.2.3.post2 (pyproject + Dockerfile.cu134 DEEPGEMM_REF/SGL_DEEP_GEMM_VERSION), sgl-flash-mla 1.0.4->1.0.0 (pyproject; builder Dockerfile sources-only, no version to move). reachability evidence (deep-reconcile obligation): both wheels import on the live path (SGLANG_ENABLE_JIT_DEEPGEMM default True; SM120 configurer probe fp8_einsum/m_grouped_fp8_fp4_gemm_nt_contiguous/transform_sf_into_required_layout ALL PRESENT in 0.2.3.post2). Every window-grown API the tree touches that 0.2.3.post2/1.0.0 LACK is guarded or arch-inert: get/set_compile_mode behind hasattr (compile_utils.py:252); sparse_decode_num_sm_parts behind supports_native_heads (flash_mla_interface.py:41-44); tf32_hc_prenorm_gemm_dual only on current_arch().is_sm(10) (mhc.py:2772, SM100 -- ours is SM120) inside the dsv4-only mhc sinkhorn route; deep_gemm.localize inside the dsv4 mega_moe weight-localize block. Residual symbol sweep vs the installed wheels: zero ungated misses. non-wheel markers: exec_.py b12x FP8-GEMM help clause RE-PLANTED (choice exists in choices.py since the entry-316 port; help silently lost it); memory.py fast_file descriptor RE-PLANTED (+ server_arguments.mdx row, keeps the new npu_memcache/tensorcast/seaweedfs entries); exec_.py PLE-staging help + server_arguments.mdx PLE row = OBSOLETE-CONSUMED (upstream rewrote the mechanism to direct pageable reads, qwen4_exp_ple_table.py:17-19 documents it, the staging/limits prose describes a removed path); hicache_best_practices.mdx DUAL block = SUPERSEDED-CONSUMED (current text matches the file_storage_path config generation, fast_file_store.py:22); model_hook.py Gemma4: fork flashinfer acceptance RE-HOMED into gemma4_attention_backends() exactly as the marker prescribed (_BUILTIN_ATTENTION_BACKENDS += "flashinfer"; contested-message marker consumed -- the f-string now interpolates the helper, so no stale list can rot); sampling_params.mdx n-bound row = the sgl-project#44047 env-bounded doc, already correct, consumed (its contract is C3's anchor); engine.py pairing marker converted to the durable VERIFIED note; pyproject flashinfer marker likewise. gates: ruff repo ruleset + format clean on all 5 touched .py; check_registered_tests / check_no_registered_tests_in_package / check_no_bare_pytest_main / check_opt_in_ci_tiers / check_dockerfile_wheel_pins ALL rc=0 (the wheel-pin gate was BROKEN by the window's 0.2.7 landing and is GREEN again only because of the revert).
detain
added a commit
to detain/sglang
that referenced
this pull request
Nov 11, 2026
…ckerfile re-applied upstream's sgl-project#48468 form Reverts the flashinfer half of dea2641's entry-228 hold, restoring the exact upstream dc4b17b (sgl-project#48468) form at all four sites it flipped (verified byte-for-byte against eb73a50; engine.py post-image blob 4b0ec5b is the pre-revert blob): - python/pyproject.toml:41 flashinfer_python[cu13]==0.7.3 - engine.py assert_pkg_version floor 0.7.3 (MIN semantics proven: utils/common.py assert raises iff installed < min) - docker/Dockerfile + Dockerfile.cu134 ARG FLASHINFER_VERSION=0.7.3 WHY NOW: the canary boot of era tip proved the JIT tension real -- the merge took sgl-project#48468's 8-arg DeviceSamplingFromProb call (last_valid_index) into kernels/jit/include/sgl_kernel/speculative/sampling.cuh but held the wheels at 0.7.2, so the first sampled traffic died compiling against the 0.7.2 flashinfer/sampling.cuh header. The fix direction is header-version ADOPTION (upstream pairs this .cuh with 0.7.3 in the same commit), not a fork patch reverting the .cuh. Entry 323's hold note ("adopt = WHEEL-FIRST-THEN-PIN") is discharged by this commit ON THE TREE SIDE ONLY. WHEEL PENDING OPERATOR INSTALL -- DO NOT BOOT EITHER ARM OFF THIS COMMIT BEFORE flashinfer 0.7.3 IS IN THE VENV. Booting this tree on the 0.7.2 wheel now fails LOUDLY at startup (engine assert) instead of at first sampled traffic (JIT) -- strictly earlier, strictly clearer. Gates: check_dockerfile_wheel_pins rc=0 (no flashinfer expectation in it -- covers sgl-deep-gemm/sgl-deep-ep only), check_opt_in_ci_tiers / check_no_bare_pytest_main / check_registered_tests / check_rust_ext_cache_ prefix rc=0, py_compile + ruff (F401,F821,F823,UP037) + ruff format clean on engine.py. 21-arg plan() tail (fast_prefill_plan fixed_uniform_q_len) ALREADY CARRIED -- era tree hunk identical to upstream, no fix commit needed. Remaining soft 0.7.2 mentions left per deep-reconcile: the muse_spark/MiniMax-H3 cookbook wheel pins (upstream itself still 0.7.2 there -- sgl-project#48468 missed it) and fork comment/advisory-text only.
2 of 5 tasks
4 of 5 tasks
5 tasks done
2 of 5 tasks
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.
Motivation
This PR bumps FlashInfer to 0.7.3. It also brings in @trevor-m's migration of the NVLink one-sided all-to-all to
flashinfer.moe_epfrom #46885, because neither change can land without the other:flashinfer.comm.MoeAlltoAllandmoe_a2a_get_workspace_size_per_rank, which the currentFlashinferDispatcheruses (feat(moe_ep)!: sync NVLinkOneSidedAlltoAll with TensorRT-LLM's kernels; remove the deprecated MoeAlltoAll/MnnvlMoe flashinfer-ai/flashinfer#6047, [Feature] support add custom middlewares #6621).runtime_max_tokens_per_ranktoflashinfer.moe_ep, and that argument only exists from 0.7.3. In 0.7.2 it ismax_tokens_per_rank.#46926 (0.7.2.post1) stays open for now as a fallback.
Depends on
deepseek_v4_trtllm_backend.pypatchesflashinfer.mla._core._get_trtllm_gen_multi_ctas_kv_counter_buffer. 0.7.3 no longer has that name, so--dsv4-attn-backend trtllmfails at init. [Fix] [NVIDIA] deepseek-v4: Pass a caller-owned multi-CTA counter buffer to the trtllm sparse MLA kernel #48467 works on 0.7.2 and 0.7.3, so it can merge first.Modifications
NVLinkOneSidedAllToAllto theflashinfer.moe_epAPI.runtime_max_tokens_per_rankin dispatch.last_valid_indexargument toflashinfer::sampling::DeviceSamplingFromProbin SGLang's JIT tree speculative-sampling kernel (sgl_kernel/speculative/sampling.cuh). perf(sampling): defer last-valid-index reduction until fallback flashinfer-ai/flashinfer#5352 (in 0.7.3) added that parameter. Without this change the kernel fails to compile, and the first EAGLE verify step crashes the scheduler. The change mirrors FlashInfer's own chain speculative-sampling kernel, and it only compiles against 0.7.3 headers, so it has to land with the bump.fixed_uniform_q_lenargument in the FlashInfer backend'sfast_prefill_plan. FlashInfer 0.7.3's FA2 paged-prefillplan()takes 21 arguments instead of 20. The fast plan also clears_eagle_verify_fp8kv_sm90_state, as FlashInfer's ownplan()now does on every call.amax != 0tosf != 0).--enable-deterministic-inference, the pre-routed NVFP4 trtllm MoE path now calls FlashInfer withdo_finalize=Falseand sums the outputs with SGLang'smoe_finalize_fuse_shared, which uses one order at every batch size.moe_finalize_fuse_sharedgains anout=argument so the sum lands in the usual output buffer. Nothing changes outside deterministic mode. Remove this once [Bugfix] Fixing the bug when max_new_tokens is None. #8831 is fixed in a FlashInfer release.docker/Dockerfile,docker/Dockerfile.cu134,python/pyproject.tomland theengine.pyversion check.0.7.3 requires
nvidia-cutlass-dsl[cu13]>=4.8.0, and SGLang already pins 4.8.0.Tests
CI. The first run is expected to hit the cold SGLang JIT cache in the jit-kernel suite, as on earlier FlashInfer bumps.
On GB200, [Fix] [NVIDIA] deepseek-v4: Pass a caller-owned multi-CTA counter buffer to the trtllm sparse MLA kernel #48467's DeepSeek-V4 trtllm prefill test passes on 0.7.3 with the fix, and fails without it.
On GB200 with FlashInfer 0.7.3,
test/registered/kernels/ops/speculative/test_speculative_sampling.pypasses (11 passed).TestInklingSmallNvfp4DsparkDeterministic.test_input_output_logprobs_match(KL threshold 1e-9) on GB200, with the test's--tpchanged from 4 to 2 (GB200 at TP=4 fails even on main with 0.7.2):@trevor-m validated the
moe_epmigration on 0.7.3 on 4×GB200 (see [Chore] flashinfer: Use flashinfer moe-ep API instead of deprecated NVLinkOneSidedAllToAll API #46885): GSM8K 96%, andtest_flashinfer_a2a_wide_ep.py,test_flashinfer_dispatcher.pyandtest_muse_spark_runner_dispatch.pypassed.End-to-end on one 4×GB200 node: DeepSeek-V4-Flash with the cookbook's verified GB200 low-latency recipe (TP=4,
flashinfer_mxfp4MoE, EAGLE with 3 steps and 4 draft tokens) plus--dsv4-attn-backend trtllm, imagelmsysorg/sglang:dev(arm64). Full GSM8K (1319 questions) through sgl-eval 0.1.3 at temperature 1.0 and top_p 1.0, the cookbook's recommended sampling:Before the speculative-sampling fix, the 0.7.3 run scored 0%, because every request failed when the scheduler crashed on the JIT build error.
🤖 Generated with Claude Code
CI States
Latest PR Test (Base): ⏳ Run #42263377649
Latest PR Test (Extra): ⏳ Run #42263377799
Latest PR Test (AMD ROCm 10): ⏳ Run #42263377681
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: