Skip to content

[K3.1-Pro] Day-0 support SGLang on MI355X - #4808

Merged
cquil11 merged 8 commits into
mainfrom
cam/kimik3.1-mi355x-sglang
Nov 5, 2026
Merged

cquil11 merged 8 commits into
mainfrom
cam/kimik3.1-mi355x-sglang

Conversation

@cquil11

@cquil11 cquil11 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Adds Kimi K3.1 Pro day-0 SGLang AgentX on MI355X with the RadixArk DFLASH draft, following the SGLang K3.1 cookbook's MI355X AgentX cells (Low-Latency monokernel and High-Throughput TP8 · DCP8 HiCache).

Recipe and points ported from Kevin Mi's (AMD) #4823, which this PR supersedes.

Config key Topology Concurrency KV offload DFLASH drafts (verify width)
kimik3.1-fp4-mi355x-sglang-agentic-dflash 1 node, TP8, decode monokernel 1, 4 none 5 (6)
1 node, TP8 · DCP8 (a2a) 8, 16, 32, 48 HiCache in host DRAM (ratio 2.5, write-back), 1,538 GB 5 (6)
  • Image: lmsysorg/sglang:dev-kimi-k31-pro-mi35x@sha256:6af91676…. The cookbook measured its MI355X numbers on a custom ROCm 10 image with the K3.1 ROCm port, and says this public image "has not been checked against these commands".
  • No points above c48: the host pools pin about 190 GB per GPU against the node's 1,511 GiB GTT limit, and higher agent counts overflow or thrash. On a clean node the mamba state cache already caps the c60 layout at 62 running requests.
  • Speculation: DFLASH with RadixArk/Kimi-K3.1-Dflash2-Preview pinned at d0d8bc2, the revision the golden curve was measured on. The draft attention backend is triton on ROCm. Block verification is on to match the curve kimi-k3.1-pro__dflash__kimi-k3.1-dflash2-preview__default-block. Throughput runs inject that curve's AL at 5 drafts (3.43). Nothing is hard-coded.
  • DRAM: dram-utilization: 0.513 (1,538 GB) covers the HiCache host pools. That is within the 3 TB per-server limit at 8 of 8 GPUs.
  • Model location: K3.1 isn't staged in the shared /it-share/hf-hub-cache, so it loads from the node-local HF cache (/var/lib/hf-hub-cache). A node's first point downloads the ~1.56 TB checkpoint there. [AMD][AgentX] MI355X Kimi-K3.1-Pro FP4 SGLang: DFLASH single-node points / [AMD][AgentX] MI355X Kimi-K3.1-Pro FP4 SGLang:DFLASH 单节点配置点 #4823's shared-cache lane and HF_HUB_OFFLINE=1 are left out until the checkpoint is staged.
  • RUSTUP_TOOLCHAIN=stable on the HiCache points keeps every rank on the Rust TreeCore. This works around an image bug where write-back asserts on a mix of Rust and Python TreeCores (upstream fix [Feat] [AMD] model: Add Kimi-K3.1 MI35x support sgl-project/sglang#48427).

K3.1 precision rules

  • Linear and shared expert, native BF16: no --quantization override. SGLANG_ROCM_DISABLE_LINEARQUANT=0 (the image default) only applies the checkpoint's own config, which keeps those layers BF16.
  • MoE weights, MXFP4: native. AITER_SITUV2_A8W4=1 runs FP4 weights with FP8 activations, which is above the A4W4 floor.
  • MoE combine and AllReduce/AG/RS, native BF16: AITER_OPUS_STAGE2_FP8=0 keeps the MoE stage-2 partials BF16. ROCM_QUICK_REDUCE_QUANTIZATION: NONE is set explicitly, as the all-reduce policy requires for SGLang ROCm.
  • KDA cache, FP32: with --enable-linear-replayssm-spec, SGLang resolves --mamba-ssm-dtype to float32. That is also its default when the checkpoint sets none.
  • Conv cache: engine default (BF16).
  • Indexer cache: engine default.
  • KV cache, FP8: kv-cache-dtype: fp8_e4m3. The draft KV is FP8 as well, consistent with the target, as the cookbook's DFLASH overlay sets it.
  • EPLB: none.

TP8 on the decode monokernel at c1 and c4 without KV offload, and TP8 DCP8
with HiCache from c4 to c60, both with the RadixArk DFLASH draft, following
the SGLang cookbook's MI355X AgentX recipes.
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@cquil11 cquil11 added the non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) label Nov 4, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

