Skip to content

[Perf] DeepSeek-V4: Fuse inverse RoPE into wo_a FP8 quantization - #43786

Merged
BBuf merged 10 commits into
sgl-project:mainfrom
Phoenix3334:perf/dsv4-inverse-rope-fp8-quant
Nov 4, 2026
Merged

BBuf merged 10 commits into
sgl-project:mainfrom
Phoenix3334:perf/dsv4-inverse-rope-fp8-quant

Conversation

@Phoenix3334

@Phoenix3334 Phoenix3334 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fuse inverse RoPE into CUDA UE8M0 FP8 wo_a activation quantization for DeepSeek-V4. Previously a separate inverse-RoPE kernel wrote rotated BF16 activations to memory before quantization read them again. The fused kernel avoids that intermediate round-trip and launch.

Changes

  • Apply inverse RoPE to the last 64 dimensions of each 512-dimensional head inside activation quantization.
  • Preserve the intermediate BF16 rounding boundary, native packed-int32 UE8M0 scales, and PDL dependencies.
  • Share fused/unfused quantization and host-validation logic; cache configuration-derived eligibility while retaining runtime guards and fallbacks.
  • Reuse SGLANG_OPT_FP8_WO_A_FUSED_INVROPE (opt-in, off by default). This covers the CUDA FP8 path; it complements, but is not additive with, the separate BF16 wo_a fusion.

Validation

  • Final upstream-side kernel validation: B200 CI ran test_fp8_wo_a.py, 7/7 passed, including FP8 code/packed-scale numerical equivalence and CUDA Graph capture/replay with updated inputs. Hosted lint passed.
  • Historical 8×B300 local backport (aiopt v0.5.21): TP8/DP8, DeepSeek-V4-Pro, 60k input/1 output, C16/N160, three seeds on one server per arm: average input TPS ~101,710 → ~103,349 (+1.61%); mean of per-run median TTFT ~9.600 → ~9.452 s (-1.54%).
  • Earlier numerical, greedy-smoke and shape checks are preserved below with their original build/version scopes.

Scope and limitations

Do not attribute the historical +1.61% result to the final merged implementation. The local performance experiment predates the code cleanup/refactor; post-refactor full-model serving, accuracy and throughput were not independently remeasured. One earlier baseline startup also differed on one greedy probe; later comparisons matched, but the original discrepancy remains unexplained. Kernel correctness/Graph Replay ≠ end-to-end serving correctness or performance.

Related: ROCm fusion #37658, BF16 fusion #39957.

Historical experiment matrices, CI runs and investigation notes (original PR body)

Archive notice: The sections below preserve the original investigation record, including earlier intermediate findings and CI statuses. The concise summary above states the final interpretation and validation boundaries.


Motivation

DeepSeek-V4 applies inverse RoPE to attention output before the wo_a projection. The CUDA UE8M0 FP8 path currently launches inverse RoPE separately, writes rotated BF16 values to memory, and reloads them for activation quantization.

This PR folds inverse RoPE into the wo_a quantization kernel, keeping rotated values in registers and preserving the intermediate BF16 rounding boundary. It complements #39957, which fuses inverse RoPE with a small-batch BF16 wo_a projection. This PR instead quantizes the activation before the FP8 wo_a DeepGEMM path.

#37658 introduced the analogous inverse-RoPE + FP8 input-quantization optimization on ROCm/aiter and the existing SGLANG_OPT_FP8_WO_A_FUSED_INVROPE flag. This PR extends that flag to the CUDA UE8M0 path. The BF16 and FP8 wo_a gates are mutually exclusive, so their reported speedups are not additive.

Modifications

  • Fuse inverse RoPE into the CUDA wo_a activation quantization kernel, rotating the last 64 dimensions of each 512-dimensional head.
  • Preserve BF16 rounding before quantization, native packed-int32 UE8M0 scale storage and PDL dependencies.
  • Issue position/frequency loads early and vectorize frequency loads; keep the selected launch configuration.
  • Share the quantization / packed-scale epilogue and host tensor validation between fused and unfused kernels; reuse Python output allocation.
  • Cache configuration-derived eligibility in MQALayer.__init__; check graph state, pre-applied inverse RoPE and current tensor properties at execution time.
  • Reuse SGLANG_OPT_FP8_WO_A_FUSED_INVROPE, off by default, with existing fallbacks.
  • Add only two focused GPU tests to the existing test file: production numerical equivalence and CUDA Graph replay with updated inputs. An existing CPU fixture that bypasses initialization receives the new attribute's default.

Accuracy Tests

Current-head upstream kernel validation (2026-11-02)

PR head: fb4e80ea8474e8fdb7aab692119202f4834a424c. CI checked out merge 5da168b82470b256b49f494dc27ceb991c4399c1, combining this head with upstream main 1599b166ac856f4fd192feb2c16304fae7860a72.

The B200 kernel job executed test/registered/kernels/ops/quantization/test_fp8_wo_a.py: all 7 tests passed.

[CI Test Method] TestDeepSeekV4FP8WoA.test_fused_inverse_rope_quant_cuda_graph
[CI Test Method] TestDeepSeekV4FP8WoA.test_fused_inverse_rope_quant_matches_production
.......
Ran 7 tests in 12.830s
OK

The runner summary also records this file as "passed": true (elapsed: 23 seconds for the file subprocess, distinct from unittest's 12.830 seconds). This covers both new tests—production-path numerical equivalence for FP8 codes and packed scales, and CUDA Graph capture/replay with updated inputs—alongside the existing quantization-path tests. Hosted Lint also passed on this head.

These are kernel correctness and graph-replay results for the current head. They do not establish full-model serving accuracy, bitwise-equal serving logits, or post-refactor performance gains. Full-model serving and performance validation after the refactor remain pending.

Historical local GPU validation (B300, aiopt v0.5.21)

Local GPU validation uses aiopt v0.5.21 on 8×B300. It shares upstream's packed-int32 UE8M0 contract. On that backport:

  • Both new tests passed: strided BF16 inputs, T ∈ {0,1,32,100,777,2047,8192,8193}, G ∈ {2,16}, FP8 codes, packed scales and strides; graph capture/replay with updated input.
  • Serving startup completed decode CUDA Graph capture.
  • Five greedy prompts, up to 64 generated tokens each: two additional independent baseline startups matched each other and the fused run on all returned texts.
  • The first baseline startup differed on one prompt. Subsequent comparisons matched; the cause remains unresolved. Returned-text equality does not establish bitwise-equal logits or internal serving tensors.

These local GPU results predate cleanup commit 7c5d3eb7ce. That commit shares the quantization code and caches eligibility. Subsequent main-based B200 kernel validation is documented below; full-model serving validation after the refactor remains pending. No full model accuracy evaluation is claimed.

Local checks on the cleanup: Python syntax, Ruff, isort and clang-format passed. An exhaustive static eligibility comparison matched the previous predicate for configurations with attention output width equal to the configured head dimension.

Source preparation and current head (2026-11-02)

The branch was originally rebased onto main c757c4bb7c55d1eb69fdb2bdc6e6fb8507acb7a0 and subsequently updated by merging main. The current head is fb4e80ea8474e8fdb7aab692119202f4834a424c, with upstream main 1599b166ac856f4fd192feb2c16304fae7860a72 incorporated.

The quantization helper and kernel tests follow upstream's ops/quantization paths, with imports updated accordingly. The shared host validation retains upstream's kDLGPU device definition. Repository-pinned pre-commit checks on the six changed files, Python syntax checks and git diff --check passed during the earlier rebase preparation. Current-head hosted Lint and B200 kernel results are documented above. Full-model serving and performance validation after the cleanup/rebase remain pending; the historical performance results below are not measurements of this current head.

Upstream CI and DCP fixture correction (2026-11-01)

At 38c39bddb75b4b53fdcc1fd2d791307f4f973fdc (via CI merge 769fc5fcce14), B200 CI executed test/registered/kernels/ops/quantization/test_fp8_wo_a.py: 7 tests passed (Ran 7 tests in 11.821s; OK). This includes production-path numerical equivalence, CUDA Graph replay, and the existing quantization-path tests. These are main-based kernel correctness results; they do not revalidate the historical performance gains or full-model serving behavior.

That run's CPU failure was the independent DCP replay fixture missing skips_prefill_metadata_on_idle_dp_rank. The test file was identical in the PR head and its main base (Git blob ef5beb976949ec8fb56be440812c166c5e2b2177).

Follow-up commit 289c324 carries the one-line test-fixture correction from mickqian's #47736 (source commit be43d568ca8115e173bd4b9f5d106a3060ae1f8b): set skips_prefill_metadata_on_idle_dp_rank=False on the mocked backend. The corrected file matches that source exactly. No production kernel/model code or B200 tests changed after the passing run. The subsequent CI run was stopped by the independent decode-queue fixture failure described below.

Decode-queue scheduler fixture correction (2026-11-01)

The next CPU run stopped in test_decode_queue_cleanup.py::TestHeldDestinationPublication::test_publishes_while_retracted_requests_wait: its mocked scheduler lacks tree_cache, which process_decode_queue now reads even with HiCache disabled. Both the failing test and disaggregation/decode.py are identical between that CI merge (632c7f4) and its actual upstream main parent (e298298), so this is a second independent baseline fixture issue. That shard stopped before executing its scheduled DCP test.

Commit fddd180 carries the one-line correction from DarkSharpness's #47758 (source 44b1e4b35608c8e388b1d16dc86ceec34514bcc3): tree_cache=SimpleNamespace(linker=None). It models the no-linker-offload case while preserving the existing metadata-publication assertion. No test is skipped and no assertion is removed.

The corrected file matches #47758 exactly. All applicable pre-commit hooks passed locally on that file. The source PR's targeted CPU run passed 12 tests at its own source head; this is separate from validation of our updated head. CI on the earlier head fddd180 was triggered but stopped at the per-user 120-minute cooldown gate before tests executed. The logged previous accepted trigger is 2026-11-01 14:28:02 UTC, so the earliest retry under that cooldown is 16:28:02 UTC / 2026-11-02 00:28:02 UTC+8. Production code and B200 tests remain unchanged from the previous passing B200 run. After the cooldown expired, empty commit ddcabbe triggered another historical CI run on 2026-11-02. It has since been superseded by the main merges leading to fb4e80e; see the current-head validation above.

Non-main adaptation

The backport omits and inv_rope is None because v0.5.21 lacks that local variable. Main defines it, so this PR retains the guard to avoid double rotation. Local full-model serving validation is on the available aiopt build; the current main-based head has the hosted B200 kernel coverage documented above. Full-model serving validation on that head remains pending.

Speed Tests and Profiling

B300 ×8, DeepSeek-V4-Pro, aiopt v0.5.21, TP8/DP8, MegaMoE, 60k input / 1 output, C16, N160, seeds 1/2/3. Radix cache disabled; prefill-delayer enabled. aiakperf uses random token IDs through the sglang runner, so this benchmark does not measure real-text tokenization throughput.

Arm Mean input tok/s Mean of per-run median TTFT (s)
Baseline ~101,710 ~9.600
Fused ~103,349 ~9.452
Change ~+1.61% ~-1.54%

Each arm used one fresh server startup and three seed runs; fused preceded baseline. These are not three independent paired startups. Fused per-seed throughput: 103,476.7 / 103,283.0 / 103,287.0 tok/s; TTFT: 9.4312 / 9.4523 / 9.4514 s. Baseline raw per-run values and exact dependency/image identifiers are not included in this summary.

These measurements predate the cleanup commit and remain evidence for the preceding implementation; performance after the refactor needs confirmation. Cross-build absolute throughput is not attributed to fusion. No v0.5.21 multi-shape sweep is claimed.

Prior v0.5.17-derived B300 evidence

B300, DeepSeek-V4-Pro, TP8 / DP8, MegaMoE, prefill-dominated workload (output length 1). Each working point is the mean of 3 runs per arm.

Input Concurrency Baseline input tok/s Fused input tok/s Throughput Δ Median TTFT Δ
60k 1 13,645.6 14,008.5 +2.66% -2.46%
60k 4 29,141.7 29,654.1 +1.76% -1.33%
60k 8 93,473.0 95,009.7 +1.64% -1.54%
60k 16 94,417.6 95,957.4 +1.63% -1.61%
60k 32 94,109.7 95,681.6 +1.67% -1.64%
128k 1 12,772.5 13,057.1 +2.23% -2.19%
128k 4 28,541.0 28,876.1 +1.17% -1.12%
128k 8 88,822.6 90,188.2 +1.54% -1.49%

The earlier build reported positive throughput deltas in 24/24 paired comparisons and 48 runs without CUDA errors. Its numerical tests reported identical FP8 codes and scales, and its greedy decode comparison produced identical tokens. The upstream port changes the scale storage contract and must be revalidated independently.

Reproduction: tests, server, greedy probe and benchmark

Apply the PR changes to the build, with the non-main inv_rope adaptation above. Use the same model weights, dependencies and launch parameters for both arms. The fusion flag is fixed for each server startup. Run the three seeds on one server per arm, then restart with the other flag. The recorded run order was fused first, baseline second.

Kernel tests

python3 -m pytest -s test/registered/kernels/ops/quantization/test_fp8_wo_a.py \
    -k "fused_inverse_rope"

The numerical test covers T ∈ {0, 1, 32, 100, 777, 2047, 8192, 8193}, G ∈ {2, 16}, BF16 strided inputs, FP8 codes, packed scales and output strides. The graph test captures and replays with updated inputs.

Server launch

Set MODEL_PATH to the local DeepSeek-V4-Pro weights. Run separately with FLAG=1 (fused) and FLAG=0 (baseline).

MODEL_PATH=/path/to/DeepSeek-V4-Pro
FLAG=1
export SGLANG_OPT_FP8_WO_A_FUSED_INVROPE="$FLAG"
export SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK=8320

python3 -m sglang.launch_server \
    --trust-remote-code \
    --model-path "$MODEL_PATH" \
    --tp-size 8 --dp 8 --enable-dp-attention --enable-dp-lm-head \
    --load-balance-method round_robin --moe-a2a-backend megamoe \
    --disable-radix-cache --mem-fraction-static 0.835 \
    --swa-full-tokens-ratio 0.075 --chunked-prefill-size 65536 \
    --tokenizer-worker-num 32 --detokenizer-worker-num 32 \
    --enable-prefill-delayer --dist-init-addr 127.0.0.1:9500 \
    --host 0.0.0.0 --port 30000

Wait for inference readiness before sending probes. Stop all workers belonging to this server and verify its ports/GPU allocations have been released before starting the next arm.

Greedy serving probe

Run once per startup, setting a distinct ACC_OUT filename; compare the returned texts across saved files.

ACC_OUT=acc_fused.json python3 - <<'PY'
import json
import os
import urllib.request

prompts = [
    "Explain in detail how a transformer neural network works, step by step.",
    "Write a Python function that returns the n-th Fibonacci number and explain it.",
    "What are the main causes of the French Revolution? Give a structured answer.",
    "Describe the process of photosynthesis and why it matters for life on Earth.",
    "Summarize the plot of Romeo and Juliet and its central themes.",
]
outputs = {}
for i, prompt in enumerate(prompts):
    payload = json.dumps({
        "text": prompt,
        "sampling_params": {"max_new_tokens": 64, "temperature": 0.0},
    }).encode()
    request = urllib.request.Request(
        "http://127.0.0.1:30000/generate",
        data=payload,
        headers={"Content-Type": "application/json"},
    )
    with urllib.request.urlopen(request, timeout=600) as response:
        outputs[str(i)] = json.loads(response.read())["text"]
with open(os.environ["ACC_OUT"], "w") as output:
    json.dump(outputs, output, ensure_ascii=False, indent=2)
PY

Prefill benchmark

Use the same MODEL_PATH and FLAG as the running server. For SEED=1, 2, 3, run the following warmup then formal commands, ensuring no warmup requests remain in flight before the formal measurement. Use separate output directories per arm/seed.

SEED=1  # repeat with 2 and 3
OUT="logs/flag${FLAG}_seed${SEED}"

aiakperf -a http://127.0.0.1:30000 -r sglang \
    -m "$MODEL_PATH" -M "$MODEL_PATH" \
    -d random -if 60000 -of 1 -n 16 -w 16 \
    -seed "$((SEED + 10000))" -igr true -o "$OUT/warmup"

aiakperf -a http://127.0.0.1:30000 -r sglang \
    -m "$MODEL_PATH" -M "$MODEL_PATH" \
    -d random -if 60000 -of 1 -n 160 -w 16 \
    -seed "$SEED" -igr true -o "$OUT/formal"

After applying the cleanup commit, also run the existing full kernel test file to cover the shared unfused quantization path and the existing CPU fixture:

python3 test/registered/kernels/ops/quantization/test_fp8_wo_a.py
python3 test/registered/unit/models/test_deepseek_v4_unified_fp8_q_pair.py

Checklist

  • Format code with repository-pinned Ruff, isort and clang-format; syntax checks passed locally.
  • Add focused tests in the existing registered kernel file.
  • Document the existing flag's CUDA extension and backport adaptation.
  • Provide prior correctness/performance results with environment and reproduction commands.
  • Reduce duplicate code and cache static eligibility.
  • Hosted Lint on current head fb4e80e (job).
  • Hosted B200 kernel numerical / CUDA Graph validation on current head fb4e80e via CI merge 5da168b: 7 tests passed (job).
  • Complete the remaining required CI; the independent Inkling/EAGLE fixture failure and follow-up are documented in the CI comment.
  • Repeat full-model serving validation and performance checks after refactoring.
  • Upstream reviewer validation of the main-based patch.

CI States

Latest PR Test (Base): ❌ Run #41445853732
Latest PR Test (Extra): ❌ Run #41445853576
Latest PR Test (AMD ROCm 10): ✅ Run #41445853908

[!TIP]
Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

Phoenix3334 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

B300 aiopt v0.5.21 validation and complete reproduction commands are in the description. Local validation uses that available build; exact main validation is left to upstream CI/review. The PR is now ready for review.

Cleanup commit 7c5d3eb shares the quantization/packed-scale epilogue and host validation, reuses output allocation, and caches configuration-derived eligibility in initialization. The existing CPU fixture gets the new attribute's default. The two new GPU tests remain unchanged; no new test methods or CI suites were added.

Local syntax, repository-pinned Ruff/isort/clang-format and static gate-equivalence checks passed. Earlier GPU correctness and performance results predate this refactor, so updated kernel/graph/serving and performance validation remains pending. The first greedy mismatch remains documented with an unresolved cause.

@Phoenix3334
Phoenix3334 marked this pull request as ready for review October 12, 2026 09:32
@Phoenix3334
Phoenix3334 force-pushed the perf/dsv4-inverse-rope-fp8-quant branch from 7c5d3eb to c21b049 Compare November 1, 2026 09:46
@Phoenix3334 Phoenix3334 changed the title [Perf][DeepSeek-V4] Fuse inverse RoPE into wo_a FP8 quantization [Perf] DeepSeek-V4: Fuse inverse RoPE into wo_a FP8 quantization Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Hi @BBuf, could you please ask your review agent to review the full cumulative diff of this PR?

It fuses inverse RoPE into the CUDA UE8M0 FP8 activation quantization before DeepSeek-V4's wo_a projection, preserving the intermediate BF16 rounding boundary and reusing the existing opt-in flag.

All repository-pinned pre-commit checks on the six changed files passed after rebase. The PR documents earlier B300 correctness/performance results, including the unresolved first-startup greedy mismatch; those GPU results predate the cleanup/rebase, so GPU validation of the current head is still pending.

Could you also help authorize the relevant upstream CI when appropriate? Thanks!

@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Nov 1, 2026
@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

2 similar comments
@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

Port the one-line test-fixture correction from mickqian in sgl-project#47736 (be43d56). Initialize skips_prefill_metadata_on_idle_dp_rank=False on the mocked attention backend to fix the upstream CPU replay test. Production kernel/model code and the B200 tests are unchanged.
Port the one-line test-fixture correction from DarkSharpness in sgl-project#47758 (44b1e4b). Model the no-linker-offload case with tree_cache=SimpleNamespace(linker=None), allowing process_decode_queue to reach the existing held-destination publication assertion. No test skips, weakened assertions, or production changes.
@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

1 similar comment
@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf

BBuf commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf BBuf left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The earlier validation request remains open.

Empty commit to trigger CI for PR sgl-project#43786. The source tree is identical to fddd180; no production code or tests changed.
@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

2 similar comments
@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

Copy link
Copy Markdown
Contributor Author

Hi @BBuf, the latest AMD CI for this PR hit an infrastructure/API-quota failure in wait-for-stage-a-amd.

The Stage A GPU job was still queued (0/1 completed). At 2026-11-02 08:43:46 UTC, the wait action's jobs-list request failed with:

HTTP 403: API rate limit exceeded for installation
x-ratelimit-limit: 15000
x-ratelimit-used: 15000
x-ratelimit-remaining: 0

The wait action exited on this API error after about 10 minutes, before its configured 240-minute timeout; downstream Stage B/C jobs were skipped. This failure contains no GPU test result and does not indicate a failure of the fusion kernel. The upstream GPU jobs are currently still queued.

Could you help rerun the failed wait job and downstream CI once the API quota recovers? It may also be worth checking whether wait-for-jobs can handle installation rate-limit responses without failing the stage gate. Thanks!

@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

Copy link
Copy Markdown
Contributor Author

Hi @BBuf, following up with a new NVIDIA CI blocker and the current-head kernel results (head fb4e80e).

Our wo_a tests passed: the B200 kernel job ran test/registered/kernels/ops/quantization/test_fp8_wo_a.py: 7 tests passed in 12.830s, including test_fused_inverse_rope_quant_matches_production and test_fused_inverse_rope_quant_cuda_graph.

The new root failure is the upstream Inkling/EAGLE fixture: 1-gpu-large (0) failed in test_inkling_checkpoint_indices.py::test_draft_runners_capture_and_replay_checkpoint_destinations with:

TypeError: ones(): argument 'dtype' must be torch.dtype, not Mock

CI checked out merge 5da168b (head fb4e80e into main 1599b16). The failing test and eagle_draft_extend_cuda_graph_runner.py have identical Git blob SHAs in that merge and its actual main parent; neither is changed by this PR. Four later Base GPU jobs stopped at the health-check fail-fast step, and wait-for-base-b failed as a consequence.

DarkSharpness's existing #47860 addresses this exact fixture by setting Mock(cache_loc_dtype=torch.int64) and is still open. Could you help review/land that baseline fix? Once it is merged, we can sync main here and rerun the affected CI. These kernel results do not replace the outstanding full-model serving/performance validation. Thanks!

@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

[BBuf Review Agent] @Phoenix3334 Both files match main 1599b16, and the fixture’s bare Mock() explains the dtype error, so this failure is unrelated to the fusion change. Sync main after the fixture fix lands so the affected CI can run again.

@BBuf

BBuf commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@Phoenix3334

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

2 similar comments
@Phoenix3334

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@Phoenix3334

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@Phoenix3334

Copy link
Copy Markdown
Contributor Author

@BBuf Could your agent help recover the remaining Base CI on head 79b16be?

  • wait-for-base-b failed after about 120 minutes because the GitHub jobs-list API returned HTTP 502 (Unhandled error: HttpError: Server Error). The log still showed 231 minutes left in its configured 350-minute wait, so this was not the polling timeout or API-quota exhaustion.
  • 1-gpu-large (1) then stopped at check-pr-test-health: Fail-fast: skipping — root cause job(s): wait-for-base-b. No tests executed in that job.
  • 1-gpu-large (2) is still queued: Requested labels: 1-gpu-h100, Waiting for a runner to pick up this job.... Stage C was skipped downstream.

The B200 JIT kernel job, all three Xeon jobs after retry, and the AMD main workflow have passed on this head. Could you check the H100 runner queue and rerun the failed Base jobs and downstream checks when capacity is available? Full-model serving/performance validation remains outstanding. Thanks!

@BBuf

BBuf commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

1 similar comment
@BBuf

BBuf commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@BBuf

BBuf commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

[BBuf Review Agent] @Phoenix3334 these still fail after a rerun, and I can't tell from the logs whether it's this PR. Could you take a look?

  • base-b-test-1-gpu-large (2): {"file": "test/registered/dllm/test_dllm_batching_fdfo.py", "passed": false, "elapsed": 101}" — the tail identifies the failed test file but contains no assertion, exception, or stack trace establishi

@Phoenix3334

Copy link
Copy Markdown
Contributor Author

@BBuf I checked the full log and compared the sources against the CI merge’s actual main parent.

The assertion is in this job, Run test log lines 5754–5761: test_dllm_batching_fdfo.py:95, test_bs_1_speed, self.assertGreater(speed, 250) → AssertionError: 233.91812254839482 not greater than 250. The final summary at lines 6387–6413 confirms this file failed; the six preceding files, including Inkling and adaptive speculative tests, passed.

CI merge f3dc323b6c357dc76ac58217173a07eb9822f041 has main parent 58592ce6796873021ea22aa3bd7e82fc671c2c6c and PR head 79b16bec1ffce13dcb7b631a8910ade0726e0788. I compared all three revisions: test/registered/dllm/test_dllm_batching_fdfo.py, python/sglang/srt/models/llada2.py, and python/sglang/test/send_one.py are byte-identical. The failing test serves inclusionAI/LLaDA2.0-mini; it does not exercise the DeepSeek-V4 wo_a fusion path changed here.

This identifies a DLLM throughput-threshold failure, with no evidence tying it to the fusion. I have not run a same-runner main control, so I cannot yet distinguish baseline performance from runner variability. No threshold changes or test skips were made; I will handle the rerun.

@Phoenix3334

Copy link
Copy Markdown
Contributor Author

/rerun-failed-ci

@BBuf

BBuf commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

[BBuf Review Agent] @Phoenix3334 Confirmed those three files match main 58592ce, and the LLaDA2 test doesn't exercise the changed wo_a path. I'll treat this failure as unrelated to the PR; the cause of the throughput dip is still open.

@BBuf
BBuf merged commit 547e713 into sgl-project:main Nov 4, 2026
438 of 491 checks passed
@Phoenix3334
Phoenix3334 deleted the perf/dsv4-inverse-rope-fp8-quant branch November 12, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek jit-kernel quant LLM Quantization run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants