Skip to content

dsv4-fp4-b300-sglang: enable piecewise cuda graph and mixed chunk#1693

Open
yhyang201 wants to merge 21 commits into
mainfrom
dsv4-fp4-b300-piecewise-cuda-graph
Open

dsv4-fp4-b300-sglang: enable piecewise cuda graph and mixed chunk#1693
yhyang201 wants to merge 21 commits into
mainfrom
dsv4-fp4-b300-piecewise-cuda-graph

Conversation

@yhyang201

@yhyang201 yhyang201 commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add --enforce-piecewise-cuda-graph and --enable-mixed-chunk to all concurrency profiles in dsv4_fp4_b300_sglang.sh

Note

Low Risk
Benchmark and CI runner configuration only; no application auth or data-path logic, though perf numbers and which concurrency points run will change.

Overview
Retunes DeepSeek-V4-Pro FP4 on B300 (sglang) benchmarks to match GB300-style launch settings and narrows the published search space.

dsv4_fp4_b300_sglang.sh swaps global env (FAST_WARMUP, radix/thinking/reasoning flags), hoists shared DP-attention SGLANG_* tuning for CONC ≥ 512, and adds --enable-deepseek-v4-fp4-indexer and --enable-mixed-chunk across profiles. High-concurrency megamoe runs use chunked-prefill-size 16384 (was 65536), and the 4096-concurrency recipe is removed entirely. nvidia-master.yaml bumps the nightly sglang image and drops the 4096 point from the 8k1k search space. launch_b300-nv.sh exports PORT=30000 into the container (was 8888). perf-changelog.yaml records the env/image and mixed-chunk/prefill updates.

Reviewed by Cursor Bugbot for commit 1bdee89. Bugbot is set up for automated code reviews on this repo. Configure here.

yhyang201 added 16 commits June 9, 2026 16:41
DP-attention mode uses deterministic TCP ports derived from $PORT.
If a previous sglang process didn't exit cleanly (e.g. Slurm scancel
didn't fully propagate SIGTERM to all subprocesses), the next launch
fails with "metrics_port at 9125 is not available". Non-DP-attention
mode is unaffected because it uses ipc:// with random temp paths.

Add kill_stale_servers() to benchmark_lib.sh and call it from all
sglang benchmark scripts that use DP-attention (B300 and B200).
fuser/pkill may not be available in all containers. Use python3+psutil
(always present in sglang/vllm images) to precisely kill processes on
$PORT and $PORT+237 (the DP-attention metrics_port = PORT + ZMQ_TCP_PORT_DELTA + 4).
The previous kill_stale_servers ran inside the Pyxis container, which
cannot see or kill processes in the host PID namespace. Move the
cleanup to launch_b300-nv.sh as a bare srun (no --container-image)
so pkill runs directly on the compute node and can kill leftover
sglang/vllm processes from prior container runs.
Two fixes:
- pkill -f "sglang" matched its own bash -c argv and killed itself
  before reaching the stale process. Use [s]glang regex trick so
  pkill skips its own process.
- Change PORT from 8888 to 30000 to avoid conflict with stale
  processes still bound to 8888-derived ports (metrics_port 9125).
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution! For vLLM & SGLang, please ensure that your recipes is similar to the official vLLM recipes and/or the SGLang cookbook

If it is not, please create a PR first before we can merge your single node PR into the master branch. Let's ensure that the documentation is first class such that the entire ML community can benefit from your hard work! Thank you

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. If re-running failed jobs is attempted, PR authors are responsible for ensuring it passes. See GitHub's docs on re-running failed jobs: https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs#re-running-failed-jobs-in-a-workflow

As a rule of thumb, generally, PR authors should request a review & get a PR approval from the respective companies' CODEOWNERS before requesting a review from core maintainers.

If additional help is needed, PR authors can reach out to core maintainers over Slack.

--stream-interval 30
--enable-deepseek-v4-fp4-indexer
--enforce-piecewise-cuda-graph
--enable-mixed-chunk

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Port cleanup never invoked

Medium Severity

This commit adds cleanup_server_ports in benchmark_lib.sh to clear the HTTP port and derived SGLang ZMQ/NCCL ports before serve, but dsv4_fp4_b300_sglang.sh still launches sglang serve without calling it, so stale listeners from a prior failed run can still cause “port not available” failures the helper was meant to prevent.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 30211e4. Configure here.

Comment thread benchmarks/benchmark_lib.sh Outdated
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

…k, set chunked-prefill-size 16384 for high-conc profiles

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f2724b9. Configure here.

--chunked-prefill-size 8192
--disable-flashinfer-autotune
--enable-deepseek-v4-fp4-indexer
--enable-mixed-chunk

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing piecewise CUDA graph flag

Medium Severity

The PR adds --enable-mixed-chunk to every concurrency profile but never adds --enforce-piecewise-cuda-graph, even though the title and description call for both on all profiles. Runs therefore omit the intended piecewise CUDA graph enforcement.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f2724b9. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

1 participant