AIPERF_HTTP_TCP_USER_TIMEOUT: '900000'
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: 'sglang:'

# The decode monokernel takes no KV offload; admission and decode graphs follow the agent count.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 nit (optional): The section comment above override_mono_c1 says admission and decode graphs follow the agent count. That is not true for override_hicache_c60, which sets 64 at CONC 60. AGENTS.md also bans header comments that describe an override or section. Fix: drop the clause "admission and decode graphs follow the agent count". If the 64 at c60 is intentional, add a one-line why on override_hicache_c60's max-running-requests (for example, that it matches the cookbook's 64 at 56).

Why this was flagged

The comment at agentic.yaml:70 sits above the overrides and says "admission and decode graphs follow the agent count". Every override matches that except override_hicache_c60. There, max-running-requests and cuda-graph-max-bs-decode are 64 while benchmark.env CONC is '60'. A maintainer who trusts the comment may "fix" c60 down to 60, or copy the wrong rule into later recipes. AGENTS.md:56 forbids header comments that describe a recipe, override or section, and AGENTS.md:58 allows only short why-comments on specific lines. This is documentation only, so runtime behaviour is unaffected.

Verification: agentic.yaml:70 is a section header placed above override_mono_c1. override_hicache_c60 sets max-running-requests: 64 and cuda-graph-max-bs-decode: 64 with CONC: '60', while c1, c4, c10, c16, c24, c32, c48 and c52 all match their CONC. The convention breach holds either way. Nothing breaks at runtime: c60 at 64 just leaves a little admission headroom.

…glang

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

cquil11 and others added 2 commits November 4, 2026 23:52
Take Kevin Mi's Kimi-K3.1-Pro MI355X SGLang DFLASH recipe and points:
TP8 monokernel at c1 and c4, and TP8/DCP8 with the HiCache host tier
at c8, c16, c32 and c48. Points above c48 are dropped because the node's
GTT limit makes their host pools overflow.

K3.1 is not staged in the shared HF cache on mi355x-amds, so the model
keeps loading from the node-local cache, without HF_HUB_OFFLINE.

Co-authored-by: Kevin Mi <mikevin920@yahoo.com>
@cquil11

cquil11 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

/use 41977056700

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@cquil11 staged run 41977056700.

This run remains available across future /stage-results requests. Staging the same run ID again updates its staged data. Staging workflow

@cquil11

cquil11 commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator Author

/reuse-sweep-run 41977056700

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@cquil11
cquil11 merged commit de86ae4 into main Nov 5, 2026
27 checks passed
@cquil11
cquil11 deleted the cam/kimik3.1-mi355x-sglang branch November 5, 2026 09:20
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Ingest report — ✅ Results ingested into the production database.

Ingest workflow · Merge Ingest run · Benchmark source run

Category new duplicate skipped unmapped failed
benchmark 6 0 0 0 0
eval 2 2 2 0 0
trace 6 0 0 0 0
power 6 0 0 0 0

benchmarkFiles 6, rawBenchmarkRows 6, coveredByPerJobFiles 0, purgedPoints 0, failedRunRows 0, runStatsNew 0, runStatsDuplicate 0, evalSamplesNew 2638, gpuMetricSamplesNew 247208, powerPublicationPoints 6, changelogEntriesWritten 1

Counts cover only this run. Rows: benchmark_results, eval_results, agentic rows linked to a trace, gpu_metrics series. This comment updates if the ingest is rerun.

中文

Ingest 报告 — ✅ 结果已写入 production 数据库。

上表仅统计本次运行写入的数据,各行单位依次为 benchmark_results 行、eval_results 行、已关联 trace 的 agentic 行和 gpu_metrics 序列。重新运行 ingest 时本评论会原地更新。

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

Labels

non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant