Skip to content

Add Kimi K3 B300 EFA AgentX sweep / 新增 Kimi K3 B300 EFA AgentX 扫描 - #4304

Closed
wzhao18 wants to merge 49 commits into
mainfrom
wzhao/kimi-k3-b300-efa-sweep
Closed

wzhao18 wants to merge 49 commits into
mainfrom
wzhao/kimi-k3-b300-efa-sweep

Conversation

@wzhao18

@wzhao18 wzhao18 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Mooncake on EFA: restrict Mooncake's topology to the 16 EFA NICs (MC_MS_FILTERS), keeping GPU buffers on their PCIe-local NICs (MC_EFA_NIC_SELECTION=local). B300 nodes also expose two non-EFA IB HCAs (ibp198s0f0, ibp199s0f0). Mooncake's EFA transport indexes its NIC contexts over EFA devices only, but disabled topology HCAs keep their index slots, so NIC selection was misaligned. With local selection, TP0 could never submit a store PUT (297,721 AddressNotRegistered errors, 84% of PUTs revoked), so the store held no complete block and served 0% prefix hits. Every turn re-prefilled its full context: agentic warmup ran about 5x slower than GB300, with 18% prompt-cache reads vs 97%. With the filter, a local 1P1D run shows zero PUT failures, Mooncake loads and external prefix hits climbing past 60% within 13 minutes of warmup, with no GPU or host faults. Earlier, without local selection, disaggregated prefill hosts froze within minutes (uncorrectable NVLink / unknown CUDA error, then host hang); local selection avoided that. Transport stays EFA throughout. Also included: the setup script refuses nodes whose EFA devices report failed memory registrations, unrebooted nodes are excluded, disaggregated jobs never requeue, workers keep the KV cache on cudaMalloc memory, and a pinned, SHA256-verified aiconfigurator-core wheel fixes an intermittent install failure.

Bring the Kimi K3 DSpark AgentX search space from #4047 to B300: ten DCP disaggregated points, with one eight-GPU node per DCP8 worker. The three low-latency aggregate points already passed (below) and are commented out so reruns cover only the disaggregated configs.

Use EFA for NIXL and Mooncake, preserving the model, concurrency matrix, golden acceptance selection and eval coverage. The setup builds a pinned THP-enabled Mooncake client with host-chunk collapse and backports upstream libfabric CUDA VMM synchronization fixes. It also adds a default-on opt-out for vLLM's NVLink-only latent-MoE tail. These serving-stack changes require a patch waiver.

The two-node TP16 point uses stock decode and portable collectives, with custom allreduce, GEMM-AR and the fused latent-MoE tail disabled. These fused paths require GPU multicast across the TP group, which is unavailable across EFA-connected nodes. Single-node TP8 points retain their fused paths.

The current sweep has passed all three aggregate benchmarks and their tool-schema evals; the full sweep is not yet green. The 2P3D c192 job failed before serving because two workers downloaded an aiconfigurator-core wheel that failed its published SHA256 check; this is being treated as a transient installation failure pending retry, with no installer change or checksum bypass. The registration fix passes local full-model Dynamo prefill startup and fresh-image wheel validation at unchanged capacity; the public disaggregated path remains unverified. A scheduler exclusion avoids a node with a separately reproduced pre-container task-launch failure.

Validation details

Current-head results, with one-hour profiling submission windows and unchanged native result and power gates:

Configuration GPUs Total TPS/GPU P90 ITL P90 TTFT Valid profiled requests Tool eval
TP8/DCP8 c2 8 2,681.25 3.43 ms 1.32678 s 417 403/408
TP8/DCP8 c4 8 4,028.18 4.87 ms 1.60057 s 621 404/408
TP16/DCP16 c1 16 568.12 12.83 ms 1.88693 s 177 401/408

All three power bundles report valid coverage and package integrity, with no validation failures. Native content validation excluded one, three and one profiling records, respectively. The c2 job also cancelled one outstanding request after its end-of-window grace deadline; it still passed the native gate. The TP16 runtime config confirms the portable fallback was used.

Tool eval residual failures concern generated tool calls or arguments, not API/backend rejection. These evals use no Mooncake connector and do not establish external-cache correctness. In an earlier sweep, the same 1P2D GSM8K configuration completed with 97.35% strict-match accuracy over 1,319 questions.

A local DCP8 1P1D stability run completed one hour of AgentX profiling with 4,517 valid requests, zero profiling errors and successful result validation. It used real acceptance and is not a controlled performance comparison against the synthetic-acceptance sweep. The local TP16 checks establish serving functionality, not completed benchmark or accuracy validation.

The host-collapse fix passes an eight-client mixed-backing registration reproducer and full-model Dynamo prefill startup with all eight 160 GiB mappings fully huge-page-backed. A fresh-image build installed 0.3.13.post1+gc3fa13ec.collapse1; its separate 8 GiB Store sanity check passed a 5,632-byte put/get. Cross-node 8 MiB GPU-to-host WRITE, host-to-GPU READ and GPU-to-GPU READ also passed with CUDA VMM enabled and aligned 8 GiB host regions. These local checks do not establish full disaggregated sweep completion.

中文

EFA 上的 Mooncake:将 Mooncake 拓扑限定为 16 块 EFA 网卡(MC_MS_FILTERS),GPU 缓冲区仅使用 PCIe 本地网卡(MC_EFA_NIC_SELECTION=local)。 B300 节点另有两块非 EFA 的 IB 网卡(ibp198s0f0、ibp199s0f0)。Mooncake EFA 传输只按 EFA 设备编号网卡上下文,而被禁用的拓扑设备仍保留编号,导致网卡选择错位。在本地网卡模式下,TP0 的所有存储写入都失败(297,721 次 AddressNotRegistered,84% 的 PUT 被撤销),存储中没有完整的块,前缀命中率为 0%,每轮请求都要重新 prefill 全部上下文:agentic 预热比 GB300 慢约 5 倍,提示缓存读取率为 18%(GB300 为 97%)。加入过滤后,本地 1P1D 运行无 PUT 失败,Mooncake 开始加载,预热 13 分钟内外部前缀命中率升至 60% 以上,无 GPU 或主机故障。此前未使用本地网卡模式时,分离式 prefill 主机会在数分钟内冻结(先报不可纠正的 NVLink 或未知 CUDA 错误);本地网卡模式避免了该问题。传输协议始终为 EFA。另外包含:启动脚本拒绝 EFA 设备存在内存注册失败记录的节点,排除未重启节点,分离式作业不再重新排队,worker 的 KV cache 使用 cudaMalloc 内存,以及固定版本、经 SHA256 校验的 aiconfigurator-core wheel 修复间歇性安装失败。

将 #4047 的 Kimi K3 DSpark AgentX 配置空间移植到 B300:包含十个 DCP 分离式推理性能点,每个 DCP8 worker 使用一个八卡节点。三个低延迟聚合式性能点此前已通过(见下文),现已注释掉,后续扫描仅运行分离式配置。

NIXL 和 Mooncake 使用 EFA,保持模型、并发矩阵、标准合成接受率选择和评估覆盖范围不变。启动脚本构建支持 THP 和主机内存块折叠的固定版本 Mooncake,并回移 libfabric 上游的 CUDA VMM 同步修复;另外为 vLLM 依赖 NVLink 的 latent-MoE tail 增加默认开启的开关。这些推理栈修改需要补丁豁免。

双节点 TP16 配置使用常规解码和可跨节点使用的集合通信,关闭 custom allreduce、GEMM-AR 和融合 latent-MoE tail。这些融合路径依赖 TP 组内 GPU 多播,而 EFA 连接的节点间不支持该能力。单节点 TP8 配置保留融合路径。

新一轮扫描的三个聚合式性能测试均已通过原有结果和功耗验证:TP8 c2 为 2,681.25 TPS/GPU,TP8 c4 为 4,028.18 TPS/GPU,TP16 c1 为 568.12 TPS/GPU;工具调用评估分别为 403/408、404/408 和 401/408。原有内容校验分别排除了一、三、一条 profiling 记录;c2 在测量窗口结束后的宽限期截止时取消了一条未完成请求,仍通过原有门槛。2P3D c192 在服务启动前失败,原因是两个 worker 下载的 aiconfigurator-core 软件包未通过官方 SHA256 校验;暂按偶发安装失败处理,等待重试,不修改安装流程或绕过校验。完整扫描尚未全部通过,公开分离式推理路径仍待验证。调度排除规则已避开可独立复现容器启动前任务创建失败的故障节点;内存注册修复已通过本地完整模型 Dynamo prefill 启动和全新镜像的软件包验证,缓存容量与评估要求未降低。

AI model disclosure

Prepared with OpenAI Codex. The runtime does not expose an exact model/version identifier, so it could not be verified. No delegated agents were used.

新增 Kimi K3 B300 EFA AgentX 扫描配置,并适配八卡节点和传输依赖。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
@github-actions

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 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

固定 AWS libfabric 源码,并记录 B300 扫描补丁及配置变更。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
补齐 Mooncake 构建依赖,并让跨节点 DCP 使用 NCCL 回退路径。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
@wzhao18 wzhao18 added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 19, 2026
补齐 Mooncake Store 序列化所需的 MessagePack 开发头文件。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

@wzhao18 wzhao18 added non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) and removed full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) labels Oct 19, 2026
@wzhao18
wzhao18 marked this pull request as ready for review October 19, 2026 05:04
@wzhao18
wzhao18 requested a review from a team October 19, 2026 05:04
@github-actions

Copy link
Copy Markdown
Contributor

inferencex-e2e/infx diff: +10 -2

Generally most InferenceX submissions don't need to add changes to the infx package. On the off chance they do, generally the diff is small. Please prompt your agent to clean your PR to keep your diff to only necessary & minimal changes too. We have an increased code quality bar for changes to the infx package.

中文

大多数 InferenceX 提交通常不需要修改 infx 包。即使确实需要,改动通常也很小。请让你的 agent 清理 PR,使改动只包含必要且最小的内容。infx 包的改动有更高的代码质量要求。

@claude

claude Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @wzhao18's task in 1m 41s —— View job


PR #4304 review

LGTM, no blocking issues found.

I read the setup script, the libfabric patch, both recipes, the master config entries, the power lane rule and its test, and the changelog. The recipe overrides match the srt-recipe/eval-srt-recipe references. The disagg config has 10 points and the agg config has 3, which matches the PR description. The agg node counts fit 8-GPU nodes. dram-utilization: 0.459 against the 2,861,022 MiB cap works out to 8 × 160 GiB, which matches the Mooncake segment of 160 GiB per rank. The changelog entry is appended at the end of the file and covers both new config keys.

One question about the cluster: runners.yaml describes b300-dsxe with only Mellanox mlx5_* RDMA ports, and lists no EFA devices. The setup script ends with fi_info -p efa -t FI_EP_RDM under set -eo pipefail. Both recipes set protocol: "efa" for Mooncake and backends: ["LIBFABRIC"] for NIXL. If these nodes have no EFA devices, every worker's setup and the mooncake-master preamble will fail. Can you confirm that the b300-dsxe nodes this sweep runs on have EFA devices?

What I couldn't check: the permission settings blocked uv run python -m infx.matrix.changed --base origin/main and pytest infx/tests/launch/test_launch_policy.py. I couldn't confirm the generated matrix or the updated power-policy test locally, so CI will need to cover both.

@wzhao18 wzhao18 added non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) and removed non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) labels Oct 19, 2026
修正 Mooncake 分配器构建目标名称。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>

@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.

Comment on lines +9937 to +9980
dp-attn: false
- spec-decoding: mtp
kv-offloading: dram
kv-offload-backend:
name: mooncake
version: 0.3.13.post1+gc3fa13ec
conc-list:
- 176
- 192
- 208
- 224
- 240
srt-recipe: disagg-variants.yaml:override_2p3d_cap128
eval-srt-recipe: disagg-variants.yaml:override_2p3d_cap128_eval
power: true
prefill:
num-worker: 2
tp: 8
dcp-size: 8
ep: 8
dp-attn: false
decode:
num-worker: 3
tp: 8
dcp-size: 8
ep: 1
dp-attn: false


kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg:
image: vllm/vllm-openai:nightly-1b2a666391f2a24228a1436b64d547c34cc6b6ce
model: moonshotai/Kimi-K3
model-prefix: kimik3
runner: cluster:b300-dsxe
precision: fp4
framework: dynamo-vllm
multinode: true
disagg: false
srt-recipe-dir: kimik3/vllm/b300-fp4/agentx
scenarios:
agentic-coding:
- search-space:
- spec-decoding: mtp
kv-offloading: none

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.

🟡 (optional) Two B300 disagg points produce the same experiment name at conc 176, so their results clash and the name cannot be selected with --exp-names. The override_2p3d_cap24 and override_2p3d_cap128 arms both run 2 prefill and 3 decode workers (tp 8, prefill ep 8). multinode_agentic_exp_name (infx/matrix/generate.py:471) ignores the recipe and max-num-seqs, so both arms become kimik3_p2x8ep8_d3x8_conc176_kvdram-mooncake. Fix: keep each concurrency in one arm per topology, e.g. drop 176 from one arm's conc-list, so every generated exp-name is unique.

Why this was flagged

The new disagg entry lists conc 176 under srt-recipe disagg-variants.yaml:override_2p3d_cap24 and again under disagg-variants.yaml:override_2p3d_cap128. Both arms use prefill num-worker 2, tp 8, ep 8 and decode num-worker 3, tp 8, ep 1. multinode_agentic_exp_name (infx/matrix/generate.py:492-496) builds the name only from model code, worker tags, conc and the offload suffix. Both rows therefore get exp-name kimik3_p2x8ep8_d3x8_conc176_kvdram-mooncake. srt_slurm/generate.py:122 uses exp-name as RESULT_FILENAME, so the two runs write the same result filename. filter_exp_names (generate.py:1440-1441) raises "Experiment name(s) matched multiple rows" when anyone tries to rerun or eval that point by name. Nothing in infx/matrix/validation.py checks exp-name uniqueness. The single-node B300 Kimi entry (nvidia-master.yaml:1519-1520) warns that concurrencies must stay disjoint across arms for exactly this reason.

Verification: Trigger: an operator shards or reruns this sweep with test-config --exp-names. multinode_agentic_exp_name (infx/matrix/generate.py:471-496) builds the name only from model_code, each worker's num-worker x tp, the conc and the offload suffix. Both rows therefore get kimik3_p2x8ep8_d3x8_conc176_kvdram-mooncake. filter_exp_names (generate.py:1437-1441) then raises "Experiment name(s) matched multiple rows".

Comment on lines +56 to +70
git clone https://github.com/kvcache-ai/Mooncake.git "$task_dir/Mooncake"
git -C "$task_dir/Mooncake" checkout --detach c3fa13ecaf1038df933dcb784ff8ffe026381100
git -C "$task_dir/Mooncake" submodule update --init --recursive
(
cd "$task_dir/Mooncake"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/opt/amazon/efa \
-DPython3_EXECUTABLE="$(command -v python3)" \
-DUSE_EFA=ON -DUSE_CUDA=ON -DUSE_ETCD=OFF \
-DWITH_STORE_RUST=OFF -DWITH_EP=OFF -DBUILD_UNIT_TESTS=OFF \
-DBUILD_BENCHMARK=OFF -DBUILD_EXAMPLES=ON
cmake --build build --parallel 12 --target \
engine store mooncake_master mooncake_client transfer_engine_bench nvlink_allocator
sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec"/' \
mooncake-wheel/pyproject.toml

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.

🟡 (optional) Maintainers who bump the master config's Mooncake version get results labelled with the new version while the old wheel still runs. The script never reads the caller's version. kimik3-b300-efa-setup.sh is missing from INSTALLERS (infx/srt_slurm/workload.py:80), so KV_OFFLOAD_BACKEND_VERSION is never bound. The script hard-codes 0.3.13.post1+gc3fa13ec at lines 70 and 94. Fix: register the script in INSTALLERS as ("kv-offload-backend", "mooncake"), require KV_OFFLOAD_BACKEND_VERSION via check_env_vars, and use it for the wheel version, the cache key and the final assert.

Why this was flagged

Both new master entries in nvidia-master.yaml declare kv-offload-backend: {name: mooncake, version: 0.3.13.post1+gc3fa13ec}. _bind_components (infx/srt_slurm/workload.py:256-263) checks and binds that version only for scripts listed in INSTALLERS (workload.py:80-86). That list has vllm-mooncake.sh and kimik3-b300-mooncake.sh but not the new script. The new script does its own sed to version = "0.3.13.post1+gc3fa13ec" (line 70), pins checkout c3fa13ec... (line 57) and asserts the same literal (line 94). So the master version is only a label. If it changes, nothing installs the new version and nothing fails, so results are recorded under a backend version that did not run. The existing vllm-mooncake.sh takes its version from the caller through check_env_vars KV_OFFLOAD_BACKEND_VERSION. AGENTS.md says configuration must flow from the caller, and this script breaks that rule.

Verification: nit. Trigger: someone changes the disagg master entry's kv-offload-backend.version without also editing the script. INSTALLERS (infx/srt_slurm/workload.py:80-86) omits kimik3-b300-efa-setup.sh, so KV_OFFLOAD_BACKEND_VERSION is never bound. The script hard-codes the version in its sed (line 70) and final assert (line 94), so the old c3fa13ec wheel still runs and nothing would fail.

Comment on lines +29 to +33
cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v1"
mkdir -p "$cache"
exec 9>"$cache/build.lock"
flock 9
if [ ! -f "$cache/ready" ]; then

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.

🟡 (optional) Edits to libfabric-efa-vmm.patch or the build flags are silently ignored on runners whose cache was already built. Jobs keep loading the old cached libfabric and Mooncake binaries. The cache directory is keyed only on c3fa13ec-e83bf01a-v1, and line 33 skips the build whenever $cache/ready exists. Fix: derive the cache key from everything that shapes the artifacts. That means a hash of the patch file, the configure/cmake flags, the EFA installer version and the wheel version string, e.g. sha256sum of the patch plus this script appended to the directory name.

Why this was flagged

cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v1" (line 29) sits on the shared /hf_hub_cache mount, which runners.yaml adds for b300-dsxe. The cache persists across jobs and PRs. Once any job touches $cache/ready (line 75), every later job skips the build at line 33. Those jobs just untar $cache/libfabric.tar.gz and pip-install the cached wheel (lines 77-81). Changing the backport in libfabric-efa-vmm.patch (the waiver doc's removal plan expects such changes), the configure/cmake options, or the EFA_CU13_BUILD wheel settings does not change the key. Benchmarks then quietly run the stale binaries, and nothing reports it. The only safeguard is a manual -v1 bump, and nothing ties it to the patch contents. The base branch has no such cache.

Verification: In kimik3-b300-efa-setup.sh, line 29 sets cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v1", so the key is only the two commit SHAs plus a literal version tag. Line 33 runs if [ ! -f "$cache/ready" ]; then and skips the whole build. The final check (lines 93-94) only tests fi_version 2.6 and the wheel version string, so nothing catches the stale build.

B300 双节点 TP16 配置使用常规解码,避免专用解码对跨节点 GPU 多播的依赖;单节点 TP8 保持不变。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
安装 python-is-python3,满足 Mooncake 官方打包脚本对 python 命令的依赖。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
仅在跨节点 TP16 配置中关闭依赖 MNNVL 的 FlashInfer 集合通信,保留单节点 TP8 快速路径。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
移除配方中的 cpus-per-task,避免与 B300 集群的 cpus-per-gpu 配置冲突;所有扫描点统一使用集群资源策略。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
使用安装目录相对的运行时库路径,避免 Mooncake 打包依赖临时构建目录,并更新构建缓存版本。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
同步最新主分支,保留上游性能记录,并将 B300 扫描条目保留在变更记录末尾。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
Disable builtin custom allreduce only for cross-node TP16/DCP16. The enabled probe stalls with ranks split between symmetric-memory rendezvous and the next Gloo collective; the disabled path passes eager and CUDA-graph allreduce checks.

仅在跨节点 TP16/DCP16 配置中禁用内置 custom allreduce,避免 MNNVL 探测期间各 rank 进入不同的集合通信。禁用后,初始化以及 eager 和 CUDA Graph allreduce 正确性检查均通过。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
Expose a default-on opt-out for the NVLink-only latent-MoE tail, and disable it with GEMM-AR in the cross-node TP16 recipe. Exact-image validation gets past the failing multicast initialization into checkpoint loading; full API validation remains in progress.

为依赖 NVLink 多播的 latent-MoE tail 增加默认开启的开关,并在跨节点 TP16 配置中关闭该融合及 GEMM-AR。精确镜像验证已越过多播初始化故障并进入权重加载,完整 API 验证仍在进行。

Signed-off-by: wzhao18 <wzhao18.sz@gmail.com>
wzhao18 and others added 2 commits October 20, 2026 13:00
NCCL_CUMEM_ENABLE=0 moved NCCL's cross-node buffers outside vLLM's
memory budget, and TP16 ran out of GPU memory on its first warmup
request (2.87 GiB requested, ~2.5 GiB free). The setting was based on a
misattributed freeze; TP16 passed before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@wzhao18 wzhao18 added non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) and removed full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) labels Oct 20, 2026
wzhao18 and others added 15 commits October 20, 2026 13:23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
Node 05 holds ~3 TB of page cache after its model repopulation and has
too little contiguous free memory for the THP-backed 160 GB Mooncake
segments; THP faults fell back to 4 KB pages and the EFA registrations
failed with ENOMEM (reg_mr_err=7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mooncake's topology on B300 nodes includes two non-EFA IB HCAs
(ibp198s0f0/ibp199s0f0). EfaTransport indexes NIC contexts over EFA
devices only while disabled topology HCAs keep their slots, so TP0 could
never submit a store PUT (AddressNotRegistered on every write), which left
the Mooncake store with 0% prefix hits and made agentic warmup ~5x slower
than GB300. Restrict discovery to the 16 rdmap EFA NICs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
Disable async scheduling on prefill and decode: with it on, prefill TP0
blocks in kernel launch on an idle GPU 0 under Mooncake EFA traffic and
the engine stops serving. Also add the Mooncake EFA handshake-lock and
loopback-stream patches, rebuild the NIXL LIBFABRIC plugin against the
installed libfabric (FABRIC_1.9 symbols), route same-node EFA peers off
libfabric's shm provider, and retry apt-get update during setup.

A local 1P1D c48 run with these settings completed the full 60-minute
profiling phase (2,901 requests, 0 errors, 98.2% Mooncake hits); every
earlier run hung 9-56 minutes into it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… matter

Re-enable async scheduling and disable vLLM custom allreduce instead: its
CUDA-graph all-gather stalls a prefill GPU with async scheduling under this
workload, and the NCCL path completed the full 60-minute benchmark.

Drop the setup preflight that refused nodes with nonzero EFA reg_mr_err; the
counter did not predict the freeze and it refused most nodes. Drop the NIXL
LIBFABRIC plugin rebuild, which had no effect. Document the Mooncake
handshake-lock and loopback-stream patches in the waiver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto wzhao/kimi-k3-b300-efa-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
Sweep 39804746648 (1P4D c40) stalled with custom allreduce disabled: prefill
GPU0 went idle at 16:48 UTC while GPU1-7 spun, the same signature as before.
Every stall so far has had async scheduling on; run it synchronously instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…KV events

The prefill stall reproduced with async scheduling off (sweep 39821277495,
2P3D c176) and with custom allreduce off (sweep 39804746648), so neither is a
workaround; restore both defaults. Turn off prefill KV-cache events to test
whether they are involved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto wzhao/kimi-k3-b300-efa-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@wzhao18
wzhao18 marked this pull request as draft October 22, 2026 19:25
wzhao18 and others added 2 commits October 25, 2026 15:07
Prefill KV events go back on (as in the original recipe). Async scheduling and
custom allreduce stay at their defaults. The stall happens mid-CUDA-graph on
one prefill GPU, so try prefill without CUDA graphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a-sweep

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@wzhao18
wzhao18 marked this pull request as ready for review October 25, 2026 19:09
@claude

claude Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @wzhao18's task in 1m 9s —— View job


PR #4304 re-review

LGTM, no blocking issues found in the commits since the last review.

  • Find commits added since the last review (2026-10-20)
  • Review the new changes
  • Post findings

What I checked since 519cdf7: I read the Mooncake handshake-lock patch (upstream #4704) and the loopback-stream patch. I also checked the setup script and the disagg recipe env and args: MC_EFA_NIC_SELECTION, MC_MS_FILTERS, FI_EFA_ENABLE_SHM_TRANSFER=0 and prefill enforce-eager. Finally I checked the runners.yaml exclusions and hf_hub_cache mount, the commented-out agg config, and the changelog entry.

  • Handshake patch: The lock split is sound. Passive handlers never take active_setup_mutex_. The state lock is released while the RPC is in flight. Every disconnect, path change and teardown bumps generation_, so a stale reply gets rejected.
  • Recipe: Decode picks up the new MC_* and FI_* vars through <<: *kimi_env. enforce-eager is set on prefill only, so decode keeps its CUDA graphs.
  • Cache key: Bumped to collapse-hs-lb-v1 to match the new patches. The wheel version and the final assert use the same new string.
  • Changelog: The entry is appended at the end of the file and covers only the disagg key, which fits now that the agg config is commented out. no-evals: true is a field the planner accepts.

Still open from earlier reviews (not repeated inline):

  • The master config still labels Mooncake 0.3.13.post1+gc3fa13ec, but the script installs …collapse1.hs1.lb1, so results will carry a backend version that never ran. The gap is wider now that two more patches are applied.
  • #ifdef MADV_COLLAPSE in mooncake-efa-collapse-host-chunks.patch can still drop the fix at compile time without any warning. Your full-model startup with 160 GiB mappings fully huge-page-backed suggests the macro is defined in this image, so this is a hardening item rather than a live bug.
  • The cache key still has to be bumped by hand whenever a patch file changes.

What I couldn't check: I didn't confirm that the loopback-stream patch compiles against Mooncake c3fa13ec (it relies on a device variable that comes from code outside the hunk), and I didn't run infx.matrix.changed or the tests. The next sweep's setup step will show whether the patch compiles.

@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.

Findings marked 🟡 are optional suggestions and need no follow-up push.

Still open from earlier reviews (5):

If you have decided not to act on one of these findings, resolve its thread (a reply alone leaves it open) and the next review stops counting it. To review this commit again now, use Re-run on its "Claude Code Review" check.

Comment on lines +121 to +126
"https://pypi.nvidia.com/aiconfigurator-core/$aic_wheel" -o "$task_dir/$aic_wheel" || true
if printf '%s %s\n' "$aic_sha256" "$task_dir/$aic_wheel" | sha256sum -c --status -; then
mv -f "$task_dir/$aic_wheel" "$aic_dir/$aic_wheel.tmp.$$"
mv -f "$aic_dir/$aic_wheel.tmp.$$" "$aic_dir/$aic_wheel"
else
echo "aiconfigurator-core wheel failed SHA256 check (attempt $attempt)" >&2

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.

🔴 Every B300 Kimi K3 job now runs native code from a cache that other cluster users may be able to swap out. Nothing checks that code before it runs. Lines 100-105 untar $cache/libfabric.tar.gz into / and pip-install $cache/*.whl whenever ready exists. This PR also adds the hf-hub-cache agentic mount on b300-dsxe, so each launch chmods that cache root to 0o777 without a sticky bit. Fix: verify the cached tarball and wheel before using them, as the aiconfigurator wheel already is (for example, pinned SHA256s or a manifest written by the build), or keep the cache outside the world-writable mount.

Why this was flagged

The condition is that another account on the cluster can traverse the runner's home. runners.yaml:579-580 adds agentic-volume-mounts: hf-hub-cache: /hf_hub_cache for b300-dsxe. _lane_volumes (infx/launch/drivers/srt/config.py:216) marks agentic mounts world-writable, and lane_mounts calls _create_dir, which runs path.chmod(0o777) on the expanded ~/.cache/huggingface/hub at every agentic multinode launch. Without a sticky bit, another user can rename inferencex/ in that directory and plant inferencex/kimi-k3-efa/c3fa13ec-e83bf01a-collapse-hs-lb-v1/ with a ready marker. The setup script then skips the build at line 66, extracts the planted tarball into / as container root (line 121) and pip-installs the planted wheel (line 126). On the base branch, b300-dsxe made no world-writable agentic mount and no job installed binaries from a shared cache. The aiconfigurator wheel in the same script is SHA256-checked (lines 137-151); the libfabric tarball and the Mooncake wheel are not.

Verification: It triggers when another account on the b300-dsxe cluster can traverse the runner's home down to ~/.cache/huggingface/hub. lane_mounts (config.py:229) then calls _create_dir(host, world_writable=True), which runs path.chmod(0o777) (config.py:202) with no sticky bit. Nothing verifies the tarball or the wheel.

- kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg
scenario-type:
- agentic-coding
no-evals: true

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.

🟡 (optional) The new B300 Kimi K3 disagg config will collect results with no tool-call or accuracy eval. The changelog entry sets no-evals: true even though all six master rows define an eval-srt-recipe. That flag makes collection run --no-evals for this key, so none of the *_eval recipes in disagg-variants.yaml ever run. The PR claims eval coverage is preserved, but this entry turns it off. Fix: drop no-evals: true so the disagg eval rows run and the new Mooncake/EFA serving stack is validated; or, if evals really are deferred, remove the unused eval-srt-recipe fields and say so.

Why this was flagged

The only changelog block for kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg sets no-evals: true (perf-changelog.yaml:11205). infx/matrix/plan.py:439 skips eval rows for entries with entry.no_evals, and plan.py:529 passes --no-evals to generation. As a result, the eval-srt-recipe: disagg-variants.yaml:override_*_eval on every new master row (nvidia-master.yaml, the six search-space points) produces no eval job. The disaggregated Mooncake/EFA path is new and, per the PR, "remains unverified". It ships with throughput results only, and nothing checks tool-call or accuracy correctness for those results. AGENTS.md permits only one changelog block per PR, so no later entry in this PR turns evals back on.

Verification: The only changelog block for kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg sets no-evals: true. In infx/matrix/plan.py:439-440, if entry.append_only or entry.no_evals: continue skips the whole eval-generation block. With the flag set, none of the six eval-srt-recipe: disagg-variants.yaml:override_*_eval rows added to nvidia-master.yaml ever produce an eval job.

Comment on lines +10402 to +10403
# Aggregated TP16 c1 / TP8 c2,c4 runs already passed (sweep 39476119630); disabled to keep
# reruns focused on the disaggregated Mooncake configs.

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 new agg recipe is orphaned, and master config now carries a commented-out config with a past-results comment. The comment "already passed (sweep 39476119630)" breaks the AGENTS.md no-history rule. Nothing live references agg-megakernel-variants.yaml. Fix: either delete the commented kimik3-fp4-b300-...-dcp8-agg block and the unused kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml, or restore the block as a live entry with no history comment. [also at: inferencex-e2e/configs/runners.yaml:549 - nit: The new exclude comment records node history: uptime dates ("since Oct 6-14"), page-cache observations and past failures.]

Why this was flagged

nvidia-master.yaml:10402-10443 adds a fully commented-out kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg entry. Its header comment records past sweep results and the reason for disabling it, which AGENTS.md:57 prohibits ("No history: ... past results"). The only references to agg-megakernel-variants.yaml:override_tp16_dspark5/override_tp8_dspark7 for b300 are in those commented lines. A grep of configs/ shows the one live hit at nvidia-master.yaml:8361 belongs to a different recipe dir. The new 115-line recipe file therefore merges as dead config that the matrix generator never exercises. The setup script and patches it depends on can drift without anyone noticing.

Verification: nit. Applies on every read of the merged config; nothing breaks at runtime. The diff adds a comment above a fully commented-out agg entry in inferencex-e2e/configs/nvidia-master.yaml (diff lines 165-206, file lines ~10402-10443): "# Aggregated TP16 c1 / TP8 c2,c4 runs already passed (sweep 39476119630); disabled to keep / # reruns focused on the disaggregated Mooncake configs." AGENTS.md:57, which the root CLAUDE.md hands guidance to, says: "No history: how code evolved, what it replaced, where it came from, or past results. Git and perf-changelog.yaml are the record."

@wzhao18 wzhao18 closed this Oct 29, 2026
mispa-ms added a commit that referenced this pull request Oct 30, 2026
Port the GB300 #4516 DCP8 points to 8-GPU B300 nodes over EFA: 1P3D and
1P2D specdecode, 1P2D cap128 c48/c64, 2P3D and 3P4D cap128 c240, and the
aggregated c1 point as TP8/DCP8 on one node. The disaggregated prefill
runs in eager mode, as in #4304; the aggregated worker uses
FULL_DECODE_ONLY and runs the pinned image as shipped.

The disaggregated setup installs the EFA transport at container start
without source patches: EFA installer 1.51.0 as vLLM
docker/Dockerfile.efa installs it, the NIXL 1.5.2 wheel, and Mooncake
v0.3.14-pre built from source. The version binder now passes the master
config's Mooncake version to the script, which checks it against the
version it builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mispa-ms added a commit that referenced this pull request Oct 31, 2026
Port the GB300 #4516 DCP8 points to 8-GPU B300 nodes over EFA: 1P3D and
1P2D specdecode, 1P2D cap128 c48/c64, 2P3D and 3P4D cap128 c240, and the
aggregated c1 point as TP8/DCP8 on one node. The disaggregated prefill
runs in eager mode, as in #4304; the aggregated worker uses
FULL_DECODE_ONLY and runs the pinned image as shipped.

The disaggregated setup installs the EFA transport at container start
without source patches: EFA installer 1.51.0 as vLLM
docker/Dockerfile.efa installs it, the NIXL 1.5.2 wheel, and Mooncake
v0.3.14-pre built from source. The version binder now passes the master
config's Mooncake version to the script, which checks it against the
version it builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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