From c36c2ddc253cbe465a93aaf5167bf9c7d0d47fbf Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 03:23:51 +0000 Subject: [PATCH 01/18] feat(agentx): add Kimi-K3 DSpark LMCache on MI355X MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the TP8 AgentX sweep, validated ROCm image, LMCache MP offload recipe, and launcher routing for Kimi-K3 DSpark. 中文:新增 Kimi-K3 DSpark 在 MI355X 上的 TP8 AgentX 扫描、已验证 ROCm 镜像、LMCache MP 卸载配置及启动器路由。 Co-authored-by: Cursor --- .../kimik3_fp4_mi355x_agentic_dspark.sh | 196 ++++++++++++++++++ configs/amd-master.yaml | 14 ++ perf-changelog.yaml | 10 + runners/launch_mi355x-amds.sh | 11 +- 4 files changed, 230 insertions(+), 1 deletion(-) create mode 100755 benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh new file mode 100755 index 0000000000..e390f333b4 --- /dev/null +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -0,0 +1,196 @@ +#!/usr/bin/env bash +set -euo pipefail +set -x + +# Agentic trace replay benchmark for Kimi-K3 MXFP4 on MI355X using vLLM, +# DSpark speculative decoding, and LMCache MP host-DRAM KV offload. +# +# Required env vars: +# MODEL, TP, CONC, KV_OFFLOADING, KV_OFFLOAD_BACKEND, +# TOTAL_CPU_DRAM_GB, RESULT_DIR, DURATION, EP_SIZE, PORT + +source "$(dirname "$0")/../../benchmark_lib.sh" + +check_env_vars \ + MODEL TP CONC KV_OFFLOADING KV_OFFLOAD_BACKEND TOTAL_CPU_DRAM_GB \ + RESULT_DIR DURATION EP_SIZE PORT + +if [ "$TP" -ne 8 ]; then + echo "Error: Kimi-K3 MXFP4 requires TP=8 on MI355X; got TP=$TP." >&2 + exit 1 +fi + +if [ "$EP_SIZE" -gt 1 ]; then + echo "Error: this Kimi-K3 DSpark recipe supports pure TP8 only; got EP_SIZE=$EP_SIZE." >&2 + exit 1 +fi + +require_agentic_kv_offload_backend lmcache + +if [[ -n "${SLURM_JOB_ID:-}" ]]; then + echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}" +fi + +if [[ -n "${ROCR_VISIBLE_DEVICES:-}" ]]; then + export HIP_VISIBLE_DEVICES="$ROCR_VISIBLE_DEVICES" +fi + +# The cluster launcher mounts its persistent Hugging Face cache here. MODEL_PATH +# may instead point at a pre-staged snapshot. +export HF_HUB_CACHE="${HF_HUB_CACHE:-/models/huggingface_hub}" +if [[ -n "${MODEL_PATH:-}" ]]; then + if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then + hf download "$MODEL" --local-dir "$MODEL_PATH" + fi +else + hf download "$MODEL" + export MODEL_PATH="$MODEL" +fi + +rocm-smi || true +amd-smi || true + +resolve_trace_source +install_agentic_deps + +# Environment used by the validated Kimi-K3 + DSpark + LMCache image. +export PYTHONNOUSERSITE=1 +export PYTHONHASHSEED=42 +export VLLM_ROCM_USE_AITER=1 +export VLLM_ROCM_USE_AITER_MLA=1 +export AITER_SITUV2_A8W4=1 +export AITER_BF16_FP8_MOE_BOUND=0 +export VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION=1 +export VLLM_USE_BREAKABLE_CUDAGRAPH=0 +export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS="${VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS:-1200}" +export VLLM_ENGINE_READY_TIMEOUT_S="${VLLM_ENGINE_READY_TIMEOUT_S:-7200}" +export HSA_NO_SCRATCH_RECLAIM=1 +export SAFETENSORS_FAST_GPU=1 + +SERVER_LOG="$RESULT_DIR/server.log" +LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" +mkdir -p "$RESULT_DIR" + +SERVER_PID="" +LMCACHE_PID="" + +cleanup_services() { + local exit_code=$? + trap - EXIT INT TERM + set +e + stop_background_process_tree "$SERVER_PID" "vLLM server" 60 + stop_background_process_tree "$LMCACHE_PID" "LMCache server" 30 + exit "$exit_code" +} +trap cleanup_services EXIT +trap 'exit 130' INT +trap 'exit 143' TERM + +wait_for_lmcache_ready() { + { set +x; } 2>/dev/null + local attempts="${LMCACHE_READY_ATTEMPTS:-1800}" + local paths=(/healthcheck /health /v1/health /status /) + local i path + + for ((i = 1; i <= attempts; i++)); do + for path in "${paths[@]}"; do + if curl --output /dev/null --silent --fail \ + "http://127.0.0.1:${LMCACHE_HTTP_PORT}${path}"; then + echo "LMCache server healthy after ${i}s (endpoint ${path})" + set -x + return 0 + fi + done + + if ! kill -0 "$LMCACHE_PID" 2>/dev/null; then + echo "LMCache server exited before becoming healthy. Log follows:" >&2 + tail -200 "$LMCACHE_LOG" >&2 || true + exit 1 + fi + + if ((i % 60 == 0)); then + echo "Still waiting for LMCache (${i}s/${attempts}s, L1=${LMCACHE_L1_SIZE_GB}GB)" + fi + sleep 1 + done + + echo "Timed out waiting for LMCache on port $LMCACHE_HTTP_PORT. Log follows:" >&2 + tail -200 "$LMCACHE_LOG" >&2 || true + exit 1 +} + +# This is the pool size validated on the MI355X host. Keep it overridable for +# hosts with a different /dev/shm allocation, but never exceed the matrix's DRAM +# budget. +LMCACHE_L1_SIZE_GB="${LMCACHE_L1_SIZE_GB:-906}" +if [ "$LMCACHE_L1_SIZE_GB" -gt "$TOTAL_CPU_DRAM_GB" ]; then + echo "Error: LMCache L1=${LMCACHE_L1_SIZE_GB}GB exceeds the generated DRAM budget ${TOTAL_CPU_DRAM_GB}GB." >&2 + exit 1 +fi + +LMCACHE_HTTP_PORT="${LMCACHE_HTTP_PORT:-8080}" +LMCACHE_CMD=( + lmcache server + --host 127.0.0.1 + --port 5555 + --http-host 127.0.0.1 + --http-port "$LMCACHE_HTTP_PORT" + --l1-size-gb "$LMCACHE_L1_SIZE_GB" + --l1-init-size-gb 20 + --l1-read-ttl-seconds 7200 + --chunk-size 1536 + --max-workers 8 + --eviction-trigger-watermark 0.85 + --eviction-ratio 0.10 + --eviction-policy LRU +) +printf '%q ' "${LMCACHE_CMD[@]}" > "$RESULT_DIR/lmcache_command.txt" +printf '\n' >> "$RESULT_DIR/lmcache_command.txt" +"${LMCACHE_CMD[@]}" > "$LMCACHE_LOG" 2>&1 & +LMCACHE_PID=$! +echo "LMCache server PID: $LMCACHE_PID" +wait_for_lmcache_ready + +MAX_NUM_SEQS="${MAX_NUM_SEQS:-$CONC}" +SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-3}" +SPEC_DRAFT_MODEL="${SPEC_DRAFT_MODEL:-Inferact/Kimi-K3-DSpark}" +SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" +KV_TRANSFER_CONFIG='{"kv_connector":"LMCacheMPConnector","kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector","kv_role":"kv_both","kv_connector_extra_config":{"lmcache.mp.host":"tcp://127.0.0.1","lmcache.mp.port":5555}}' + +VLLM_CMD=( + vllm serve "$MODEL_PATH" + --served-model-name "$MODEL" + --host 0.0.0.0 + --port "$PORT" + --trust-remote-code + --moe-backend auto + --tensor-parallel-size "$TP" + --load-format auto + --gpu-memory-utilization 0.85 + --mm-encoder-tp-mode data + --max-num-seqs "$MAX_NUM_SEQS" + --max-num-batched-tokens 3000 + --enable-auto-tool-choice + --tool-call-parser kimi_k3 + --reasoning-parser kimi_k3 + --enable-prefix-caching + --mamba-cache-mode align + --kv-cache-dtype fp8 + --enforce-eager + --speculative-config "$SPEC_CONFIG" + --kv-transfer-config "$KV_TRANSFER_CONFIG" +) +printf '%q ' "${VLLM_CMD[@]}" | tee "$RESULT_DIR/vllm_command.txt" +printf '\n' | tee -a "$RESULT_DIR/vllm_command.txt" +"${VLLM_CMD[@]}" > "$SERVER_LOG" 2>&1 & +SERVER_PID=$! +echo "vLLM server PID: $SERVER_PID" + +wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" + +if [ "${EVAL_ONLY:-false}" = "true" ]; then + run_eval --port "$PORT" +else + build_replay_cmd "$RESULT_DIR" + run_agentic_replay_and_write_outputs "$RESULT_DIR" +fi diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index b8f6f4fc31..875fb54469 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -548,6 +548,20 @@ kimik2.5-fp4-mi355x-vllm-agentic: - { tp: 4, kv-offloading: none, conc-list: [16, 24, 32, 40] } - { tp: 4, kv-offloading: dram, kv-offload-backend: { name: vllm-native }, conc-list: [16, 24, 32, 40] } +kimik3-fp4-mi355x-vllm-agentic: + image: haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 + model: moonshotai/Kimi-K3 + model-prefix: kimik3 + runner: cluster:mi355x-amds + precision: fp4 + framework: vllm + multinode: false + scenarios: + agentic-coding: + - dram-utilization: 0.80 + search-space: + - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [1, 4, 8, 16, 32, 64] } + kimik2.5-fp4-mi355x-atom: image: rocm/atom:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.4_202607091539 model: amd/Kimi-K2.5-MXFP4 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 75c8ce68c1..80b53cda52 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5396,3 +5396,13 @@ - "Bump vLLM nightly image to nightly-5e35a6f4f9bbc217c599692157ca985c894373f7 (fixed-len MiniMax-M3 fix); update B300 FP4 MTP recipe YAML container fields to match (excluding 2p1d-dep2-dep4 used by legacy-dep4)" - "Enable VLLM_MINIMAX_M3_MSA_DECODE_BACKEND=cutlass in prefill and decode environments" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2471 + +- config-keys: + - kimik3-fp4-mi355x-vllm-agentic + scenario-type: + - agentic-coding + description: + - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 image" + - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 1 through 64" + - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, and block rejection" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXX diff --git a/runners/launch_mi355x-amds.sh b/runners/launch_mi355x-amds.sh index 75a67c1c58..ccdd2d6879 100644 --- a/runners/launch_mi355x-amds.sh +++ b/runners/launch_mi355x-amds.sh @@ -306,10 +306,19 @@ else export HF_HUB_CACHE_MOUNT="/it-share/hf-hub-cache/" fi + # Kimi-K3's 1.56 TB checkpoint does not fit reliably in the node-local hub + # cache, so use the cluster's pre-staged NFS cache. + if [[ "$MODEL" == moonshotai/Kimi-K3* ]]; then + export HF_HUB_CACHE_MOUNT="/it-share/hf-hub-cache/" + fi + SCRIPT_BASE="${EXP_NAME%%_*}_${PRECISION}_mi355x" + SCRIPT_AGENTIC_DSPARK="benchmarks/single_node/agentic/${SCRIPT_BASE}_agentic_dspark.sh" SCRIPT_FW="benchmarks/single_node/${SCENARIO_SUBDIR:-fixed_seq_len/}${SCRIPT_BASE}_${FRAMEWORK}${SPEC_SUFFIX}.sh" SCRIPT_FALLBACK="benchmarks/single_node/${SCENARIO_SUBDIR:-fixed_seq_len/}${SCRIPT_BASE}${FRAMEWORK_SUFFIX}${SPEC_SUFFIX}.sh" - if [[ -f "$SCRIPT_FW" ]]; then + if [[ "${SCENARIO_SUBDIR:-}" == "agentic/" && "$SPEC_DECODING" == "mtp" && -f "$SCRIPT_AGENTIC_DSPARK" ]]; then + BENCHMARK_SCRIPT="$SCRIPT_AGENTIC_DSPARK" + elif [[ -f "$SCRIPT_FW" ]]; then BENCHMARK_SCRIPT="$SCRIPT_FW" else BENCHMARK_SCRIPT="$SCRIPT_FALLBACK" From cbe08fc255cd12e4a1ce51c108b60f5ff1468a22 Mon Sep 17 00:00:00 2001 From: haic0 <149741444+haic0@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:53:37 +0800 Subject: [PATCH 02/18] Update benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index e390f333b4..fa18e2ca69 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -151,7 +151,10 @@ LMCACHE_PID=$! echo "LMCache server PID: $LMCACHE_PID" wait_for_lmcache_ready -MAX_NUM_SEQS="${MAX_NUM_SEQS:-$CONC}" +# AgentX concurrency counts live session trees, not individual requests. +# Subagent fan-out can push instantaneous request concurrency above CONC, so +# leave 2x headroom rather than clipping those bursts at the scheduler. +MAX_NUM_SEQS="${MAX_NUM_SEQS:-$((2 * CONC))}" SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-3}" SPEC_DRAFT_MODEL="${SPEC_DRAFT_MODEL:-Inferact/Kimi-K3-DSpark}" SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" From 5fdafc4f8cd1823fa78f8041a7c71f7ce8ecdb69 Mon Sep 17 00:00:00 2001 From: haic0 <149741444+haic0@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:54:52 +0800 Subject: [PATCH 03/18] Update benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index fa18e2ca69..70ef32c0b9 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -157,7 +157,11 @@ wait_for_lmcache_ready MAX_NUM_SEQS="${MAX_NUM_SEQS:-$((2 * CONC))}" SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-3}" SPEC_DRAFT_MODEL="${SPEC_DRAFT_MODEL:-Inferact/Kimi-K3-DSpark}" -SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" +SPEC_DRAFT_MODEL_PATH="${SPEC_DRAFT_MODEL_PATH:-$SPEC_DRAFT_MODEL}" +if [[ "$SPEC_DRAFT_MODEL_PATH" == "$SPEC_DRAFT_MODEL" ]]; then + hf download "$SPEC_DRAFT_MODEL" +fi +SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL_PATH}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" KV_TRANSFER_CONFIG='{"kv_connector":"LMCacheMPConnector","kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector","kv_role":"kv_both","kv_connector_extra_config":{"lmcache.mp.host":"tcp://127.0.0.1","lmcache.mp.port":5555}}' VLLM_CMD=( From d70e45fb53206339687ffabf9e7c4ac3d099a74d Mon Sep 17 00:00:00 2001 From: haic0 <149741444+haic0@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:55:05 +0800 Subject: [PATCH 04/18] Update benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 70ef32c0b9..16c7c3b3cb 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -176,7 +176,7 @@ VLLM_CMD=( --gpu-memory-utilization 0.85 --mm-encoder-tp-mode data --max-num-seqs "$MAX_NUM_SEQS" - --max-num-batched-tokens 3000 + --max-num-batched-tokens 32768 --enable-auto-tool-choice --tool-call-parser kimi_k3 --reasoning-parser kimi_k3 From 78d73ae1ce5372ef0cf285490a7060044e7bbb07 Mon Sep 17 00:00:00 2001 From: haic0 <149741444+haic0@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:58:21 +0800 Subject: [PATCH 05/18] Update benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 16c7c3b3cb..7927e55ffd 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -162,7 +162,7 @@ if [[ "$SPEC_DRAFT_MODEL_PATH" == "$SPEC_DRAFT_MODEL" ]]; then hf download "$SPEC_DRAFT_MODEL" fi SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL_PATH}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" -KV_TRANSFER_CONFIG='{"kv_connector":"LMCacheMPConnector","kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector","kv_role":"kv_both","kv_connector_extra_config":{"lmcache.mp.host":"tcp://127.0.0.1","lmcache.mp.port":5555}}' +KV_TRANSFER_CONFIG='{"kv_connector":"LMCacheMPConnector","kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector","kv_role":"kv_both","kv_connector_extra_config":{"lmcache.mp.host":"tcp://127.0.0.1","lmcache.mp.port":5555,"lmcache.mp.mq_timeout":6000.0}}' VLLM_CMD=( vllm serve "$MODEL_PATH" From 13ef7f93bea5cd7ceb5204789d9f3df8414943d9 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 07:03:21 +0000 Subject: [PATCH 06/18] fix(agentx): wait for clean MI355X VRAM before Kimi-K3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Invoke the GPU-drain gate added by PR #2490 before downloading or loading Kimi-K3, preventing overlap with memory still held by a prior Slurm job. 中文:在下载或加载 Kimi-K3 前调用 PR #2490 新增的 GPU 清理门禁,避免与上一 Slurm 任务尚未释放的显存重叠。 Co-authored-by: Cursor --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 7927e55ffd..295fa7b0b9 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -35,6 +35,10 @@ if [[ -n "${ROCR_VISIBLE_DEVICES:-}" ]]; then export HIP_VISIBLE_DEVICES="$ROCR_VISIBLE_DEVICES" fi +# Do not start the large Kimi-K3 load while a previous Slurm job is still +# releasing VRAM on the allocated MI355X GPUs. +wait_for_amd_gpu_clean + # The cluster launcher mounts its persistent Hugging Face cache here. MODEL_PATH # may instead point at a pre-staged snapshot. export HF_HUB_CACHE="${HF_HUB_CACHE:-/models/huggingface_hub}" From a2df37faa7ab36ccc48ecfa45d852d8237001743 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 07:32:54 +0000 Subject: [PATCH 07/18] fix(agentx): tune Kimi-K3 DSpark serving limits Cap batched tokens for stable agentic scheduling and align the validated LMCache and speculative-decoding settings. Co-authored-by: Cursor --- .../agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 295fa7b0b9..d7d0590186 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -133,10 +133,11 @@ if [ "$LMCACHE_L1_SIZE_GB" -gt "$TOTAL_CPU_DRAM_GB" ]; then fi LMCACHE_HTTP_PORT="${LMCACHE_HTTP_PORT:-8080}" +LMCACHE_MP_PORT="${LMCACHE_MP_PORT:-6000}" LMCACHE_CMD=( lmcache server --host 127.0.0.1 - --port 5555 + --port "$LMCACHE_MP_PORT" --http-host 127.0.0.1 --http-port "$LMCACHE_HTTP_PORT" --l1-size-gb "$LMCACHE_L1_SIZE_GB" @@ -159,14 +160,14 @@ wait_for_lmcache_ready # Subagent fan-out can push instantaneous request concurrency above CONC, so # leave 2x headroom rather than clipping those bursts at the scheduler. MAX_NUM_SEQS="${MAX_NUM_SEQS:-$((2 * CONC))}" -SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-3}" +SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-4}" SPEC_DRAFT_MODEL="${SPEC_DRAFT_MODEL:-Inferact/Kimi-K3-DSpark}" SPEC_DRAFT_MODEL_PATH="${SPEC_DRAFT_MODEL_PATH:-$SPEC_DRAFT_MODEL}" if [[ "$SPEC_DRAFT_MODEL_PATH" == "$SPEC_DRAFT_MODEL" ]]; then hf download "$SPEC_DRAFT_MODEL" fi SPEC_CONFIG="{\"model\":\"${SPEC_DRAFT_MODEL_PATH}\",\"num_speculative_tokens\":${SPEC_NUM_TOKENS},\"method\":\"dspark\",\"attention_backend\":\"TRITON_MLA\",\"draft_sample_method\":\"probabilistic\",\"rejection_sample_method\":\"block\"}" -KV_TRANSFER_CONFIG='{"kv_connector":"LMCacheMPConnector","kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector","kv_role":"kv_both","kv_connector_extra_config":{"lmcache.mp.host":"tcp://127.0.0.1","lmcache.mp.port":5555,"lmcache.mp.mq_timeout":6000.0}}' +KV_TRANSFER_CONFIG="{\"kv_connector\":\"LMCacheMPConnector\",\"kv_connector_module_path\":\"lmcache.integration.vllm.lmcache_mp_connector\",\"kv_role\":\"kv_both\",\"kv_connector_extra_config\":{\"lmcache.mp.host\":\"tcp://127.0.0.1\",\"lmcache.mp.port\":${LMCACHE_MP_PORT}}}" VLLM_CMD=( vllm serve "$MODEL_PATH" @@ -180,14 +181,13 @@ VLLM_CMD=( --gpu-memory-utilization 0.85 --mm-encoder-tp-mode data --max-num-seqs "$MAX_NUM_SEQS" - --max-num-batched-tokens 32768 + --max-num-batched-tokens 3000 --enable-auto-tool-choice --tool-call-parser kimi_k3 --reasoning-parser kimi_k3 --enable-prefix-caching --mamba-cache-mode align --kv-cache-dtype fp8 - --enforce-eager --speculative-config "$SPEC_CONFIG" --kv-transfer-config "$KV_TRANSFER_CONFIG" ) From 1ecd3c07cd6c47f4ffbb0216fee9d0f8e4cdce34 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 07:34:06 +0000 Subject: [PATCH 08/18] docs(agentx): align Kimi-K3 benchmark settings Keep the performance changelog synchronized with the validated scheduler and speculative-decoding configuration. Co-authored-by: Cursor --- perf-changelog.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 7ed3a5841f..76cdef47af 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5457,5 +5457,5 @@ description: - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 image" - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 1 through 64" - - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, and block rejection" - pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXX + - "Use Inferact/Kimi-K3-DSpark with four speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, and a 3000-token scheduler cap" + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496 From 040546012c8306bbfea39207cf9d6d0dcacadc29 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 08:50:17 +0000 Subject: [PATCH 09/18] fix(agentx): patch Kimi-K3 DSpark MLA verification Apply the pinned upstream FP8 verification fix, reduce speculative depth, and use eager execution so the MI355X sweep can start reliably. Co-authored-by: Cursor --- .../kimik3_fp4_mi355x_agentic_dspark.sh | 45 ++++++++++++++++++- docs/waiver/2496.md | 33 ++++++++++++++ perf-changelog.yaml | 3 +- 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 docs/waiver/2496.md diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index d7d0590186..1bcf8efa36 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -57,6 +57,46 @@ amd-smi || true resolve_trace_source install_agentic_deps +# Apply the upstream Kimi-K3 DSpark FP8 MLA verification fix until the pinned +# image includes vLLM PR #50619. The immutable compare URL and checksum make +# this reproducible; git-apply checks fail loudly if the image has drifted. +apply_vllm_pr_50619() { + local base_sha="38a466e7b6e087d67c35e7f924c04c245423c99f" + local head_sha="a9f790851885589ea41b2b99ee750e044573bebd" + local patch_sha256="fa7200baae57af574ad018a92fff91430e864bd5609772a89e75fd9743c5abce" + local patch_file vllm_site_parent + + patch_file="$(mktemp)" + curl --fail --location --retry 3 --silent --show-error \ + "https://github.com/vllm-project/vllm/compare/${base_sha}...${head_sha}.patch" \ + --output "$patch_file" + echo "${patch_sha256} ${patch_file}" | sha256sum --check --status + + vllm_site_parent="$(python3 - <<'PY' +import importlib.util +from pathlib import Path + +spec = importlib.util.find_spec("vllm") +if spec is None or not spec.submodule_search_locations: + raise SystemExit("Unable to locate the installed vLLM package") +print(Path(next(iter(spec.submodule_search_locations))).resolve().parent) +PY +)" + + if git -C "$vllm_site_parent" apply --reverse --check \ + --include='vllm/**' "$patch_file" 2>/dev/null; then + echo "vLLM PR #50619 is already applied" + else + git -C "$vllm_site_parent" apply --check \ + --include='vllm/**' "$patch_file" + git -C "$vllm_site_parent" apply \ + --include='vllm/**' "$patch_file" + echo "Applied vLLM PR #50619 at ${head_sha}" + fi + rm -f "$patch_file" +} +apply_vllm_pr_50619 + # Environment used by the validated Kimi-K3 + DSpark + LMCache image. export PYTHONNOUSERSITE=1 export PYTHONHASHSEED=42 @@ -65,7 +105,6 @@ export VLLM_ROCM_USE_AITER_MLA=1 export AITER_SITUV2_A8W4=1 export AITER_BF16_FP8_MOE_BOUND=0 export VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION=1 -export VLLM_USE_BREAKABLE_CUDAGRAPH=0 export VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS="${VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS:-1200}" export VLLM_ENGINE_READY_TIMEOUT_S="${VLLM_ENGINE_READY_TIMEOUT_S:-7200}" export HSA_NO_SCRATCH_RECLAIM=1 @@ -160,7 +199,7 @@ wait_for_lmcache_ready # Subagent fan-out can push instantaneous request concurrency above CONC, so # leave 2x headroom rather than clipping those bursts at the scheduler. MAX_NUM_SEQS="${MAX_NUM_SEQS:-$((2 * CONC))}" -SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-4}" +SPEC_NUM_TOKENS="${SPEC_NUM_TOKENS:-3}" SPEC_DRAFT_MODEL="${SPEC_DRAFT_MODEL:-Inferact/Kimi-K3-DSpark}" SPEC_DRAFT_MODEL_PATH="${SPEC_DRAFT_MODEL_PATH:-$SPEC_DRAFT_MODEL}" if [[ "$SPEC_DRAFT_MODEL_PATH" == "$SPEC_DRAFT_MODEL" ]]; then @@ -188,6 +227,8 @@ VLLM_CMD=( --enable-prefix-caching --mamba-cache-mode align --kv-cache-dtype fp8 + # Keep eager execution until the patched graph path is validated in this image. + --enforce-eager --speculative-config "$SPEC_CONFIG" --kv-transfer-config "$KV_TRANSFER_CONFIG" ) diff --git a/docs/waiver/2496.md b/docs/waiver/2496.md new file mode 100644 index 0000000000..5ac4c51723 --- /dev/null +++ b/docs/waiver/2496.md @@ -0,0 +1,33 @@ +# Serving-stack patch waiver for PR #2496 + +## What is patched + +The Kimi-K3 MI355X AgentX launcher applies the production-file portion of +[vLLM PR #50619](https://github.com/vllm-project/vllm/pull/50619) to the vLLM +installation in `haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804`. +The patch is pinned to base `38a466e7b6e087d67c35e7f924c04c245423c99f`, +head `a9f790851885589ea41b2b99ee750e044573bebd`, and a SHA-256 checksum. It fixes +Kimi-K3 TP8 DSpark FP8 MLA verification by preserving native causal +multi-token Gluon queries and the target model's CUDA-graph policy. + +## Why the unmodified image cannot run this benchmark + +The image's current vLLM expands each DSpark verification token into an +independent Gluon MLA row. During engine warmup, 16 requests with the +four-token draft configuration produced 144 rows and exceeded the kernel's +maximum batch size of 128, preventing EngineCore from starting. Reducing the +draft to three tokens and temporarily enabling eager execution lowers risk, +but neither is a complete serving-stack correction for multi-token FP8 MLA +verification. + +The failure is recorded in +[run 30985536172](https://github.com/SemiAnalysisAI/InferenceX/actions/runs/30985536172/job/92239885715). +The upstream Kimi-K3 ROCm roadmap is tracked in +[vLLM issue #50682](https://github.com/vllm-project/vllm/issues/50682). + +## Removal plan + +Remove the runtime patch and this waiver after PR #50619, or its upstream +replacement, is merged and included in an upstream `vllm/vllm-openai-rocm` +image validated for Kimi-K3 TP8 DSpark with FP8 KV cache and LMCache. Replace +the personal image with that upstream image in the same update. diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 76cdef47af..9d1974c6b3 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5457,5 +5457,6 @@ description: - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 image" - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 1 through 64" - - "Use Inferact/Kimi-K3-DSpark with four speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, and a 3000-token scheduler cap" + - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" + - "Apply the pinned vLLM PR #50619 fix for native causal Kimi-K3 DSpark FP8 MLA verification" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496 From 5bd0fe7fa0f20b8e101bf28bb51dec0ff01c404b Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Wed, 5 Aug 2026 10:12:19 +0000 Subject: [PATCH 10/18] fix(agentx): use Kimi-K3 image with DSpark fix Switch to the image with vLLM PR #50619 baked in so runners no longer depend on a fragile runtime patch. Co-authored-by: Cursor --- .../kimik3_fp4_mi355x_agentic_dspark.sh | 40 ------------------- configs/amd-master.yaml | 2 +- docs/waiver/2496.md | 23 ++++++----- perf-changelog.yaml | 4 +- 4 files changed, 15 insertions(+), 54 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 1bcf8efa36..be47e680e6 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -57,46 +57,6 @@ amd-smi || true resolve_trace_source install_agentic_deps -# Apply the upstream Kimi-K3 DSpark FP8 MLA verification fix until the pinned -# image includes vLLM PR #50619. The immutable compare URL and checksum make -# this reproducible; git-apply checks fail loudly if the image has drifted. -apply_vllm_pr_50619() { - local base_sha="38a466e7b6e087d67c35e7f924c04c245423c99f" - local head_sha="a9f790851885589ea41b2b99ee750e044573bebd" - local patch_sha256="fa7200baae57af574ad018a92fff91430e864bd5609772a89e75fd9743c5abce" - local patch_file vllm_site_parent - - patch_file="$(mktemp)" - curl --fail --location --retry 3 --silent --show-error \ - "https://github.com/vllm-project/vllm/compare/${base_sha}...${head_sha}.patch" \ - --output "$patch_file" - echo "${patch_sha256} ${patch_file}" | sha256sum --check --status - - vllm_site_parent="$(python3 - <<'PY' -import importlib.util -from pathlib import Path - -spec = importlib.util.find_spec("vllm") -if spec is None or not spec.submodule_search_locations: - raise SystemExit("Unable to locate the installed vLLM package") -print(Path(next(iter(spec.submodule_search_locations))).resolve().parent) -PY -)" - - if git -C "$vllm_site_parent" apply --reverse --check \ - --include='vllm/**' "$patch_file" 2>/dev/null; then - echo "vLLM PR #50619 is already applied" - else - git -C "$vllm_site_parent" apply --check \ - --include='vllm/**' "$patch_file" - git -C "$vllm_site_parent" apply \ - --include='vllm/**' "$patch_file" - echo "Applied vLLM PR #50619 at ${head_sha}" - fi - rm -f "$patch_file" -} -apply_vllm_pr_50619 - # Environment used by the validated Kimi-K3 + DSpark + LMCache image. export PYTHONNOUSERSITE=1 export PYTHONHASHSEED=42 diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index f34ee0bd62..7ffc7cd43b 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -465,7 +465,7 @@ kimik2.5-fp4-mi355x-vllm: - { tp: 4, conc-start: 4, conc-end: 128 } kimik3-fp4-mi355x-vllm-agentic: - image: haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 + image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50619-20260805 model: moonshotai/Kimi-K3 model-prefix: kimik3 runner: cluster:mi355x-amds diff --git a/docs/waiver/2496.md b/docs/waiver/2496.md index 5ac4c51723..47b81279a9 100644 --- a/docs/waiver/2496.md +++ b/docs/waiver/2496.md @@ -2,13 +2,14 @@ ## What is patched -The Kimi-K3 MI355X AgentX launcher applies the production-file portion of -[vLLM PR #50619](https://github.com/vllm-project/vllm/pull/50619) to the vLLM -installation in `haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804`. -The patch is pinned to base `38a466e7b6e087d67c35e7f924c04c245423c99f`, -head `a9f790851885589ea41b2b99ee750e044573bebd`, and a SHA-256 checksum. It fixes -Kimi-K3 TP8 DSpark FP8 MLA verification by preserving native causal -multi-token Gluon queries and the target model's CUDA-graph policy. +The Kimi-K3 MI355X AgentX configuration uses +`haihub007/hc-gpu:kimik3-dspark-lmcache-pr50619-20260805`, which contains the +production-file portion of +[vLLM PR #50619](https://github.com/vllm-project/vllm/pull/50619) rebased onto +the image's vLLM revision `124154a88`. It fixes Kimi-K3 TP8 DSpark FP8 MLA +verification by preserving native causal multi-token Gluon queries and the +target model's CUDA-graph policy. The published image digest is +`sha256:3b5b0131f89be08d34d431f2c4e45e32606f9dff0e3aace79272489e788e6eda`. ## Why the unmodified image cannot run this benchmark @@ -27,7 +28,7 @@ The upstream Kimi-K3 ROCm roadmap is tracked in ## Removal plan -Remove the runtime patch and this waiver after PR #50619, or its upstream -replacement, is merged and included in an upstream `vllm/vllm-openai-rocm` -image validated for Kimi-K3 TP8 DSpark with FP8 KV cache and LMCache. Replace -the personal image with that upstream image in the same update. +Remove this waiver after PR #50619, or its upstream replacement, is merged and +included in an upstream `vllm/vllm-openai-rocm` image validated for Kimi-K3 +TP8 DSpark with FP8 KV cache and LMCache. Replace the personal image with that +upstream image in the same update. diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 9d1974c6b3..143caf7c02 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5455,8 +5455,8 @@ scenario-type: - agentic-coding description: - - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-working-20260804 image" + - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50619-20260805 image" - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 1 through 64" - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" - - "Apply the pinned vLLM PR #50619 fix for native causal Kimi-K3 DSpark FP8 MLA verification" + - "Use vLLM PR #50619 rebased onto the image's vLLM revision for native causal Kimi-K3 DSpark FP8 MLA verification" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496 From 091b396b1ec8a67a547b279a83e193e3a15c78bc Mon Sep 17 00:00:00 2001 From: haic0 <149741444+haic0@users.noreply.github.com> Date: Wed, 5 Aug 2026 22:07:34 +0800 Subject: [PATCH 11/18] Update amd-master.yaml --- configs/amd-master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 7ffc7cd43b..d82d763dce 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -476,7 +476,7 @@ kimik3-fp4-mi355x-vllm-agentic: agentic-coding: - dram-utilization: 0.80 search-space: - - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [1, 4, 8, 16, 32, 64] } + - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [1, 4, 8] } kimik2.5-fp4-mi355x-atom: image: rocm/atom:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.4_202607091539 From 65bd3c4030f7b800da57e48a51106a4c31b4887c Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 02:22:31 +0000 Subject: [PATCH 12/18] fix(agentx): pin v1.0.0 and skip fast-run evals Pin AgentX to the requested v1.0.0 release and keep agentx-fast sweeps throughput-only so short validation runs do not dispatch a separate GSM8K evaluation. Co-authored-by: Cursor --- .github/workflows/run-sweep.yml | 1 + utils/aiperf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-sweep.yml b/.github/workflows/run-sweep.yml index b46c4c5901..89a7ed5a83 100644 --- a/.github/workflows/run-sweep.yml +++ b/.github/workflows/run-sweep.yml @@ -747,6 +747,7 @@ jobs: if: >- ${{ !cancelled() && + !contains(github.event.pull_request.labels.*.name, 'agentx-fast') && needs.setup.result == 'success' && needs.setup.outputs.reuse-enabled != 'true' && (needs.canary-sweep.result == 'success' || needs.canary-sweep.result == 'skipped') && diff --git a/utils/aiperf b/utils/aiperf index b7b16cf851..818c3a5a29 160000 --- a/utils/aiperf +++ b/utils/aiperf @@ -1 +1 @@ -Subproject commit b7b16cf851885567988a643282266bce74e34437 +Subproject commit 818c3a5a2922c535af6271ff296ed374e292b8e4 From 8244d9d1d65b212834a8628b10a88aba74b91746 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 03:57:18 +0000 Subject: [PATCH 13/18] fix(agentx): use patched Kimi-K3 ROCm image Move the MI355X sweep to the image containing the skinny-GEMM, FP8 MLA prefill, DSpark verification, and large-KV fixes, while disabling the unsafe skinny-GEMM path as a defensive fallback. Co-authored-by: Cursor --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 1 + configs/amd-master.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index be47e680e6..3f4cbb8401 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -62,6 +62,7 @@ export PYTHONNOUSERSITE=1 export PYTHONHASHSEED=42 export VLLM_ROCM_USE_AITER=1 export VLLM_ROCM_USE_AITER_MLA=1 +export VLLM_ROCM_USE_SKINNY_GEMM=0 export AITER_SITUV2_A8W4=1 export AITER_BF16_FP8_MOE_BOUND=0 export VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION=1 diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index d82d763dce..d4410fe0da 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -465,7 +465,7 @@ kimik2.5-fp4-mi355x-vllm: - { tp: 4, conc-start: 4, conc-end: 128 } kimik3-fp4-mi355x-vllm-agentic: - image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50619-20260805 + image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806 model: moonshotai/Kimi-K3 model-prefix: kimik3 runner: cluster:mi355x-amds From 23bff1a4a1eda71a36c682105ca6cc18149f5b93 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 05:51:39 +0000 Subject: [PATCH 14/18] fix(agentx): rerun patched Kimi-K3 at c2 Use a single concurrency-2 AgentX validation with the rebuilt combined ROCm image and keep the changelog aligned with its integrated fixes. Co-authored-by: Cursor --- configs/amd-master.yaml | 2 +- perf-changelog.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index d4410fe0da..92619c5c1f 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -476,7 +476,7 @@ kimik3-fp4-mi355x-vllm-agentic: agentic-coding: - dram-utilization: 0.80 search-space: - - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [1, 4, 8] } + - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [2] } kimik2.5-fp4-mi355x-atom: image: rocm/atom:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.4_202607091539 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index af54eb32fd..0c56d3417f 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5465,8 +5465,8 @@ scenario-type: - agentic-coding description: - - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50619-20260805 image" - - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 1 through 64" + - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806 image" + - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 2" - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" - - "Use vLLM PR #50619 rebased onto the image's vLLM revision for native causal Kimi-K3 DSpark FP8 MLA verification" + - "Combine vLLM PRs #50618, #50619, and #51040 with AITER PR #4474, remove the integration import shadow, and disable skinny GEMM" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496 From 0ccacf664a724435a5a39b23e7e1fd4d1ae0097d Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 06:23:10 +0000 Subject: [PATCH 15/18] fix(agentx): use immutable Kimi-K3 shadowfix image Move the c2 validation to a fresh image tag so MI355X squashfs caching cannot reuse the pre-shadow-fix container. Co-authored-by: Cursor --- configs/amd-master.yaml | 2 +- perf-changelog.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 92619c5c1f..7c4465277d 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -465,7 +465,7 @@ kimik2.5-fp4-mi355x-vllm: - { tp: 4, conc-start: 4, conc-end: 128 } kimik3-fp4-mi355x-vllm-agentic: - image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806 + image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806-shadowfix1 model: moonshotai/Kimi-K3 model-prefix: kimik3 runner: cluster:mi355x-amds diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 0c56d3417f..40f51672ed 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5465,7 +5465,7 @@ scenario-type: - agentic-coding description: - - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806 image" + - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806-shadowfix1 image" - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 2" - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" - "Combine vLLM PRs #50618, #50619, and #51040 with AITER PR #4474, remove the integration import shadow, and disable skinny GEMM" From a53c228028fa8873f066ddeef9ca5355f53340e8 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 07:28:46 +0000 Subject: [PATCH 16/18] fix(agentx): use Kimi-K3 MLA fallback image Route the c2 validation through the image that keeps 12-head single-token decode on Gluon, avoiding the unavailable padded AITER ASM kernel. Co-authored-by: Cursor --- configs/amd-master.yaml | 2 +- perf-changelog.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 7c4465277d..eef2e01fc2 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -465,7 +465,7 @@ kimik2.5-fp4-mi355x-vllm: - { tp: 4, conc-start: 4, conc-end: 128 } kimik3-fp4-mi355x-vllm-agentic: - image: haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806-shadowfix1 + image: haihub007/hc-gpu:kimik3-dspark-lmcache-fix2 model: moonshotai/Kimi-K3 model-prefix: kimik3 runner: cluster:mi355x-amds diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 40f51672ed..131fa0862b 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5465,7 +5465,7 @@ scenario-type: - agentic-coding description: - - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-pr50618-pr51040-aiter4474-20260806-shadowfix1 image" + - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-fix2 image" - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 2" - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" - "Combine vLLM PRs #50618, #50619, and #51040 with AITER PR #4474, remove the integration import shadow, and disable skinny GEMM" From c3f12c3bc919bf52d051632a222e6852c01fff7a Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 11:54:56 +0000 Subject: [PATCH 17/18] perf(agentx): expand Kimi-K3 concurrency sweep Exercise graph execution with prefix caching across concurrency 2 through 32 now that the MLA fallback image completes the c2 run. Co-authored-by: Cursor --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 2 -- configs/amd-master.yaml | 2 +- perf-changelog.yaml | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 3f4cbb8401..83e2121f29 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -188,8 +188,6 @@ VLLM_CMD=( --enable-prefix-caching --mamba-cache-mode align --kv-cache-dtype fp8 - # Keep eager execution until the patched graph path is validated in this image. - --enforce-eager --speculative-config "$SPEC_CONFIG" --kv-transfer-config "$KV_TRANSFER_CONFIG" ) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index eef2e01fc2..1f6a6f5b60 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -476,7 +476,7 @@ kimik3-fp4-mi355x-vllm-agentic: agentic-coding: - dram-utilization: 0.80 search-space: - - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [2] } + - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [2, 4, 8, 16, 32] } kimik2.5-fp4-mi355x-atom: image: rocm/atom:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.4_202607091539 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 131fa0862b..0e996567d7 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5466,7 +5466,7 @@ - agentic-coding description: - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-fix2 image" - - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 2" - - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, eager execution, and a 3000-token scheduler cap" + - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency sweep [2, 4, 8, 16, 32]" + - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, default graph execution, and a 3000-token scheduler cap" - "Combine vLLM PRs #50618, #50619, and #51040 with AITER PR #4474, remove the integration import shadow, and disable skinny GEMM" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496 From 22f2aa523b8f10be7ec6b70dcb9082e4ab5ab357 Mon Sep 17 00:00:00 2001 From: "haichzha@amd.com" Date: Thu, 6 Aug 2026 14:51:35 +0000 Subject: [PATCH 18/18] fix(agentx): isolate Kimi-K3 piecewise graph run Use TRITON_MLA with piecewise graph capture and fused RMS norm gating at concurrency 4 to narrow the prior full-graph sampling failure. Co-authored-by: Cursor --- .../single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh | 2 ++ configs/amd-master.yaml | 2 +- perf-changelog.yaml | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh index 83e2121f29..f86234bf2d 100755 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_agentic_dspark.sh @@ -188,6 +188,8 @@ VLLM_CMD=( --enable-prefix-caching --mamba-cache-mode align --kv-cache-dtype fp8 + --attention-backend TRITON_MLA + --compilation-config '{"cudagraph_mode":"PIECEWISE","custom_ops":["+fused_rms_norm_gated"]}' --speculative-config "$SPEC_CONFIG" --kv-transfer-config "$KV_TRANSFER_CONFIG" ) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 1f6a6f5b60..e529c5e04c 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -476,7 +476,7 @@ kimik3-fp4-mi355x-vllm-agentic: agentic-coding: - dram-utilization: 0.80 search-space: - - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [2, 4, 8, 16, 32] } + - { tp: 8, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.3rc2" }, spec-decoding: mtp, conc-list: [4] } kimik2.5-fp4-mi355x-atom: image: rocm/atom:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0_atom0.1.4_202607091539 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index 0e996567d7..1fb34de760 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5466,7 +5466,7 @@ - agentic-coding description: - "Add Kimi-K3 MXFP4 DSpark speculative decoding on TP8 MI355X with the validated haihub007/hc-gpu:kimik3-dspark-lmcache-fix2 image" - - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency sweep [2, 4, 8, 16, 32]" - - "Use Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, TRITON_MLA, block rejection, default graph execution, and a 3000-token scheduler cap" + - "Run LMCache 0.5.3rc2 MP host-DRAM offload with a 906 GB L1 pool, FP8 KV cache, Mamba alignment, and concurrency 4" + - "Use TRITON_MLA with PIECEWISE CUDA graphs, fused RMS norm gating, and Inferact/Kimi-K3-DSpark with three speculative tokens, probabilistic drafting, block rejection, and a 3000-token scheduler cap" - "Combine vLLM PRs #50618, #50619, and #51040 with AITER PR #4474, remove the integration import shadow, and disable skinny GEMM" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2496