From 7cd89a69d4931c275199a7db31d71cdc0dcbd177 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 00:53:43 -0400 Subject: [PATCH 01/33] feat: add Kimi K3 B300 EFA AgentX sweep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 Kimi K3 B300 EFA AgentX 扫描配置,并适配八卡节点和传输依赖。 Signed-off-by: wzhao18 --- .../configs/kimik3-b300-efa-setup.sh | 95 +++++ .../configs/libfabric-efa-vmm.patch | 251 ++++++++++++ .../agentx/agg-megakernel-variants.yaml | 103 +++++ .../vllm/b300-fp4/agentx/disagg-variants.yaml | 384 ++++++++++++++++++ inferencex-e2e/configs/nvidia-master.yaml | 196 +++++++++ inferencex-e2e/configs/runners.yaml | 2 + .../infx/launch/drivers/srt/power.py | 7 +- .../infx/tests/launch/test_launch_policy.py | 5 +- 8 files changed, 1041 insertions(+), 2 deletions(-) create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/libfabric-efa-vmm.patch create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh new file mode 100644 index 0000000000..98eb69b119 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash +set -eo pipefail + +source /infmax-workspace/benchmarks/check_env.sh +check_env_vars KIMI_EFA_BUILD_CACHE LD_LIBRARY_PATH + +export DEBIAN_FRONTEND=noninteractive +apt-get update -qq +apt-get install -y -qq --no-install-recommends \ + autoconf automake build-essential ca-certificates curl git libboost-filesystem-dev \ + libboost-system-dev libcurl4-openssl-dev libgflags-dev libgoogle-glog-dev \ + libhwloc15 libibverbs-dev libjsoncpp-dev libnuma-dev libprotobuf-dev libssl-dev \ + libtool libyaml-cpp-dev numactl patchelf pkg-config protobuf-compiler cuda-nvml-dev-13-0 + +task_dir=$(mktemp -d /tmp/kimi-k3-efa.XXXXXX) +curl -fsSL --retry 3 --retry-all-errors \ + https://efa-installer.amazonaws.com/aws-efa-installer-1.50.0.tar.gz \ + -o "$task_dir/efa.tar.gz" +printf '%s %s\n' \ + fa6dff8593d866866c13cb4640d9059835cd4efa427971f100ab40c97bef2841 \ + "$task_dir/efa.tar.gz" | sha256sum -c - +tar -xzf "$task_dir/efa.tar.gz" -C "$task_dir" +( + cd "$task_dir/aws-efa-installer" + ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify --skip-mpi +) + +cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v1" +mkdir -p "$cache" +exec 9>"$cache/build.lock" +flock 9 +if [ ! -f "$cache/ready" ]; then + git clone https://github.com/ofiwg/libfabric.git "$task_dir/libfabric" + git -C "$task_dir/libfabric" checkout --detach e83bf01a834a1a7c776d93efcaee3f8f28ff2705 + git -C "$task_dir/libfabric" apply \ + "$(dirname "${BASH_SOURCE[0]}")/libfabric-efa-vmm.patch" + ( + cd "$task_dir/libfabric" + export PKG_CONFIG_PATH=/opt/amazon/efa/lib/pkgconfig + export CPPFLAGS=-I/opt/amazon/efa/include + export LDFLAGS=-L/opt/amazon/efa/lib + ./autogen.sh + ./configure --prefix=/opt/amazon/efa --with-cuda=/usr/local/cuda \ + --enable-cuda-dlopen --enable-efa=yes --disable-static + make -j12 + make DESTDIR="$task_dir/fabric-install" install + ) + tar -czf "$cache/libfabric.tar.gz" -C "$task_dir/fabric-install" opt/amazon/efa + tar -xzf "$cache/libfabric.tar.gz" -C / + ldconfig + + python3 -m pip install --no-cache-dir \ + 'cmake==4.4.4' 'build==1.6.1' 'auditwheel==6.8.2' \ + 'wheel==0.48.0' 'setuptools==84.0.0' numpy 'pybind11==3.1.0' + 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 + mkdir -p "$task_dir/wheels" + EFA_CU13_BUILD=1 OUTPUT_DIR="$task_dir/wheels" bash scripts/build_wheel.sh + ) + cp "$task_dir/wheels/"*.whl "$cache/" + touch "$cache/ready" +fi +tar -xzf "$cache/libfabric.tar.gz" -C / +ldconfig +python3 -m pip uninstall -y \ + mooncake-transfer-engine mooncake-transfer-engine-cuda13 mooncake-transfer-engine-efa-cuda13 +python3 -m pip install --no-deps "$cache/"*.whl +flock -u 9 + +/opt/amazon/efa/bin/fi_info --version +/opt/amazon/efa/bin/fi_info -p efa -t FI_EP_RDM +python3 - <<'PY' +import ctypes +import importlib.metadata +from mooncake.store import MooncakeDistributedStore + +fabric = ctypes.CDLL("libfabric.so.1") +fabric.fi_version.restype = ctypes.c_uint32 +assert fabric.fi_version() == (2 << 16 | 6) +assert importlib.metadata.version("mooncake-transfer-engine-efa-cuda13") == "0.3.13.post1+gc3fa13ec" +print("EFA libfabric 2.6 and THP-enabled Mooncake Store are available") +PY diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/libfabric-efa-vmm.patch b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/libfabric-efa-vmm.patch new file mode 100644 index 0000000000..e054bcfa74 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/libfabric-efa-vmm.patch @@ -0,0 +1,251 @@ +diff --git a/configure.ac b/configure.ac +index 1357bc0..93a416e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -739,6 +739,7 @@ have_cuda=0 + cuda_dlopen=0 + have_cuda_dmabuf=0 + have_cuda_dmabuf_mapping_type_pcie=0 ++have_cuda_ctx_sync_memops=0 + AC_ARG_ENABLE([cuda-dlopen], + [AS_HELP_STRING([--enable-cuda-dlopen], + [Enable dlopen of CUDA libraries @<:@default=no@:>@]) +@@ -794,6 +795,10 @@ AS_IF([test x"$with_cuda" != x"no"], + [], + [have_cuda_dmabuf_mapping_type_pcie=0], + [[#include ]]) ++ AC_CHECK_DECL([CU_CTX_SYNC_MEMOPS], ++ [have_cuda_ctx_sync_memops=1], ++ [], ++ [[#include ]]) + ]) + + AC_DEFINE_UNQUOTED([ENABLE_CUDA_DLOPEN], [$cuda_dlopen], [dlopen CUDA libraries]) +@@ -802,6 +807,7 @@ AS_IF([test x"$with_cuda" != x"no" && test -n "$with_cuda" && test "$have_cuda" + [AC_MSG_ERROR([CUDA support requested but CUDA runtime not available.])]) + + AC_DEFINE_UNQUOTED([HAVE_CUDA], [$have_cuda], [CUDA support]) ++AC_DEFINE_UNQUOTED([HAVE_CUDA_CTX_SYNC_MEMOPS], [$have_cuda_ctx_sync_memops], [CUDA context-wide sync memops support]) + + AC_DEFINE_UNQUOTED([HAVE_CUDA_DMABUF], [$have_cuda_dmabuf], [CUDA dmabuf support]) + +diff --git a/include/ofi_hmem.h b/include/ofi_hmem.h +index 2150a64..a2027e5 100644 +--- a/include/ofi_hmem.h ++++ b/include/ofi_hmem.h +@@ -71,6 +71,11 @@ cudaError_t ofi_cudaHostRegister(void *ptr, size_t size, unsigned int flags); + cudaError_t ofi_cudaHostUnregister(void *ptr); + cudaError_t ofi_cudaMalloc(void **ptr, size_t size); + cudaError_t ofi_cudaFree(void *ptr); ++#if HAVE_CUDA_CTX_SYNC_MEMOPS ++CUresult ofi_cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int *flags, ++ int *active); ++CUresult ofi_cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags); ++#endif + CUresult ofi_cuStreamCreate(CUstream *phStream, unsigned int flags); + CUresult ofi_cuStreamDestroy(CUstream hStream); + CUresult ofi_cuStreamSynchronize(CUstream hStream); +diff --git a/prov/efa/src/efa_hmem.c b/prov/efa/src/efa_hmem.c +index 3480dc3..4329868 100644 +--- a/prov/efa/src/efa_hmem.c ++++ b/prov/efa/src/efa_hmem.c +@@ -9,6 +9,45 @@ + + struct efa_hmem_info g_efa_hmem_info[OFI_HMEM_MAX]; + ++int efa_hmem_set_sync_memops(void *ptr, uint64_t device) ++{ ++#if HAVE_CUDA_CTX_SYNC_MEMOPS ++ CUresult cu_result; ++ CUdevice cu_device = (CUdevice) device; ++ unsigned int ctx_flags; ++ int active; ++ int ret; ++ ++ ret = cuda_set_sync_memops(ptr); ++ if (ret != -FI_EOPNOTSUPP) ++ return ret; ++ ++ cu_result = ofi_cuDevicePrimaryCtxGetState(cu_device, &ctx_flags, &active); ++ if (cu_result != CUDA_SUCCESS) { ++ EFA_WARN(FI_LOG_MR, ++ "Failed to get CUDA device %d primary context flags: %d\n", ++ cu_device, (int) cu_result); ++ return -FI_EINVAL; ++ } ++ ++ if (ctx_flags & CU_CTX_SYNC_MEMOPS) ++ return FI_SUCCESS; ++ ++ cu_result = ofi_cuDevicePrimaryCtxSetFlags(cu_device, ++ ctx_flags | CU_CTX_SYNC_MEMOPS); ++ if (cu_result == CUDA_SUCCESS) ++ return FI_SUCCESS; ++ ++ EFA_WARN(FI_LOG_MR, ++ "Failed to set CUDA device %d primary context flag " ++ "CU_CTX_SYNC_MEMOPS: %d\n", cu_device, (int) cu_result); ++ return -FI_EINVAL; ++#else ++ (void) device; ++ return cuda_set_sync_memops(ptr); ++#endif ++} ++ + // TODO double-check for ROCr + #if HAVE_CUDA || HAVE_NEURON || HAVE_ROCR + static size_t efa_max_eager_msg_size_with_largest_header() { +diff --git a/prov/efa/src/efa_hmem.h b/prov/efa/src/efa_hmem.h +index e4d450f..780a3f3 100644 +--- a/prov/efa/src/efa_hmem.h ++++ b/prov/efa/src/efa_hmem.h +@@ -63,6 +63,7 @@ extern struct efa_hmem_info g_efa_hmem_info[OFI_HMEM_MAX]; + + int efa_hmem_validate_p2p_opt(enum fi_hmem_iface iface, int p2p_opt, uint32_t api_version); + int efa_hmem_info_initialize(); ++int efa_hmem_set_sync_memops(void *ptr, uint64_t device); + int efa_copy_from_hmem(void *desc, void *dest, const void *src, size_t size); + int efa_copy_to_hmem(void *desc, void *dest, const void *src, size_t size); + ssize_t efa_copy_from_hmem_iov(void **desc, char *buff, size_t buff_size, const struct iovec *hmem_iov, size_t iov_count); +diff --git a/prov/efa/src/rdm/efa_rdm_ep.h b/prov/efa/src/rdm/efa_rdm_ep.h +index b9da89e..998eb44 100644 +--- a/prov/efa/src/rdm/efa_rdm_ep.h ++++ b/prov/efa/src/rdm/efa_rdm_ep.h +@@ -556,7 +556,8 @@ static inline int efa_rdm_attempt_to_sync_memops_iov(struct efa_rdm_ep *ep, stru + for (i = 0; i < num_desc; i++) { + efa_rdm_mr = (struct efa_rdm_mr *) desc[i]; + if (efa_rdm_mr && efa_rdm_mr->needs_sync) { +- err = cuda_set_sync_memops(iov[i].iov_base); ++ err = efa_hmem_set_sync_memops( ++ iov[i].iov_base, efa_rdm_mr->device); + if (err) { + EFA_WARN(FI_LOG_MR, + "Unable to set memops for " +@@ -584,7 +585,8 @@ static inline int efa_rdm_attempt_to_sync_memops_ioc(struct efa_rdm_ep *ep, stru + for (i = 0; i < num_desc; i++) { + efa_rdm_mr = (struct efa_rdm_mr *) desc[i]; + if (efa_rdm_mr && efa_rdm_mr->needs_sync) { +- err = cuda_set_sync_memops(ioc[i].addr); ++ err = efa_hmem_set_sync_memops( ++ ioc[i].addr, efa_rdm_mr->device); + if (err) { + EFA_WARN(FI_LOG_MR, + "Unable to set memops for " +diff --git a/src/hmem_cuda.c b/src/hmem_cuda.c +index 3fdd116..3397b6b 100644 +--- a/src/hmem_cuda.c ++++ b/src/hmem_cuda.c +@@ -54,6 +54,17 @@ + * NVML API function names + */ + ++CUresult CUDAAPI cuDevicePrimaryCtxSetFlags_v2(CUdevice dev, ++ unsigned int flags); ++ ++#if HAVE_CUDA_CTX_SYNC_MEMOPS ++#define CUDA_DRIVER_OPTIONAL_FUNCS_DEF(_) \ ++ _(cuDevicePrimaryCtxGetState) \ ++ _(cuDevicePrimaryCtxSetFlags_v2) ++#else ++#define CUDA_DRIVER_OPTIONAL_FUNCS_DEF(_) ++#endif ++ + #if HAVE_CUDA_DMABUF + #define CUDA_DRIVER_DMABUF_FUNCS_DEF(_) \ + _(cuMemGetHandleForAddressRange) +@@ -163,6 +174,11 @@ static struct { + CUresult (*cuDeviceGetAttribute)(int* pi, + CUdevice_attribute attrib, CUdevice dev); + CUresult (*cuDeviceGet)(CUdevice* device, int ordinal); ++#if HAVE_CUDA_CTX_SYNC_MEMOPS ++ CUresult (*cuDevicePrimaryCtxGetState)(CUdevice dev, ++ unsigned int *flags, int *active); ++ CUresult (*cuDevicePrimaryCtxSetFlags_v2)(CUdevice dev, unsigned int flags); ++#endif + cudaError_t (*cudaHostRegister)(void *ptr, size_t size, + unsigned int flags); + cudaError_t (*cudaHostUnregister)(void *ptr); +@@ -195,6 +211,7 @@ static struct { + #define CUDA_OPS_INIT(sym) .sym = sym, + = { + CUDA_DRIVER_FUNCS_DEF(CUDA_OPS_INIT) ++ CUDA_DRIVER_OPTIONAL_FUNCS_DEF(CUDA_OPS_INIT) + CUDA_RUNTIME_FUNCS_DEF(CUDA_OPS_INIT) + NVML_FUNCS_DEF(CUDA_OPS_INIT) + } +@@ -280,7 +297,8 @@ CUresult ofi_cuPointerGetAttributes(unsigned int num_attributes, + * the data consistency for CUDA IPC. + * + * @param ptr the cuda ptr +- * @return int 0 on success, -FI_EINVAL on failure. ++ * @return int 0 on success, -FI_EOPNOTSUPP for an unsupported pointer ++ * attribute, or -FI_EINVAL on other failures. + */ + int cuda_set_sync_memops(void *ptr) + { +@@ -295,6 +313,9 @@ int cuda_set_sync_memops(void *ptr) + if (cu_result == CUDA_SUCCESS) + return FI_SUCCESS; + ++ if (cu_result == CUDA_ERROR_NOT_SUPPORTED) ++ return -FI_EOPNOTSUPP; ++ + ofi_cuGetErrorName(cu_result, &cu_error_name); + ofi_cuGetErrorString(cu_result, &cu_error_str); + FI_WARN(&core_prov, FI_LOG_CORE, +@@ -303,6 +324,23 @@ int cuda_set_sync_memops(void *ptr) + return -FI_EINVAL; + } + ++#if HAVE_CUDA_CTX_SYNC_MEMOPS ++CUresult ofi_cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int *flags, ++ int *active) ++{ ++ if (!cuda_ops.cuDevicePrimaryCtxGetState) ++ return CUDA_ERROR_NOT_SUPPORTED; ++ return cuda_ops.cuDevicePrimaryCtxGetState(dev, flags, active); ++} ++ ++CUresult ofi_cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) ++{ ++ if (!cuda_ops.cuDevicePrimaryCtxSetFlags_v2) ++ return CUDA_ERROR_NOT_SUPPORTED; ++ return cuda_ops.cuDevicePrimaryCtxSetFlags_v2(dev, flags); ++} ++#endif ++ + CUresult ofi_cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) + { + return cuda_ops.cuMemGetAddressRange(pbase, psize, dptr); +@@ -558,6 +596,14 @@ int cuda_get_base_addr(const void *ptr, size_t len, void **base, size_t *size) + #define CUDA_RUNTIME_FUNCS_DLOPEN(sym) CUDA_FUNCS_DLOPEN(runtime, sym) + #define NVML_LIB_FUNCS_DLOPEN(sym) CUDA_FUNCS_DLOPEN(nvml, sym) + ++#define CUDA_DRIVER_OPTIONAL_FUNCS_DLOPEN(sym) \ ++ do { \ ++ cuda_ops.sym = dlsym(cuda_attr.driver_handle, #sym); \ ++ if (!cuda_ops.sym) \ ++ FI_INFO(&core_prov, FI_LOG_CORE, \ ++ "Optional CUDA symbol " #sym " is unavailable\n"); \ ++ } while (0); ++ + static int cuda_hmem_dl_init(void) + { + #if ENABLE_CUDA_DLOPEN +@@ -585,6 +631,7 @@ static int cuda_hmem_dl_init(void) + } + + CUDA_DRIVER_FUNCS_DEF(CUDA_DRIVER_FUNCS_DLOPEN) ++ CUDA_DRIVER_OPTIONAL_FUNCS_DEF(CUDA_DRIVER_OPTIONAL_FUNCS_DLOPEN) + CUDA_RUNTIME_FUNCS_DEF(CUDA_RUNTIME_FUNCS_DLOPEN) + if (cuda_attr.nvml_handle) { + NVML_FUNCS_DEF(NVML_LIB_FUNCS_DLOPEN) +@@ -948,7 +995,7 @@ bool cuda_is_addr_valid(const void *addr, uint64_t *device, uint64_t *flags) + CUresult cuda_ret; + unsigned int mem_type; + unsigned int is_managed; +- uint64_t device_ord; ++ int device_ord; + + /* Each pointer in 'data' needs to have the same array index + as the corresponding attribute in 'cuda_attributes' */ diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml new file mode 100644 index 0000000000..3f0bd27ba0 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -0,0 +1,103 @@ +schema: 2 +base: + identity: + model: {} + container: {} + frameworks: + vllm: 1b2a666391f2a24228a1436b64d547c34cc6b6ce + dynamo: + install: false + setup_script: kimik3-b300-efa-setup.sh + + environment: + KIMI_EFA_BUILD_CACHE: /hf_hub_cache/inferencex/kimi-k3-efa + LD_LIBRARY_PATH: /opt/amazon/efa/lib:/opt/amazon/ofi-nccl/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64 + + slurm: + time_limit: 04:00:00 + health_check: + max_attempts: 720 + interval_seconds: 10 + resources: + gpu_type: "b300" + gpus_per_node: 8 + frontend: + type: vllm + enable_multiple_frontends: false + engine: + type: vllm + connector: null + roles: + agg: + nodes: 1 + workers: 1 + gpus: 8 + env: + VLLM_FASTSAFETENSORS_QUEUE_SIZE: '-1' + VLLM_ALLREDUCE_USE_FLASHINFER: '1' + VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION: '1' + VLLM_USE_DIRECT_DCP_A2A: '1' + VLLM_USE_DIRECT_DCP_Q_GATHER: '1' + VLLM_USE_DIRECT_DCP_KV_GATHER: '1' + VLLM_RPC_TIMEOUT: '600000' + VLLM_USE_V2_MODEL_RUNNER: '1' + VLLM_USE_RUST_FRONTEND: '0' + VLLM_PREFIX_CACHE_RETENTION_INTERVAL: '0' + VLLM_LOG_STATS_INTERVAL: '1' + VLLM_ENGINE_READY_TIMEOUT_S: '3600' + args: + served-model-name: moonshotai/Kimi-K3 + enable-auto-tool-choice: true + tool-call-parser: kimi_k3 + reasoning-parser: kimi_k3 + load-format: fastsafetensors + kv-cache-dtype: fp8 + mamba-ssm-cache-dtype: float32 + gpu-memory-utilization: 0.92 + tensor-parallel-size: 8 + decode-context-parallel-size: 8 + dcp-comm-backend: a2a + trust-remote-code: true + stream-interval: 10 + language-model-only: true + moe-backend: auto + no-enable-flashinfer-autotune: true + attention-backend: TOKENSPEED_MLA + attention-config: '{"mla_prefill_backend":"TRTLLM_RAGGED","use_prefill_query_quantization":true}' + enable-prefix-caching: true + prefix-match-unit: 128 + max-num-seqs: 8 + max-num-batched-tokens: 16384 + additional-config: '{"decode_backend":"latency_specialized"}' + sbatch_directives: + mem: '0' + cpus-per-task: '72' + comment: '''{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will take extra loading time."}}''' + srun_options: + mem: '0' + container-remap-root: '' + telemetry: + collector_join_timeout_seconds: 12 + benchmark: + env: + AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: '0' + placement: + node: head +override_tp16_dspark5: + roles: + agg: + nodes: 2 + gpus: 16 + args: + tensor-parallel-size: 16 + decode-context-parallel-size: 16 + max-cudagraph-capture-size: 48 + compilation-config: '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,20,24,40,48]}' + speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' +override_tp8_dspark7: + roles: + agg: + args: + max-cudagraph-capture-size: 64 + compilation-config: '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[7,8,14,16,28,32,56,64]}' + speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":7,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml new file mode 100644 index 0000000000..5b3f5e8b09 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -0,0 +1,384 @@ +schema: 2 + +base: + identity: + model: {} + container: {} + frameworks: + vllm: "1b2a666391f2a24228a1436b64d547c34cc6b6ce" + dynamo: "ffbbaaa6c44370e798687881317535ac17d66a76" + + dynamo: + install: true + source: + rev: "ffbbaaa6c44370e798687881317535ac17d66a76" + + setup_script: kimik3-b300-efa-setup.sh + + environment: + KIMI_EFA_BUILD_CACHE: /hf_hub_cache/inferencex/kimi-k3-efa + LD_LIBRARY_PATH: /opt/amazon/efa/lib:/opt/amazon/ofi-nccl/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64 + + slurm: + time_limit: "04:00:00" + + health_check: + max_attempts: 720 + interval_seconds: 10 + + resources: + gpu_type: "b300" + gpus_per_node: 8 + + services: + - name: etcd + type: etcd + placement: + node: infra + - name: nats + type: nats + placement: + node: infra + options: + max_payload_mb: 32 + - name: mooncake-master + type: mooncake-master + preamble: bash /configs/kimik3-b300-efa-setup.sh + cpus_per_task: 16 + env: + KIMI_EFA_BUILD_CACHE: /hf_hub_cache/inferencex/kimi-k3-efa + LD_LIBRARY_PATH: /opt/amazon/efa/lib:/opt/amazon/ofi-nccl/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64 + readiness: + port: 8700 + timeout_seconds: 3600 + args: + - "--default_kv_lease_ttl=60000" + - "--eviction_high_watermark_ratio=0.95" + - "--eviction_ratio=0.10" + options: + store_config: + metadata_server: "P2PHANDSHAKE" + global_segment_size: "160GB" + local_buffer_size: "4GB" + protocol: "efa" + mode: "embedded" + enable_offload: false + + frontend: + type: dynamo + enable_multiple_frontends: false + args: + router-mode: "least-loaded" + router-session-affinity-ttl-secs: 900 + env: + DYN_ROUTER_ACTIVE_REQUEST_EXPIRY_SECS: "3600" + DYN_TOKENIZER_CACHE_BYTES: "8589934592" + DYN_TCP_REQUEST_TIMEOUT: "120" + + engine: + type: vllm + connector: + dp_launch_mode: per_node + + roles: + prefill: + nodes: 1 + workers: 1 + gpus: 8 + env: &kimi_env + VLLM_FASTSAFETENSORS_QUEUE_SIZE: "-1" + NIXL_DISABLE_CUDA_ADDR_WA: "1" + DYN_TCP_REQUEST_TIMEOUT: "120" + VLLM_USE_DIRECT_DCP_A2A: "1" + VLLM_USE_DIRECT_DCP_Q_GATHER: "1" + VLLM_USE_DIRECT_DCP_KV_GATHER: "1" + VLLM_ALLREDUCE_USE_FLASHINFER: "1" + VLLM_KIMI_K3_SHARD_SP_SHARED_EXPERT: "0" + DYN_REQUEST_PLANE: "tcp" + ETCD_LEASE_TTL: "600" + VLLM_RPC_TIMEOUT: "600000" + TILELANG_CLEANUP_TEMP_FILES: "1" + VLLM_USE_NCCL_SYMM_MEM: "0" + NCCL_CUMEM_ENABLE: "1" + NCCL_MNNVL_ENABLE: "0" + NCCL_NVLS_ENABLE: "1" + VLLM_SERVER_DEV_MODE: "1" + VLLM_USE_V2_MODEL_RUNNER: "1" + VLLM_USE_RUST_FRONTEND: "1" + VLLM_MOONCAKE_LOAD_RECV_THREADS: "4" + MC_SLICE_SIZE: "1048576" + VLLM_CONNECTOR_PREFETCH_DEPTH: "8" + VLLM_CONNECTOR_PREFETCH_KV_CAP: "0.65" + VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS: "1800" + VLLM_PREFIX_CACHE_RETENTION_INTERVAL: "0" + NCCL_P2P_LEVEL: "NVL" + MC_ENABLE_DEST_DEVICE_AFFINITY: "1" + WITH_NVIDIA_PEERMEM: "0" + UCX_MEMTYPE_CACHE: "n" + UCX_MEMTYPE_REG_WHOLE: "n" + UCX_RCACHE_MAX_UNRELEASED: "1024" + UCX_TCP_AF_PRIO: "inet" + VLLM_SSM_CONV_STATE_LAYOUT: "DS" + VLLM_ENABLE_GEMM_RS: '1' + VLLM_ENGINE_READY_TIMEOUT_S: '3600' + args: + kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"connectors":[{"kv_connector":"NixlConnector","kv_role":"kv_both","kv_load_failure_policy":"fail","kv_buffer_device":"cuda","kv_connector_extra_config":{"backends":["LIBFABRIC"],"enforce_handshake_compat":false,"enable_cross_layers_blocks":false}},{"kv_connector":"MooncakeStoreConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"load_async":true,"lookup_async":true,"compact_group_io":true,"max_load_batch_keys":2,"enable_cross_layers_blocks":false,"enable_offload":false}}]}}' + served-model-name: "moonshotai/Kimi-K3" + prefix-match-unit: 128 + load-format: "fastsafetensors" + kv-cache-dtype: "fp8" + mamba-ssm-cache-dtype: "bfloat16" + gpu-memory-utilization: 0.92 + tensor-parallel-size: 8 + decode-context-parallel-size: 8 + dcp-comm-backend: "a2a" + no-enable-flashinfer-autotune: true + enable-cumem-allocator: true + trust-remote-code: true + max-cudagraph-capture-size: 512 + stream-interval: 10 + language-model-only: true + attention-backend: "TOKENSPEED_MLA" + attention-config: '{"mla_prefill_backend":"TRTLLM_RAGGED","use_prefill_query_quantization":true,"trtllm_ragged_backend":"cute-dsl"}' + enable-prefix-caching: true + enable-expert-parallel: true + moe-backend: deep_gemm_mega_moe + max-num-seqs: 64 + speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' + kv_events: true + decode: + nodes: 1 + workers: 1 + gpus: 8 + env: + <<: *kimi_env + VLLM_ENABLE_GEMM_RS: '0' + args: + kv-transfer-config: '{"kv_connector":"MultiConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"connectors":[{"kv_connector":"NixlConnector","kv_role":"kv_both","kv_load_failure_policy":"fail","kv_buffer_device":"cuda","kv_connector_extra_config":{"backends":["LIBFABRIC"],"enforce_handshake_compat":false,"enable_cross_layers_blocks":false}},{"kv_connector":"MooncakeStoreConnector","kv_role":"kv_both","kv_load_failure_policy":"recompute","kv_connector_extra_config":{"load_async":true,"lookup_async":true,"compact_group_io":true,"max_load_batch_keys":2,"enable_cross_layers_blocks":false,"enable_offload":false}}]}}' + served-model-name: "moonshotai/Kimi-K3" + prefix-match-unit: 128 + load-format: "fastsafetensors" + kv-cache-dtype: "fp8" + mamba-ssm-cache-dtype: "bfloat16" + gpu-memory-utilization: 0.92 + tensor-parallel-size: 8 + decode-context-parallel-size: 8 + dcp-comm-backend: "a2a" + no-enable-flashinfer-autotune: true + enable-cumem-allocator: true + trust-remote-code: true + max-cudagraph-capture-size: 512 + stream-interval: 10 + language-model-only: true + attention-backend: "TOKENSPEED_MLA" + attention-config: '{"mla_prefill_backend":"TRTLLM_RAGGED","use_prefill_query_quantization":true,"tokenspeed_mla_min_split_kv":8}' + enable-prefix-caching: true + max-num-seqs: 128 + speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' + sbatch_directives: + mem: "0" + cpus-per-task: "72" + comment: >- + '{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will + take extra loading time."}}' + + srun_options: + mem: "0" + container-remap-root: "" + + telemetry: + collector_join_timeout_seconds: 12 + + benchmark: + placement: + node: head + env: + AIPERF_USE_DYNAMO_CONV_AWARE_ROUTING: "0" + AIPERF_HTTP_X_DYNAMO_SESSION_ID_FROM_CORRELATION_ID: "true" + AIPERF_DYNAMO_SESSION_TIMEOUT_SECONDS: "14400" + +override_1p4d_cap2: + roles: + prefill: &override_1p4d_cap2_prefill + nodes: 1 + workers: 1 + args: &override_1p4d_cap2_prefill_args {} + decode: &override_1p4d_cap2_decode + nodes: 4 + workers: 4 + args: &override_1p4d_cap2_decode_args + max-num-seqs: 2 + +override_1p4d_cap2_eval: + roles: + prefill: + <<: *override_1p4d_cap2_prefill + args: + <<: *override_1p4d_cap2_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_1p4d_cap2_decode + args: + <<: *override_1p4d_cap2_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + +override_1p3d_cap4: + roles: + prefill: &override_1p3d_cap4_prefill + nodes: 1 + workers: 1 + args: &override_1p3d_cap4_prefill_args {} + decode: &override_1p3d_cap4_decode + nodes: 3 + workers: 3 + args: &override_1p3d_cap4_decode_args + max-num-seqs: 4 + +override_1p3d_cap4_eval: + roles: + prefill: + <<: *override_1p3d_cap4_prefill + args: + <<: *override_1p3d_cap4_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_1p3d_cap4_decode + args: + <<: *override_1p3d_cap4_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + +override_1p2d_cap8: + roles: + prefill: &override_1p2d_cap8_prefill + nodes: 1 + workers: 1 + args: &override_1p2d_cap8_prefill_args {} + decode: &override_1p2d_cap8_decode + nodes: 2 + workers: 2 + args: &override_1p2d_cap8_decode_args + max-num-seqs: 8 + +override_1p2d_cap8_eval: + roles: + prefill: + <<: *override_1p2d_cap8_prefill + args: + <<: *override_1p2d_cap8_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_1p2d_cap8_decode + args: + <<: *override_1p2d_cap8_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + +override_2p5d_cap16: + roles: + prefill: &override_2p5d_cap16_prefill + nodes: 2 + workers: 2 + args: &override_2p5d_cap16_prefill_args {} + decode: &override_2p5d_cap16_decode + nodes: 5 + workers: 5 + args: &override_2p5d_cap16_decode_args + max-num-seqs: 16 + +override_2p5d_cap16_eval: + roles: + prefill: + <<: *override_2p5d_cap16_prefill + args: + <<: *override_2p5d_cap16_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_2p5d_cap16_decode + args: + <<: *override_2p5d_cap16_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + +override_2p3d_cap24: + roles: + prefill: &override_2p3d_cap24_prefill + nodes: 2 + workers: 2 + args: &override_2p3d_cap24_prefill_args {} + decode: &override_2p3d_cap24_decode + nodes: 3 + workers: 3 + args: &override_2p3d_cap24_decode_args + max-num-seqs: 24 + +override_2p3d_cap24_eval: + roles: + prefill: + <<: *override_2p3d_cap24_prefill + args: + <<: *override_2p3d_cap24_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_2p3d_cap24_decode + args: + <<: *override_2p3d_cap24_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + +override_2p3d_cap128: + roles: + prefill: &override_2p3d_cap128_prefill + nodes: 2 + workers: 2 + args: &override_2p3d_cap128_prefill_args {} + decode: &override_2p3d_cap128_decode + nodes: 3 + workers: 3 + args: &override_2p3d_cap128_decode_args + max-num-seqs: 128 + +override_2p3d_cap128_eval: + roles: + prefill: + <<: *override_2p3d_cap128_prefill + args: + <<: *override_2p3d_cap128_prefill_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true + decode: + <<: *override_2p3d_cap128_decode + args: + <<: *override_2p3d_cap128_decode_args + reasoning-parser: kimi_k3 + dyn-tool-call-parser: kimi_k3 + dyn-reasoning-parser: kimi_k3 + dyn-enable-structural-tag: true diff --git a/inferencex-e2e/configs/nvidia-master.yaml b/inferencex-e2e/configs/nvidia-master.yaml index a34a7f4518..67b83cc700 100644 --- a/inferencex-e2e/configs/nvidia-master.yaml +++ b/inferencex-e2e/configs/nvidia-master.yaml @@ -9807,3 +9807,199 @@ musespark-fp4-h100-sglang-agentic-dflash: - dram-utilization: 0.80 search-space: - { tp: 8, ep: 8, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [1, 2, 4, 8], srt-recipe: agentic.yaml } +kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg: + image: vllm/vllm-openai:nightly-1b2a666391f2a24228a1436b64d547c34cc6b6ce + model: moonshotai/Kimi-K3 + model-prefix: kimik3 + runner: cluster:b300-dsxe + precision: fp4 + framework: dynamo-vllm + router: + name: dynamo-router + version: ffbbaaa6c44370e798687881317535ac17d66a76 + kv-p2p-transfer: nixl + multinode: true + disagg: true + srt-recipe-dir: kimik3/vllm/b300-fp4/agentx + scenarios: + agentic-coding: + - dram-utilization: 0.459 + search-space: + - spec-decoding: mtp + kv-offloading: dram + kv-offload-backend: + name: mooncake + version: 0.3.13.post1+gc3fa13ec + conc-list: + - 40 + srt-recipe: disagg-variants.yaml:override_1p4d_cap2 + eval-srt-recipe: disagg-variants.yaml:override_1p4d_cap2_eval + power: true + prefill: + num-worker: 1 + tp: 8 + dcp-size: 8 + ep: 8 + dp-attn: false + decode: + num-worker: 4 + tp: 8 + dcp-size: 8 + ep: 1 + dp-attn: false + - spec-decoding: mtp + kv-offloading: dram + kv-offload-backend: + name: mooncake + version: 0.3.13.post1+gc3fa13ec + conc-list: + - 48 + srt-recipe: disagg-variants.yaml:override_1p3d_cap4 + eval-srt-recipe: disagg-variants.yaml:override_1p3d_cap4_eval + power: true + prefill: + num-worker: 1 + tp: 8 + dcp-size: 8 + ep: 8 + dp-attn: false + decode: + num-worker: 3 + tp: 8 + dcp-size: 8 + ep: 1 + dp-attn: false + - spec-decoding: mtp + kv-offloading: dram + kv-offload-backend: + name: mooncake + version: 0.3.13.post1+gc3fa13ec + conc-list: + - 48 + srt-recipe: disagg-variants.yaml:override_1p2d_cap8 + eval-srt-recipe: disagg-variants.yaml:override_1p2d_cap8_eval + power: true + prefill: + num-worker: 1 + tp: 8 + dcp-size: 8 + ep: 8 + dp-attn: false + decode: + num-worker: 2 + tp: 8 + dcp-size: 8 + ep: 1 + dp-attn: false + - spec-decoding: mtp + kv-offloading: dram + kv-offload-backend: + name: mooncake + version: 0.3.13.post1+gc3fa13ec + conc-list: + - 176 + srt-recipe: disagg-variants.yaml:override_2p5d_cap16 + eval-srt-recipe: disagg-variants.yaml:override_2p5d_cap16_eval + power: true + prefill: + num-worker: 2 + tp: 8 + dcp-size: 8 + ep: 8 + dp-attn: false + decode: + num-worker: 5 + tp: 8 + dcp-size: 8 + ep: 1 + dp-attn: false + - spec-decoding: mtp + kv-offloading: dram + kv-offload-backend: + name: mooncake + version: 0.3.13.post1+gc3fa13ec + conc-list: + - 176 + srt-recipe: disagg-variants.yaml:override_2p3d_cap24 + eval-srt-recipe: disagg-variants.yaml:override_2p3d_cap24_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 + - 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 + conc-list: + - 1 + num-nodes: 2 + srt-recipe: agg-megakernel-variants.yaml:override_tp16_dspark5 + power: true + worker: + num-worker: 1 + tp: 16 + dcp-size: 16 + ep: 1 + dp-attn: false + - spec-decoding: mtp + kv-offloading: none + conc-list: + - 2 + - 4 + num-nodes: 1 + srt-recipe: agg-megakernel-variants.yaml:override_tp8_dspark7 + power: true + worker: + num-worker: 1 + tp: 8 + dcp-size: 8 + ep: 1 + dp-attn: false diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index c6f759c960..cf9934cbe1 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -565,6 +565,8 @@ clusters: mlx5_20:1, mlx5_21:1, mlx5_22:1, mlx5_23:1, mlx5_4:1, mlx5_5:1, mlx5_8:1, mlx5_9:1, mlx5_2:1, mlx5_3:1] job-tag: b300 + agentic-volume-mounts: + hf-hub-cache: /hf_hub_cache single-node-models: staged container-aliases: [dynamo-trtllm, dynamo-sglang, dynamo-vllm] nginx-aliases: [nginx-sqsh] diff --git a/inferencex-e2e/infx/launch/drivers/srt/power.py b/inferencex-e2e/infx/launch/drivers/srt/power.py index 61d2270970..ac46152a63 100644 --- a/inferencex-e2e/infx/launch/drivers/srt/power.py +++ b/inferencex-e2e/infx/launch/drivers/srt/power.py @@ -69,6 +69,11 @@ class PowerLane: ), ("b300-dsxe", LaunchPath.SRT_MULTI): PowerLane( rules=( + PowerRule( + Match(any_of("kimik3"), any_of("fp4"), any_of("dynamo-vllm"), agentic=True), + agentx=True, + require=True, + ), PowerRule( Match( any_of("dsv4"), @@ -79,7 +84,7 @@ class PowerLane: agentx=False, ), ), - error="B300 dcgm-power is limited to fixed-sequence DSV4 FP4 dynamo-sglang/vllm", + error="B300 dcgm-power requires fixed-sequence DSV4 FP4 or Kimi-K3 AgentX dynamo-vllm", ), ("b200-nscale", LaunchPath.SRT_NATIVE): PowerLane( rules=( diff --git a/inferencex-e2e/infx/tests/launch/test_launch_policy.py b/inferencex-e2e/infx/tests/launch/test_launch_policy.py index 940e1443b2..5be07099ef 100644 --- a/inferencex-e2e/infx/tests/launch/test_launch_policy.py +++ b/inferencex-e2e/infx/tests/launch/test_launch_policy.py @@ -40,6 +40,7 @@ def _multinode(**env): ("gb300-nv", MULTI, "1", "glm5.2", "fp4", "dynamo-sglang", DCGM), ("gb300-nv", MULTI, "0", "qwen3.5", "fp8", "dynamo-trt", ERR), ("b300-dsxe", MULTI, "0", "dsv4", "fp4", "dynamo-vllm", DCGM), + ("b300-dsxe", MULTI, "1", "kimik3", "fp4", "dynamo-vllm", AGENTX), ("b300-dsxe", MULTI, "0", "dsv4", "fp8", "dynamo-sglang", ERR), ("b300-dsxe", MULTI, "1", "dsv4", "fp4", "dynamo-sglang", ERR), ("b200-nscale", NATIVE, "1", "kimik3", "fp4", "dynamo-vllm", AGENTX), @@ -73,7 +74,9 @@ def test_power_eligibility_of_each_cluster_lane( assert (decision.dcgm, decision.agentx, decision.adapter) == ( True, expected == AGENTX, expected == ADAPTER, ) # fmt: skip - assert decision.require is (prefix == "kimik3" and cluster in ("gb200-nv", "gb300-nv")) + assert decision.require is ( + prefix == "kimik3" and cluster in ("gb200-nv", "gb300-nv", "b300-dsxe") + ) assert not decide_power(cluster, path, _multinode(**env, POWER="0")).dcgm From be199fcee2fe3bbd2fdb57a99378aec307c80ee0 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 00:54:55 -0400 Subject: [PATCH 02/33] fix: pin AWS libfabric source and document B300 sweep patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 固定 AWS libfabric 源码,并记录 B300 扫描补丁及配置变更。 Signed-off-by: wzhao18 --- .../configs/kimik3-b300-efa-setup.sh | 2 +- inferencex-e2e/docs/waiver/4304.md | 46 +++++++++++++++++++ inferencex-e2e/perf-changelog.yaml | 9 ++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 inferencex-e2e/docs/waiver/4304.md diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 98eb69b119..fcbef23543 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -30,7 +30,7 @@ mkdir -p "$cache" exec 9>"$cache/build.lock" flock 9 if [ ! -f "$cache/ready" ]; then - git clone https://github.com/ofiwg/libfabric.git "$task_dir/libfabric" + git clone https://github.com/aws/libfabric.git "$task_dir/libfabric" git -C "$task_dir/libfabric" checkout --detach e83bf01a834a1a7c776d93efcaee3f8f28ff2705 git -C "$task_dir/libfabric" apply \ "$(dirname "${BASH_SOURCE[0]}")/libfabric-efa-vmm.patch" diff --git a/inferencex-e2e/docs/waiver/4304.md b/inferencex-e2e/docs/waiver/4304.md new file mode 100644 index 0000000000..ae4f94ea97 --- /dev/null +++ b/inferencex-e2e/docs/waiver/4304.md @@ -0,0 +1,46 @@ +# Serving-stack patch waiver — PR #4304 + +## Scope + +The B300 Kimi K3 AgentX aggregate and disaggregated configurations use +`vllm/vllm-openai:nightly-1b2a666391f2a24228a1436b64d547c34cc6b6ce`. +Their container setup script is +`benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh`. +The script does not change vLLM, model weights, the draft model, the evaluation +harness or synthetic acceptance selection. + +## Changes and reason + +- Install EFA 1.50.0 userspace libraries, including the AWS OFI NCCL plugin. + The upstream vLLM image does not include the EFA transport dependencies. + The installer skips kernel modules, MPI and host limit changes. +- Backport upstream CUDA VMM synchronization support onto AWS libfabric + `e83bf01a834a1a7c776d93efcaee3f8f28ff2705` (2.6.0amzn1.0). + `libfabric-efa-vmm.patch` contains the adapted changes from + [2c7d11a](https://github.com/ofiwg/libfabric/commit/2c7d11a50a3db03d26ad8260f8141621eee495f7), + [790f0fb](https://github.com/ofiwg/libfabric/commit/790f0fb944f4cbeeb4381c99db6ba827ce5ded27), and + [31f5ded](https://github.com/ofiwg/libfabric/commit/31f5ded159af13259b305e4389063fed0a22a096). + Without these changes, EFA transfers using CUDA VMM allocations fail with + `EINVAL` when the provider requests unsupported pointer synchronization. +- Build the EFA CUDA 13 Mooncake wheel from upstream + [c3fa13ec](https://github.com/kvcache-ai/Mooncake/commit/c3fa13ecaf1038df933dcb784ff8ffe026381100), + including the THP allocator from [Mooncake #4393](https://github.com/kvcache-ai/Mooncake/pull/4393). + The released allocator uses small host pages, exhausting EFA registration + resources for the configured 160 GiB segment per rank. The rebuilt wheel is + identified as `0.3.13.post1+gc3fa13ec` rather than an unmodified release. +- Set `NIXL_DISABLE_CUDA_ADDR_WA=1` for NIXL 1.5's existing device-context + fallback. CUDA VMM allocations do not provide the owning context expected + by its pointer-address workaround. This is configuration, not a NIXL patch. + +The setup caches build products under the runner's mounted Hugging Face cache +with an exclusive build lock. Each serving container installs the same pinned +artifacts; a build failure prevents serving. All changes are container-local; +the script does not modify host drivers, huge-page settings or network configuration. + +## Removal plan + +Drop the libfabric patch once the EFA installer ships the three upstream +changes. Replace the Mooncake source build with an official EFA CUDA 13 wheel +once it includes #4393. Remove the NIXL environment override when its VMM +context handling supports the default path. Retain only the EFA userspace +installation if it is still absent from the pinned upstream image. diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index d50a9d7685..1942f23822 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10130,3 +10130,12 @@ - "Re-sweep Muse Spark Open B200 AgentX on the full uncapped trace corpus (semianalysis_cc_traces_weka_062126) after #4287 dropped the Muse Spark 256k exception; image and search space are unchanged." - "Set HF_HUB_OFFLINE=1 so every rank resolves the DFlash2 draft from the shared HF cache, matching MI355X; concurrent launches otherwise hit the Hub 429 API rate limit." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4291 + +- config-keys: + - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg + - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg + scenario-type: + - agentic-coding + description: + - "Add B300 Kimi K3 DSpark DCP disaggregated and low-latency aggregate configurations." + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From 17add7f7c832698d7098a5a77159c58594cf4305 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 00:56:46 -0400 Subject: [PATCH 03/33] fix: prepare Mooncake build dependencies and cross-node DCP fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补齐 Mooncake 构建依赖,并让跨节点 DCP 使用 NCCL 回退路径。 Signed-off-by: wzhao18 --- .../srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh | 3 ++- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index fcbef23543..732dc9a933 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -10,7 +10,8 @@ apt-get install -y -qq --no-install-recommends \ autoconf automake build-essential ca-certificates curl git libboost-filesystem-dev \ libboost-system-dev libcurl4-openssl-dev libgflags-dev libgoogle-glog-dev \ libhwloc15 libibverbs-dev libjsoncpp-dev libnuma-dev libprotobuf-dev libssl-dev \ - libtool libyaml-cpp-dev numactl patchelf pkg-config protobuf-compiler cuda-nvml-dev-13-0 + libtool libxxhash-dev libyaml-cpp-dev libzstd-dev numactl patchelf pkg-config \ + protobuf-compiler cuda-nvml-dev-13-0 task_dir=$(mktemp -d /tmp/kimi-k3-efa.XXXXXX) curl -fsSL --retry 3 --retry-all-errors \ diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 3f0bd27ba0..0f02e3cf0e 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -88,6 +88,11 @@ override_tp16_dspark5: agg: nodes: 2 gpus: 16 + env: + # Separate B300 nodes cannot exchange direct symmetric-memory pointers. + VLLM_USE_DIRECT_DCP_A2A: '0' + VLLM_USE_DIRECT_DCP_Q_GATHER: '0' + VLLM_USE_DIRECT_DCP_KV_GATHER: '0' args: tensor-parallel-size: 16 decode-context-parallel-size: 16 From a9b8f309790a7068d3172b8fd23f857a32691c2c Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 00:59:49 -0400 Subject: [PATCH 04/33] fix: include Mooncake MessagePack development headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补齐 Mooncake Store 序列化所需的 MessagePack 开发头文件。 Signed-off-by: wzhao18 --- .../srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 732dc9a933..b348963d38 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -9,7 +9,7 @@ apt-get update -qq apt-get install -y -qq --no-install-recommends \ autoconf automake build-essential ca-certificates curl git libboost-filesystem-dev \ libboost-system-dev libcurl4-openssl-dev libgflags-dev libgoogle-glog-dev \ - libhwloc15 libibverbs-dev libjsoncpp-dev libnuma-dev libprotobuf-dev libssl-dev \ + libhwloc15 libibverbs-dev libjsoncpp-dev libmsgpack-dev libnuma-dev libprotobuf-dev libssl-dev \ libtool libxxhash-dev libyaml-cpp-dev libzstd-dev numactl patchelf pkg-config \ protobuf-compiler cuda-nvml-dev-13-0 From 6a35874b0c15d6ee03e9f8e6fab810452ae25976 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 01:09:31 -0400 Subject: [PATCH 05/33] fix: use the Mooncake allocator build target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正 Mooncake 分配器构建目标名称。 Signed-off-by: wzhao18 --- .../srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index b348963d38..0937da1e80 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -65,7 +65,7 @@ if [ ! -f "$cache/ready" ]; then -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 + engine store mooncake_master mooncake_client transfer_engine_bench build_nvlink_allocator sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec"/' \ mooncake-wheel/pyproject.toml mkdir -p "$task_dir/wheels" From e3c8ef5834200fb977baeaeb347ab7c36d973024 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 01:14:12 -0400 Subject: [PATCH 06/33] fix: avoid cross-node multicast in B300 aggregate decode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B300 双节点 TP16 配置使用常规解码,避免专用解码对跨节点 GPU 多播的依赖;单节点 TP8 保持不变。 Signed-off-by: wzhao18 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 0f02e3cf0e..597d7fd04b 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -96,6 +96,8 @@ override_tp16_dspark5: args: tensor-parallel-size: 16 decode-context-parallel-size: 16 + # Specialized decode requires multicast across the whole TP group. + additional-config: '{"decode_backend":"auto"}' max-cudagraph-capture-size: 48 compilation-config: '{"cudagraph_mode":"FULL_AND_PIECEWISE","cudagraph_capture_sizes":[5,6,10,12,20,24,40,48]}' speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":5,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' From 6f13a9946459b61b5de665a97d186e3bf7ca2cee Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 01:22:12 -0400 Subject: [PATCH 07/33] fix: provide Python command for Mooncake wheel packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 安装 python-is-python3,满足 Mooncake 官方打包脚本对 python 命令的依赖。 Signed-off-by: wzhao18 --- .../srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 0937da1e80..9707e46643 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -11,7 +11,7 @@ apt-get install -y -qq --no-install-recommends \ libboost-system-dev libcurl4-openssl-dev libgflags-dev libgoogle-glog-dev \ libhwloc15 libibverbs-dev libjsoncpp-dev libmsgpack-dev libnuma-dev libprotobuf-dev libssl-dev \ libtool libxxhash-dev libyaml-cpp-dev libzstd-dev numactl patchelf pkg-config \ - protobuf-compiler cuda-nvml-dev-13-0 + protobuf-compiler python-is-python3 cuda-nvml-dev-13-0 task_dir=$(mktemp -d /tmp/kimi-k3-efa.XXXXXX) curl -fsSL --retry 3 --retry-all-errors \ From 064a205a9a0866516d0049cda3f704e05b1863e0 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 01:28:59 -0400 Subject: [PATCH 08/33] fix: use NCCL for cross-node B300 aggregate collectives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 仅在跨节点 TP16 配置中关闭依赖 MNNVL 的 FlashInfer 集合通信,保留单节点 TP8 快速路径。 Signed-off-by: wzhao18 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 597d7fd04b..70ab762c40 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -90,6 +90,7 @@ override_tp16_dspark5: gpus: 16 env: # Separate B300 nodes cannot exchange direct symmetric-memory pointers. + VLLM_ALLREDUCE_USE_FLASHINFER: '0' VLLM_USE_DIRECT_DCP_A2A: '0' VLLM_USE_DIRECT_DCP_Q_GATHER: '0' VLLM_USE_DIRECT_DCP_KV_GATHER: '0' From bde7f849e5eb492563e50a334632da9a63b08eff Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 01:48:39 -0400 Subject: [PATCH 09/33] fix: use the B300 runner CPU allocation policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除配方中的 cpus-per-task,避免与 B300 集群的 cpus-per-gpu 配置冲突;所有扫描点统一使用集群资源策略。 Signed-off-by: wzhao18 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 1 - .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 70ab762c40..3990f1d1c5 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -71,7 +71,6 @@ base: additional-config: '{"decode_backend":"latency_specialized"}' sbatch_directives: mem: '0' - cpus-per-task: '72' comment: '''{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will take extra loading time."}}''' srun_options: mem: '0' diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 5b3f5e8b09..d260d905ae 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -177,7 +177,6 @@ base: speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' sbatch_directives: mem: "0" - cpus-per-task: "72" comment: >- '{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will take extra loading time."}}' From 9715529d28df0eb35ed7f2ca9cb2b00f7980f4e9 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 03:24:59 -0400 Subject: [PATCH 10/33] fix: make Mooncake wheel library paths relocatable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用安装目录相对的运行时库路径,避免 Mooncake 打包依赖临时构建目录,并更新构建缓存版本。 Signed-off-by: wzhao18 --- .../srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 9707e46643..a208ef3b8e 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -26,7 +26,7 @@ tar -xzf "$task_dir/efa.tar.gz" -C "$task_dir" ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify --skip-mpi ) -cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v1" +cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v2" mkdir -p "$cache" exec 9>"$cache/build.lock" flock 9 @@ -59,6 +59,7 @@ if [ ! -f "$cache/ready" ]; then ( cd "$task_dir/Mooncake" cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON '-DCMAKE_INSTALL_RPATH=$ORIGIN' \ -DCMAKE_PREFIX_PATH=/opt/amazon/efa \ -DPython3_EXECUTABLE="$(command -v python3)" \ -DUSE_EFA=ON -DUSE_CUDA=ON -DUSE_ETCD=OFF \ From e26a25b22a1dea57acba9addb4d4b57455fca5dd Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 04:37:17 -0400 Subject: [PATCH 11/33] fix: skip MNNVL custom allreduce probing across B300 nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 3990f1d1c5..717009fcf6 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -96,6 +96,7 @@ override_tp16_dspark5: args: tensor-parallel-size: 16 decode-context-parallel-size: 16 + disable-custom-all-reduce: true # Specialized decode requires multicast across the whole TP group. additional-config: '{"decode_backend":"auto"}' max-cudagraph-capture-size: 48 From 2e66bdbe2dcf897d917f13ef6b3a7c909372cc53 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 05:09:24 -0400 Subject: [PATCH 12/33] fix: allow portable Kimi K3 model paths across B300 nodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../configs/kimi-k3-latent-tail-opt-out.patch | 21 +++++++++++++++++++ .../configs/kimik3-b300-efa-setup.sh | 6 ++++++ .../agentx/agg-megakernel-variants.yaml | 2 ++ inferencex-e2e/docs/waiver/4304.md | 17 +++++++++++---- 4 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimi-k3-latent-tail-opt-out.patch diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimi-k3-latent-tail-opt-out.patch b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimi-k3-latent-tail-opt-out.patch new file mode 100644 index 0000000000..cc43a093fe --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimi-k3-latent-tail-opt-out.patch @@ -0,0 +1,21 @@ +diff --git a/vllm/envs.py b/vllm/envs.py +--- a/vllm/envs.py ++++ b/vllm/envs.py +@@ -1659,3 +1659,7 @@ ++ # The fused Kimi K3 latent MoE tail requires NVLink multicast. ++ "VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION": lambda: bool( ++ int(os.getenv("VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION", "1")) ++ ), + # Use the SM100 BF16 GEMM-AR kernel for eligible Kimi-K3 row-parallel + # attention projections. All TP ranks must belong to one NVLink domain. + "VLLM_KIMI_K3_GEMM_AR": lambda: bool(int(os.getenv("VLLM_KIMI_K3_GEMM_AR", "1"))), +diff --git a/vllm/models/kimi_k3/nvidia/latent_moe_runner.py b/vllm/models/kimi_k3/nvidia/latent_moe_runner.py +--- a/vllm/models/kimi_k3/nvidia/latent_moe_runner.py ++++ b/vllm/models/kimi_k3/nvidia/latent_moe_runner.py +@@ -75,4 +75,5 @@ + self.enable_k3_latent_moe_tail_fusion = ( +- current_platform.is_cuda() ++ envs.VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION ++ and current_platform.is_cuda() + and current_platform.is_device_capability_family(100) + ) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index a208ef3b8e..20c91acb88 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -13,6 +13,12 @@ apt-get install -y -qq --no-install-recommends \ libtool libxxhash-dev libyaml-cpp-dev libzstd-dev numactl patchelf pkg-config \ protobuf-compiler python-is-python3 cuda-nvml-dev-13-0 +vllm_site_packages=$(python3 -c 'import importlib.util; from pathlib import Path; print(Path(importlib.util.find_spec("vllm").origin).parent.parent)') +tail_patch="$(dirname "${BASH_SOURCE[0]}")/kimi-k3-latent-tail-opt-out.patch" +if ! git -C "$vllm_site_packages" apply --reverse --check "$tail_patch" 2>/dev/null; then + git -C "$vllm_site_packages" apply "$tail_patch" +fi + task_dir=$(mktemp -d /tmp/kimi-k3-efa.XXXXXX) curl -fsSL --retry 3 --retry-all-errors \ https://efa-installer.amazonaws.com/aws-efa-installer-1.50.0.tar.gz \ diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 717009fcf6..c4a35119a3 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -90,6 +90,8 @@ override_tp16_dspark5: env: # Separate B300 nodes cannot exchange direct symmetric-memory pointers. VLLM_ALLREDUCE_USE_FLASHINFER: '0' + VLLM_KIMI_K3_GEMM_AR: '0' + VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION: '0' VLLM_USE_DIRECT_DCP_A2A: '0' VLLM_USE_DIRECT_DCP_Q_GATHER: '0' VLLM_USE_DIRECT_DCP_KV_GATHER: '0' diff --git a/inferencex-e2e/docs/waiver/4304.md b/inferencex-e2e/docs/waiver/4304.md index ae4f94ea97..12a5f1bb41 100644 --- a/inferencex-e2e/docs/waiver/4304.md +++ b/inferencex-e2e/docs/waiver/4304.md @@ -6,11 +6,18 @@ The B300 Kimi K3 AgentX aggregate and disaggregated configurations use `vllm/vllm-openai:nightly-1b2a666391f2a24228a1436b64d547c34cc6b6ce`. Their container setup script is `benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh`. -The script does not change vLLM, model weights, the draft model, the evaluation -harness or synthetic acceptance selection. +The script adds a vLLM opt-out for NVLink-only latent-MoE tail fusion. It does +not change model weights, the draft model, the evaluation harness or synthetic +acceptance selection. ## Changes and reason +- Add `VLLM_ENABLE_K3_LATENT_MOE_TAIL_FUSION` to vLLM's environment registry + and gate the Kimi K3 fused tail with it. The default stays enabled. The + two-node TP16 override disables it because EFA-connected nodes cannot share + its NVLink multicast workspace; the existing unfused tail remains available. + The same override disables custom allreduce and GEMM-AR through existing + vLLM flags. Single-node TP8 workers retain their fused paths. - Install EFA 1.50.0 userspace libraries, including the AWS OFI NCCL plugin. The upstream vLLM image does not include the EFA transport dependencies. The installer skips kernel modules, MPI and host limit changes. @@ -39,8 +46,10 @@ the script does not modify host drivers, huge-page settings or network configura ## Removal plan -Drop the libfabric patch once the EFA installer ships the three upstream -changes. Replace the Mooncake source build with an official EFA CUDA 13 wheel +Drop the vLLM opt-out patch when the pinned image exposes a supported way to +disable NVLink-only latent-tail fusion or automatically selects its unfused +path on unsupported topologies. Drop the libfabric patch once the EFA installer +ships the three upstream changes. Replace the Mooncake source build with an official EFA CUDA 13 wheel once it includes #4393. Remove the NIXL environment override when its VMM context handling supports the default path. Retain only the EFA userspace installation if it is still absent from the pinned upstream image. From ee970fb96432132792f2ceb113fc0c7ddf4ebe11 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 07:58:26 -0400 Subject: [PATCH 13/33] fix: collapse mixed-page EFA host buffers before registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Collapse aligned host chunks after pre-touch, before EFA pins them. Rebuild the Mooncake wheel under a distinct cache key and local version. Preserve cache capacity, NIC selection, GPU registration and the full sweep matrix. 在 EFA 注册前折叠主机缓存中的小页间隙,避免注册资源耗尽。更新构建缓存和软件包版本,保持缓存容量、网卡选择、GPU 注册及完整扫描配置不变。 Co-authored-by: Codex Signed-off-by: wzhao18 --- .../configs/kimik3-b300-efa-setup.sh | 8 ++++--- .../mooncake-efa-collapse-host-chunks.patch | 21 +++++++++++++++++++ inferencex-e2e/docs/waiver/4304.md | 20 ++++++++++++++---- 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-collapse-host-chunks.patch diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 20c91acb88..137e95ddc1 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -32,7 +32,7 @@ tar -xzf "$task_dir/efa.tar.gz" -C "$task_dir" ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify --skip-mpi ) -cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-v2" +cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-collapse-v3" mkdir -p "$cache" exec 9>"$cache/build.lock" flock 9 @@ -61,6 +61,8 @@ if [ ! -f "$cache/ready" ]; then 'wheel==0.48.0' 'setuptools==84.0.0' numpy 'pybind11==3.1.0' 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" apply \ + "$(dirname "${BASH_SOURCE[0]}")/mooncake-efa-collapse-host-chunks.patch" git -C "$task_dir/Mooncake" submodule update --init --recursive ( cd "$task_dir/Mooncake" @@ -73,7 +75,7 @@ if [ ! -f "$cache/ready" ]; then -DBUILD_BENCHMARK=OFF -DBUILD_EXAMPLES=ON cmake --build build --parallel 12 --target \ engine store mooncake_master mooncake_client transfer_engine_bench build_nvlink_allocator - sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec"/' \ + sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec.collapse1"/' \ mooncake-wheel/pyproject.toml mkdir -p "$task_dir/wheels" EFA_CU13_BUILD=1 OUTPUT_DIR="$task_dir/wheels" bash scripts/build_wheel.sh @@ -98,6 +100,6 @@ from mooncake.store import MooncakeDistributedStore fabric = ctypes.CDLL("libfabric.so.1") fabric.fi_version.restype = ctypes.c_uint32 assert fabric.fi_version() == (2 << 16 | 6) -assert importlib.metadata.version("mooncake-transfer-engine-efa-cuda13") == "0.3.13.post1+gc3fa13ec" +assert importlib.metadata.version("mooncake-transfer-engine-efa-cuda13") == "0.3.13.post1+gc3fa13ec.collapse1" print("EFA libfabric 2.6 and THP-enabled Mooncake Store are available") PY diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-collapse-host-chunks.patch b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-collapse-host-chunks.patch new file mode 100644 index 0000000000..e3cf99bba3 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-collapse-host-chunks.patch @@ -0,0 +1,21 @@ +diff --git a/mooncake-transfer-engine/src/transport/efa_transport/efa_transport.cpp b/mooncake-transfer-engine/src/transport/efa_transport/efa_transport.cpp +--- a/mooncake-transfer-engine/src/transport/efa_transport/efa_transport.cpp ++++ b/mooncake-transfer-engine/src/transport/efa_transport/efa_transport.cpp +@@ -408,4 +408,17 @@ int EfaTransport::registerLocalMemory(void* addr, size_t length, + if (ci > 0) rollbackChunks(ci - 1); + return ret; + } ++#ifdef MADV_COLLAPSE ++ // Small-page gaps reduce the hardware page size for the entire MR. ++ // Collapse before registration pins pages and prevents compaction. ++ constexpr size_t kHugePageSize = 2 * 1024 * 1024; ++ if (reinterpret_cast(chunk_addr) % kHugePageSize == 0 && ++ chunk_len % kHugePageSize == 0 && ++ madvise(chunk_addr, chunk_len, MADV_COLLAPSE) != 0) { ++ // Older kernels or non-anonymous buffers may not support this. ++ // Preserve their existing registration path. ++ PLOG(WARNING) << "Could not collapse EFA host registration chunk " ++ << ci; ++ } ++#endif + } diff --git a/inferencex-e2e/docs/waiver/4304.md b/inferencex-e2e/docs/waiver/4304.md index 12a5f1bb41..123931a0dc 100644 --- a/inferencex-e2e/docs/waiver/4304.md +++ b/inferencex-e2e/docs/waiver/4304.md @@ -34,7 +34,18 @@ acceptance selection. including the THP allocator from [Mooncake #4393](https://github.com/kvcache-ai/Mooncake/pull/4393). The released allocator uses small host pages, exhausting EFA registration resources for the configured 160 GiB segment per rank. The rebuilt wheel is - identified as `0.3.13.post1+gc3fa13ec` rather than an unmodified release. + identified as `0.3.13.post1+gc3fa13ec.collapse1` rather than an unmodified release. +- Apply `mooncake-efa-collapse-host-chunks.patch` before building that wheel. + THP advice can leave small-page gaps in otherwise huge-page-backed cache + buffers, causing EFA registration to exhaust page-table resources. Collapse + aligned host chunks after the existing pre-touch and before registration. + This is best-effort on kernels that support `MADV_COLLAPSE`; unsupported + mappings retain the existing registration path. Capacity, NIC selection + and GPU-memory registration are unchanged. Eight-client 160 GiB controls + reproduced ENOMEM with a 2 MiB small-page window; the patched engine passed + all eight registrations under the same mixed-backing conditions. The patched + full-model Dynamo prefill control also reached readiness at unchanged + 160 GiB capacity per rank, with all eight mappings fully huge-page-backed. - Set `NIXL_DISABLE_CUDA_ADDR_WA=1` for NIXL 1.5's existing device-context fallback. CUDA VMM allocations do not provide the owning context expected by its pointer-address workaround. This is configuration, not a NIXL patch. @@ -49,7 +60,8 @@ the script does not modify host drivers, huge-page settings or network configura Drop the vLLM opt-out patch when the pinned image exposes a supported way to disable NVLink-only latent-tail fusion or automatically selects its unfused path on unsupported topologies. Drop the libfabric patch once the EFA installer -ships the three upstream changes. Replace the Mooncake source build with an official EFA CUDA 13 wheel -once it includes #4393. Remove the NIXL environment override when its VMM -context handling supports the default path. Retain only the EFA userspace +ships the three upstream changes. Replace the Mooncake source build with an +official EFA CUDA 13 wheel once it includes #4393 and the host-chunk collapse +fix. Remove the NIXL environment override when its VMM context handling supports +the default path. Retain only the EFA userspace installation if it is still absent from the pinned upstream image. From ca54dea108f58f46a4090754abb3d6812fbe9c2e Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Mon, 19 Oct 2026 08:55:35 -0400 Subject: [PATCH 14/33] fix: exclude B300 node with reproducible Slurm launch failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 排除无法启动 Slurm task 的 B300 节点,保留已有排除列表、全部性能点及评估配置。独立 hostname(工作目录 /tmp)与扫描作业均复现 exit 255。 Co-authored-by: Codex Signed-off-by: wzhao18 --- inferencex-e2e/configs/runners.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index cf9934cbe1..58a52d0af0 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,7 +538,7 @@ clusters: partition: batch_1 account: benchmark exclusive: true - exclude: [dsxe-sa-b300-prd0-gpu-16] + exclude: [dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-16] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 519cdf751ac10784137749557d56e208d9d9e9cb Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 01:42:26 -0400 Subject: [PATCH 15/33] fix(kimik3-b300): keep EFA-registered KV off CUDA VMM; no requeue; verified aiconfigurator wheel EFA DMA (Mooncake, FI_HMEM_CUDA dmabuf) into CUDA VMM/cumem memory froze B300 hosts. A standalone Mooncake-over-EFA reproducer (no vLLM) froze 2/2 nodes with VMM GPU buffers and ran clean with cudaMalloc buffers. Drop enable-cumem-allocator and set NCCL_CUMEM_ENABLE=0 on disagg workers. Never requeue: a hung worker can take its host down, and requeue moved one job across four node sets. Install the pinned aiconfigurator-core wheel, verified against its published SHA256, before Dynamo's source install; its placeholder sdist fetches the wheel at install time and fails intermittently here. Co-Authored-By: Claude Opus 5.5 --- .../configs/kimik3-b300-efa-setup.sh | 25 +++++++++++++++++++ .../vllm/b300-fp4/agentx/disagg-variants.yaml | 8 +++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 137e95ddc1..7ca6df0929 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -90,6 +90,31 @@ python3 -m pip uninstall -y \ python3 -m pip install --no-deps "$cache/"*.whl flock -u 9 +# Dynamo's source install pulls aiconfigurator-core, a placeholder sdist that +# downloads its real wheel from pypi.nvidia.com at install time and fails +# intermittently on these nodes. Install the same wheel first, verified against +# its published SHA256, so the Dynamo install finds the requirement satisfied. +aic_wheel=aiconfigurator_core-0.11.0.dev20260728-cp310-abi3-manylinux_2_28_x86_64.whl +aic_sha256=cfd724c6cce142ffc3df150785614245b8a9e0fb70cacb071b4ab58f01bd19c7 +aic_dir="$KIMI_EFA_BUILD_CACHE/wheels" +mkdir -p "$aic_dir" +for attempt in 1 2 3 4 5; do + if printf '%s %s\n' "$aic_sha256" "$aic_dir/$aic_wheel" | sha256sum -c --status - 2>/dev/null; then + break + fi + curl -fsSL --retry 3 --retry-all-errors \ + "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 + sleep $((attempt * 10)) + fi +done +printf '%s %s\n' "$aic_sha256" "$aic_dir/$aic_wheel" | sha256sum -c - +python3 -m pip install --no-deps "$aic_dir/$aic_wheel" + /opt/amazon/efa/bin/fi_info --version /opt/amazon/efa/bin/fi_info -p efa -t FI_EP_RDM python3 - <<'PY' diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index d260d905ae..80cb312932 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -99,7 +99,9 @@ base: VLLM_RPC_TIMEOUT: "600000" TILELANG_CLEANUP_TEMP_FILES: "1" VLLM_USE_NCCL_SYMM_MEM: "0" - NCCL_CUMEM_ENABLE: "1" + # EFA DMA into CUDA VMM (cumem) memory froze B300 hosts; keep NCCL + # buffers and the KV cache Mooncake/NIXL register on cudaMalloc. + NCCL_CUMEM_ENABLE: "0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" @@ -133,7 +135,6 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - enable-cumem-allocator: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -165,7 +166,6 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - enable-cumem-allocator: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -176,6 +176,8 @@ base: max-num-seqs: 128 speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' sbatch_directives: + # A hung worker can take its host down; never requeue onto fresh nodes. + no-requeue: "" mem: "0" comment: >- '{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will From 06580d6d105d7a934022d04bf7654bfbf2d22a93 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 04:00:54 -0400 Subject: [PATCH 16/33] fix(kimik3-b300): keep cross-node TP16 NCCL buffers off CUDA VMM; no requeue for agg The two-node TP16 point runs NCCL over EFA with NCCL's default cuMem buffers, the same EFA-into-VMM path that froze B300 hosts; a sweep run lost node 09 during this job. Single-node TP8 points never use EFA and are unchanged. Co-Authored-By: Claude Opus 5.5 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index c4a35119a3..3c0f32c23f 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -70,6 +70,8 @@ base: max-num-batched-tokens: 16384 additional-config: '{"decode_backend":"latency_specialized"}' sbatch_directives: + # A hung worker can take its host down; never requeue onto fresh nodes. + no-requeue: "" mem: '0' comment: '''{"OccupiedIdleGPUsJobReaper":{"exemptIdleTimeMins":"60","reason":"model_loading","description":"Very large model will take extra loading time."}}''' srun_options: @@ -95,6 +97,9 @@ override_tp16_dspark5: VLLM_USE_DIRECT_DCP_A2A: '0' VLLM_USE_DIRECT_DCP_Q_GATHER: '0' VLLM_USE_DIRECT_DCP_KV_GATHER: '0' + # Cross-node NCCL runs over EFA; EFA DMA into cuMem (CUDA VMM) buffers + # froze B300 hosts, so keep NCCL buffers on cudaMalloc. + NCCL_CUMEM_ENABLE: '0' args: tensor-parallel-size: 16 decode-context-parallel-size: 16 From 465d9aa720adb781d12ae47979a3ccde5a90c290 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 04:24:56 -0400 Subject: [PATCH 17/33] fix(b300-dsxe): refuse and exclude nodes whose EFA devices failed registrations A standalone Mooncake-over-EFA reproducer froze every node running since Oct 6-14 (3/3) within seconds to minutes and none of the rebooted nodes (0/7), independent of the GPU allocator; a sweep job also froze node 09 with the cumem change applied. Long-running nodes carry reg_mr_err=46 per EFA device from earlier registration failures; rebooted nodes carry none and the current workload creates none. Exclude those nodes until they are rebooted, and make the setup script refuse any node whose EFA devices report failed registrations instead of freezing it. Co-Authored-By: Claude Opus 5.5 --- .../configs/kimik3-b300-efa-setup.sh | 15 +++++++++++++++ inferencex-e2e/configs/runners.yaml | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 7ca6df0929..f9017f5aca 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -4,6 +4,21 @@ set -eo pipefail source /infmax-workspace/benchmarks/check_env.sh check_env_vars KIMI_EFA_BUILD_CACHE LD_LIBRARY_PATH +# An EFA device that has failed memory registrations stays degraded until the +# host reboots, and heavy RDMA on it freezes the host. Refuse such a node here +# instead of letting a worker take it down. +reg_mr_errors=0 +for counter in /sys/class/infiniband/*/hw_counters/reg_mr_err \ + /sys/class/infiniband/*/ports/*/hw_counters/reg_mr_err; do + [ -r "$counter" ] || continue + reg_mr_errors=$((reg_mr_errors + $(cat "$counter"))) +done +if [ "$reg_mr_errors" -gt 0 ]; then + echo "EFA devices on $(hostname) report $reg_mr_errors failed memory registrations since boot;" \ + "reboot the node before running EFA workloads on it." >&2 + exit 1 +fi + export DEBIAN_FRONTEND=noninteractive apt-get update -qq apt-get install -y -qq --no-install-recommends \ diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index 58a52d0af0..fd12d5cbe5 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,7 +538,11 @@ clusters: partition: batch_1 account: benchmark exclusive: true - exclude: [dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-16] + # 06, 09, 10, 14-17 have run since Oct 6-14 and their EFA devices carry failed + # memory registrations that freeze hosts under RDMA load; exclude until rebooted. + exclude: [dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-09, + dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, dsxe-sa-b300-prd0-gpu-15, + dsxe-sa-b300-prd0-gpu-16, dsxe-sa-b300-prd0-gpu-17] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 31af465de0f66e9730d2c32cc1e80aaa037e198f Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 11:02:51 -0400 Subject: [PATCH 18/33] fix(kimik3-b300): route same-node EFA transfers through the NIC Mooncake's store places KV on same-node segments, which libfabric's EFA provider serves through its SHM path (CUDA IPC copies). With NVLink peer and multicast traffic this poisoned GPU data and froze hosts: a standalone Mooncake-over-EFA plus NCCL NVLS all-reduce reproducer hit Xid 94 on every GPU of both nodes after ~10 min, and ran clean past that with FI_EFA_ENABLE_SHM_TRANSFER=0. NIXL-only disaggregation, which never uses the SHM path here, ran its full benchmark clean. Refresh the node exclusions to the nodes that are still unrebooted or report failed EFA registrations. Co-Authored-By: Claude Opus 5.5 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 5 +++++ inferencex-e2e/configs/runners.yaml | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 80cb312932..6aef24b379 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -102,6 +102,11 @@ base: # EFA DMA into CUDA VMM (cumem) memory froze B300 hosts; keep NCCL # buffers and the KV cache Mooncake/NIXL register on cudaMalloc. NCCL_CUMEM_ENABLE: "0" + # Mooncake places KV on same-node segments too; libfabric serves those + # through its SHM path (CUDA IPC copies), which with NVLink peer and + # multicast traffic poisoned GPU data (Xid 94) and froze B300 hosts. + # Route same-node EFA transfers through the NIC instead. + FI_EFA_ENABLE_SHM_TRANSFER: "0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index fd12d5cbe5..544a7d8312 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,11 +538,11 @@ clusters: partition: batch_1 account: benchmark exclusive: true - # 06, 09, 10, 14-17 have run since Oct 6-14 and their EFA devices carry failed - # memory registrations that freeze hosts under RDMA load; exclude until rebooted. - exclude: [dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-09, + # 06, 10, 14, 15 and 16 have run since Oct 6-14 without a reboot, and 02 reports + # failed EFA memory registrations; 08 has a task-launch failure. Exclude until rebooted. + exclude: [dsxe-sa-b300-prd0-gpu-02, dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, dsxe-sa-b300-prd0-gpu-15, - dsxe-sa-b300-prd0-gpu-16, dsxe-sa-b300-prd0-gpu-17] + dsxe-sa-b300-prd0-gpu-16] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 8ba89f7ffe13569965129a10680b3fa9da7c64bb Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 11:18:10 -0400 Subject: [PATCH 19/33] Revert "fix(kimik3-b300): route same-node EFA transfers through the NIC" This reverts commit 31af465de0f66e9730d2c32cc1e80aaa037e198f. --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 5 ----- inferencex-e2e/configs/runners.yaml | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 6aef24b379..80cb312932 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -102,11 +102,6 @@ base: # EFA DMA into CUDA VMM (cumem) memory froze B300 hosts; keep NCCL # buffers and the KV cache Mooncake/NIXL register on cudaMalloc. NCCL_CUMEM_ENABLE: "0" - # Mooncake places KV on same-node segments too; libfabric serves those - # through its SHM path (CUDA IPC copies), which with NVLink peer and - # multicast traffic poisoned GPU data (Xid 94) and froze B300 hosts. - # Route same-node EFA transfers through the NIC instead. - FI_EFA_ENABLE_SHM_TRANSFER: "0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index 544a7d8312..fd12d5cbe5 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,11 +538,11 @@ clusters: partition: batch_1 account: benchmark exclusive: true - # 06, 10, 14, 15 and 16 have run since Oct 6-14 without a reboot, and 02 reports - # failed EFA memory registrations; 08 has a task-launch failure. Exclude until rebooted. - exclude: [dsxe-sa-b300-prd0-gpu-02, dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, + # 06, 09, 10, 14-17 have run since Oct 6-14 and their EFA devices carry failed + # memory registrations that freeze hosts under RDMA load; exclude until rebooted. + exclude: [dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-09, dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, dsxe-sa-b300-prd0-gpu-15, - dsxe-sa-b300-prd0-gpu-16] + dsxe-sa-b300-prd0-gpu-16, dsxe-sa-b300-prd0-gpu-17] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 1e23f439ea6b12695520dc15d80d896eca2013bb Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 12:36:48 -0400 Subject: [PATCH 20/33] fix(kimik3-b300): register Mooncake GPU buffers only on PCIe-local EFA NICs Mooncake registers GPU KV memory on all 16 EFA NICs by default, and a retried slice walks the topology's non-preferred NICs, including the eight on the other socket, so a GPU can be DMA'd across sockets. NIXL only uses each GPU's two PCIe-local NICs and NIXL-only disaggregation ran its full benchmark clean. With MC_EFA_NIC_SELECTION=local the PR's 1P1D configuration ran 20+ minutes of warmup clean on rebooted nodes, where every earlier Mooncake run froze its prefill host within 1-10 minutes. Refresh node exclusions to the unrebooted nodes and the node reporting failed EFA registrations. Co-Authored-By: Claude Opus 5.5 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 5 +++++ inferencex-e2e/configs/runners.yaml | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 80cb312932..a7c28afde0 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -102,6 +102,11 @@ base: # EFA DMA into CUDA VMM (cumem) memory froze B300 hosts; keep NCCL # buffers and the KV cache Mooncake/NIXL register on cudaMalloc. NCCL_CUMEM_ENABLE: "0" + # Register each GPU buffer with Mooncake only on the two EFA NICs on that + # GPU's PCIe switch (as NIXL does). By default Mooncake registers GPU KV + # memory on all 16 NICs and retried slices may DMA it from a NIC on the + # other socket; disaggregated prefill hosts froze without this. + MC_EFA_NIC_SELECTION: "local" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index fd12d5cbe5..544a7d8312 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,11 +538,11 @@ clusters: partition: batch_1 account: benchmark exclusive: true - # 06, 09, 10, 14-17 have run since Oct 6-14 and their EFA devices carry failed - # memory registrations that freeze hosts under RDMA load; exclude until rebooted. - exclude: [dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-09, + # 06, 10, 14, 15 and 16 have run since Oct 6-14 without a reboot, and 02 reports + # failed EFA memory registrations; 08 has a task-launch failure. Exclude until rebooted. + exclude: [dsxe-sa-b300-prd0-gpu-02, dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, dsxe-sa-b300-prd0-gpu-15, - dsxe-sa-b300-prd0-gpu-16, dsxe-sa-b300-prd0-gpu-17] + dsxe-sa-b300-prd0-gpu-16] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 81109494afc005f3736829b40fe45e9c02924f3e Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 12:40:10 -0400 Subject: [PATCH 21/33] chore: restore perf-changelog to main plus this PR's entry --- inferencex-e2e/perf-changelog.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index c81bda1783..01756e75e7 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10376,6 +10376,12 @@ - "Update SGLang image from v0.5.14-cu130 to v0.5.21-cu130 and rename cuda-graph-max-bs to cuda-graph-max-bs-decode." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4213 +- config-keys: + - qwen3.5-fp8-h100-sglang-mtp + description: + - "Bump SGLang image to v0.5.21-cu130 and rename --cuda-graph-max-bs to --cuda-graph-max-bs-decode." + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4214 + - config-keys: - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg From c8e53e20b3da8948a029754c873491619889c46c Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 12:41:07 -0400 Subject: [PATCH 22/33] chore: end perf-changelog with a newline --- inferencex-e2e/perf-changelog.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 6a2b581158..01756e75e7 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10389,4 +10389,4 @@ - agentic-coding description: - "Add B300 Kimi K3 DSpark DCP disaggregated and low-latency aggregate configurations." - pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 \ No newline at end of file + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From 7a33f2ef2e709f35e36aa1daddb5036c73d95390 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 13:00:43 -0400 Subject: [PATCH 23/33] fix(kimik3-b300): restore NCCL cuMem on the TP16 aggregate point 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 --- .../kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml index 3c0f32c23f..240a09e416 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -97,9 +97,6 @@ override_tp16_dspark5: VLLM_USE_DIRECT_DCP_A2A: '0' VLLM_USE_DIRECT_DCP_Q_GATHER: '0' VLLM_USE_DIRECT_DCP_KV_GATHER: '0' - # Cross-node NCCL runs over EFA; EFA DMA into cuMem (CUDA VMM) buffers - # froze B300 hosts, so keep NCCL buffers on cudaMalloc. - NCCL_CUMEM_ENABLE: '0' args: tensor-parallel-size: 16 decode-context-parallel-size: 16 From 35a1981db72214f37b58cdc73fb26190b53d7330 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 13:23:18 -0400 Subject: [PATCH 24/33] chore: trigger non-canary sweep Co-Authored-By: Claude Opus 5.5 From e421cb11c967d250c42ab4df1d69c381ff3f9ac4 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 14:31:04 -0400 Subject: [PATCH 25/33] fix(b300-dsxe): exclude node 05 until its page cache is dropped 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 --- inferencex-e2e/configs/runners.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index 544a7d8312..6d7cfaf13d 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -538,11 +538,13 @@ clusters: partition: batch_1 account: benchmark exclusive: true - # 06, 10, 14, 15 and 16 have run since Oct 6-14 without a reboot, and 02 reports - # failed EFA memory registrations; 08 has a task-launch failure. Exclude until rebooted. - exclude: [dsxe-sa-b300-prd0-gpu-02, dsxe-sa-b300-prd0-gpu-06, dsxe-sa-b300-prd0-gpu-08, - dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, dsxe-sa-b300-prd0-gpu-15, - dsxe-sa-b300-prd0-gpu-16] + # 06, 10, 14, 15 and 16 have run since Oct 6-14 without a reboot, 02 and 05 report + # failed EFA memory registrations (05: ~3 TB page cache after model repopulation left + # too little contiguous memory for THP-backed Mooncake segments), and 08 has a + # task-launch failure. Exclude until rebooted. + exclude: [dsxe-sa-b300-prd0-gpu-02, dsxe-sa-b300-prd0-gpu-05, dsxe-sa-b300-prd0-gpu-06, + dsxe-sa-b300-prd0-gpu-08, dsxe-sa-b300-prd0-gpu-10, dsxe-sa-b300-prd0-gpu-14, + dsxe-sa-b300-prd0-gpu-15, dsxe-sa-b300-prd0-gpu-16] gres: "gpu:{gpus}" cpus-per-gpu: 24 salloc-args: [--mem=0] From 4412e54fcbfab84764c9e7535b88ec95b04f6a40 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 14:35:36 -0400 Subject: [PATCH 26/33] chore(kimik3-b300): run the sweep without evals Co-Authored-By: Claude Opus 5.5 --- inferencex-e2e/perf-changelog.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index dba4d6a6ff..fe936e8153 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10430,6 +10430,7 @@ - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg scenario-type: - agentic-coding + no-evals: true description: - "Add B300 Kimi K3 DSpark DCP disaggregated and low-latency aggregate configurations." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From 66b0ad16afd77c680842be827b9888f73f001000 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 19:15:17 -0400 Subject: [PATCH 27/33] Disable B300 Kimi K3 aggregated c1/c2/c4 runs for future sweeps Co-Authored-By: Claude Opus 5.5 --- inferencex-e2e/configs/nvidia-master.yaml | 82 ++++++++++++----------- inferencex-e2e/perf-changelog.yaml | 3 +- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/inferencex-e2e/configs/nvidia-master.yaml b/inferencex-e2e/configs/nvidia-master.yaml index bb37b08060..69d6c0b4ce 100644 --- a/inferencex-e2e/configs/nvidia-master.yaml +++ b/inferencex-e2e/configs/nvidia-master.yaml @@ -9933,43 +9933,45 @@ kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg: 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 - conc-list: - - 1 - num-nodes: 2 - srt-recipe: agg-megakernel-variants.yaml:override_tp16_dspark5 - power: true - worker: - num-worker: 1 - tp: 16 - dcp-size: 16 - ep: 1 - dp-attn: false - - spec-decoding: mtp - kv-offloading: none - conc-list: - - 2 - - 4 - num-nodes: 1 - srt-recipe: agg-megakernel-variants.yaml:override_tp8_dspark7 - power: true - worker: - num-worker: 1 - tp: 8 - dcp-size: 8 - ep: 1 - dp-attn: false +# Aggregated TP16 c1 / TP8 c2,c4 runs already passed (sweep 39476119630); disabled to keep +# reruns focused on the disaggregated Mooncake configs. +# 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 +# conc-list: +# - 1 +# num-nodes: 2 +# srt-recipe: agg-megakernel-variants.yaml:override_tp16_dspark5 +# power: true +# worker: +# num-worker: 1 +# tp: 16 +# dcp-size: 16 +# ep: 1 +# dp-attn: false +# - spec-decoding: mtp +# kv-offloading: none +# conc-list: +# - 2 +# - 4 +# num-nodes: 1 +# srt-recipe: agg-megakernel-variants.yaml:override_tp8_dspark7 +# power: true +# worker: +# num-worker: 1 +# tp: 8 +# dcp-size: 8 +# ep: 1 +# dp-attn: false diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index fe936e8153..c63252d03b 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10427,10 +10427,9 @@ - config-keys: - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg - - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-agg scenario-type: - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated and low-latency aggregate configurations." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From 5a386a634a834f2cd454648f7413010980cde341 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Tue, 20 Oct 2026 20:24:27 -0400 Subject: [PATCH 28/33] Fix Kimi K3 B300 Mooncake EFA NIC indexing with MC_MS_FILTERS 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 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index a7c28afde0..9623470eb5 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -107,6 +107,12 @@ base: # memory on all 16 NICs and retried slices may DMA it from a NIC on the # other socket; disaggregated prefill hosts froze without this. MC_EFA_NIC_SELECTION: "local" + # Keep the two non-EFA IB HCAs (ibp198s0f0/ibp199s0f0) out of Mooncake's + # topology. EfaTransport indexes its NIC contexts over EFA devices only, + # but disabled topology HCAs keep their slots, so every selected NIC was + # off by two: GPU 0 could never transfer (AddressNotRegistered, 0% store + # hits) and other GPUs posted through a neighbouring GPU's NICs. + MC_MS_FILTERS: "rdmap86s0,rdmap87s0,rdmap101s0,rdmap102s0,rdmap116s0,rdmap117s0,rdmap131s0,rdmap132s0,rdmap146s0,rdmap147s0,rdmap161s0,rdmap162s0,rdmap176s0,rdmap177s0,rdmap191s0,rdmap192s0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" From b14e1ee04b31e65465acbb1f3ab536ec979c94cb Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Wed, 21 Oct 2026 20:16:55 -0400 Subject: [PATCH 29/33] Fix Kimi K3 B300 EFA prefill hang 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 --- .../configs/kimik3-b300-efa-setup.sh | 53 +++++- .../configs/mooncake-efa-handshake-lock.patch | 170 ++++++++++++++++++ .../mooncake-efa-loopback-stream.patch | 46 +++++ .../vllm/b300-fp4/agentx/disagg-variants.yaml | 10 ++ inferencex-e2e/perf-changelog.yaml | 2 +- 5 files changed, 276 insertions(+), 5 deletions(-) create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-handshake-lock.patch create mode 100644 inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-loopback-stream.patch diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index f9017f5aca..62fd470db4 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -20,7 +20,13 @@ if [ "$reg_mr_errors" -gt 0 ]; then fi export DEBIAN_FRONTEND=noninteractive -apt-get update -qq +# The NVIDIA CUDA apt mirror is intermittently mid-sync (index size mismatch); +# retry instead of failing the whole worker setup. +for attempt in 1 2 3 4 5; do + apt-get update -qq && break + [ "$attempt" = 5 ] && exit 1 + sleep $((attempt * 15)) +done apt-get install -y -qq --no-install-recommends \ autoconf automake build-essential ca-certificates curl git libboost-filesystem-dev \ libboost-system-dev libcurl4-openssl-dev libgflags-dev libgoogle-glog-dev \ @@ -47,7 +53,7 @@ tar -xzf "$task_dir/efa.tar.gz" -C "$task_dir" ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify --skip-mpi ) -cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-collapse-v3" +cache="$KIMI_EFA_BUILD_CACHE/c3fa13ec-e83bf01a-collapse-hs-lb-v1" mkdir -p "$cache" exec 9>"$cache/build.lock" flock 9 @@ -78,6 +84,14 @@ if [ ! -f "$cache/ready" ]; then git -C "$task_dir/Mooncake" checkout --detach c3fa13ecaf1038df933dcb784ff8ffe026381100 git -C "$task_dir/Mooncake" apply \ "$(dirname "${BASH_SOURCE[0]}")/mooncake-efa-collapse-host-chunks.patch" + # Upstream #4704: do not hold the endpoint lock across the handshake RPC; + # bilateral active setup deadlocks both peers otherwise. + git -C "$task_dir/Mooncake" apply \ + "$(dirname "${BASH_SOURCE[0]}")/mooncake-efa-handshake-lock.patch" + # Loopback copies on a private non-blocking stream instead of a synchronous + # legacy-stream cudaMemcpy that can deadlock against concurrent collectives. + git -C "$task_dir/Mooncake" apply \ + "$(dirname "${BASH_SOURCE[0]}")/mooncake-efa-loopback-stream.patch" git -C "$task_dir/Mooncake" submodule update --init --recursive ( cd "$task_dir/Mooncake" @@ -90,7 +104,7 @@ if [ ! -f "$cache/ready" ]; then -DBUILD_BENCHMARK=OFF -DBUILD_EXAMPLES=ON cmake --build build --parallel 12 --target \ engine store mooncake_master mooncake_client transfer_engine_bench build_nvlink_allocator - sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec.collapse1"/' \ + sed -i 's/^version = .*/version = "0.3.13.post1+gc3fa13ec.collapse1.hs1.lb1"/' \ mooncake-wheel/pyproject.toml mkdir -p "$task_dir/wheels" EFA_CU13_BUILD=1 OUTPUT_DIR="$task_dir/wheels" bash scripts/build_wheel.sh @@ -100,6 +114,37 @@ if [ ! -f "$cache/ready" ]; then fi tar -xzf "$cache/libfabric.tar.gz" -C / ldconfig + +# NIXL's wheel ships a LIBFABRIC plugin compiled against libfabric 1.x headers +# but loads the libfabric 2.6 above at runtime. Rebuild just that plugin from +# the same NIXL release against these headers and drop it into the wheel. +nixl_cache="$KIMI_EFA_BUILD_CACHE/nixl-1683cf3b-lf-e83bf01a-v1" +mkdir -p "$nixl_cache" +exec 8>"$nixl_cache/build.lock" +flock 8 +if [ ! -f "$nixl_cache/ready" ]; then + apt-get install -y -qq libhwloc-dev + python3 -m pip install --no-cache-dir 'meson==1.9.1' 'ninja==1.13.0' 'pybind11[global]==3.1.0' + git clone https://github.com/ai-dynamo/nixl.git "$task_dir/nixl" + git -C "$task_dir/nixl" checkout --detach 1683cf3b7f3d11674c03c5e861cea22339876c96 + ( + cd "$task_dir/nixl" + meson setup build --buildtype=release -Dlibfabric_path=/opt/amazon/efa \ + -Denable_plugins=LIBFABRIC -Dbuild_tests=false -Dbuild_examples=false \ + -Dinstall_headers=false -Dwith_trace=false -Dnixl_cuda_arch_list=100 \ + -Dcudapath_inc=/usr/local/cuda/include -Dcudapath_lib=/usr/local/cuda/lib64 + ninja -C build src/plugins/libfabric/libplugin_LIBFABRIC.so + patchelf --set-rpath '$ORIGIN/..:$ORIGIN/../../nixl_cu13.libs' \ + build/src/plugins/libfabric/libplugin_LIBFABRIC.so + ) + cp "$task_dir/nixl/build/src/plugins/libfabric/libplugin_LIBFABRIC.so" "$nixl_cache/" + touch "$nixl_cache/ready" +fi +nixl_plugins="$vllm_site_packages/.nixl_cu13.mesonpy.libs/plugins" +cp "$nixl_cache/libplugin_LIBFABRIC.so" "$nixl_plugins/libplugin_LIBFABRIC.so" +flock -u 8 +readelf -V "$nixl_plugins/libplugin_LIBFABRIC.so" | grep -q FABRIC_1.9 + python3 -m pip uninstall -y \ mooncake-transfer-engine mooncake-transfer-engine-cuda13 mooncake-transfer-engine-efa-cuda13 python3 -m pip install --no-deps "$cache/"*.whl @@ -140,6 +185,6 @@ from mooncake.store import MooncakeDistributedStore fabric = ctypes.CDLL("libfabric.so.1") fabric.fi_version.restype = ctypes.c_uint32 assert fabric.fi_version() == (2 << 16 | 6) -assert importlib.metadata.version("mooncake-transfer-engine-efa-cuda13") == "0.3.13.post1+gc3fa13ec.collapse1" +assert importlib.metadata.version("mooncake-transfer-engine-efa-cuda13") == "0.3.13.post1+gc3fa13ec.collapse1.hs1.lb1" print("EFA libfabric 2.6 and THP-enabled Mooncake Store are available") PY diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-handshake-lock.patch b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-handshake-lock.patch new file mode 100644 index 0000000000..69bfc0d8cb --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-handshake-lock.patch @@ -0,0 +1,170 @@ +From 7ff6bf7f72f15aba7289bc25c87cf491e04efc6f Mon Sep 17 00:00:00 2001 +From: tensorcopy +Date: Sun, 18 Oct 2026 01:56:03 -0700 +Subject: [PATCH] [TransferEngine] EFA: release the endpoint state lock during + handshake RPC (#4704) + +setupConnectionsByActive() held the endpoint RWSpinlock across the +transfer-metadata handshake RPC. The handshake is reciprocal: the peer's +passive handler must take the same lock on its own endpoint, so a +bilateral active setup (both sides dialing at once) deadlocked. + +Serialize active setup with a dedicated mutex that passive handlers never +take, and hold the state lock only while reading local state and while +publishing the reply, so three properties hold: + +- Active callers are serialized into one handshake RPC; the state lock is + released while the RPC is in flight. +- A reply that crosses a disconnect, a nic-path change or endpoint teardown + is stale: a generation counter, bumped on every disconnect/path change, + rejects it instead of publishing a connection against dead state. +- A passive handshake that connected the endpoint while the RPC was in + flight wins: the active caller returns success and discards its own + reply, even if the RPC failed or the generation moved. + +Also qualify efa_context.h includes as +"transport/efa_transport/efa_context.h" so the endpoint header can be +included from tests that shadow the context boundary +(tests/efa_endpoint_handshake_test.cpp compiles the real endpoint source +against a scripted RPC/address-vector fake and runs without an EFA +device). +--- + .../transport/efa_transport/efa_endpoint.h | 8 ++- + .../transport/efa_transport/efa_endpoint.cpp | 64 ++++++++++++------- + 2 files changed, 48 insertions(+), 24 deletions(-) + +diff --git a/mooncake-transfer-engine/include/transport/efa_transport/efa_endpoint.h b/mooncake-transfer-engine/include/transport/efa_transport/efa_endpoint.h +index 550f6b68..e472a0d3 100644 +--- a/mooncake-transfer-engine/include/transport/efa_transport/efa_endpoint.h ++++ b/mooncake-transfer-engine/include/transport/efa_transport/efa_endpoint.h +@@ -20,11 +20,12 @@ + + #include + #include ++#include + #include + #include + + #include "common.h" +-#include "efa_context.h" ++#include "transport/efa_transport/efa_context.h" + #include "transfer_metadata.h" + #include "transport/transport.h" + +@@ -117,7 +118,12 @@ class EfaEndPoint { + EfaContext& context_; + std::atomic status_; + ++ // Only active callers take this mutex. Passive RPC handlers must not. ++ std::mutex active_setup_mutex_; + RWSpinlock lock_; // protects peer_nic_path_ and status_ ++ // Bumped (under lock_) on every disconnect, nic-path change and teardown, ++ // so a handshake reply that crosses one of them can be rejected. ++ uint64_t generation_ = 0; + std::string peer_nic_path_; + fi_addr_t peer_fi_addr_; // slot in context_.av() + // Last peer EFA address successfully inserted into the AV. Used to +diff --git a/mooncake-transfer-engine/src/transport/efa_transport/efa_endpoint.cpp b/mooncake-transfer-engine/src/transport/efa_transport/efa_endpoint.cpp +index 7357a22f..6b72196c 100644 +--- a/mooncake-transfer-engine/src/transport/efa_transport/efa_endpoint.cpp ++++ b/mooncake-transfer-engine/src/transport/efa_transport/efa_endpoint.cpp +@@ -36,41 +36,57 @@ void EfaEndPoint::setPeerNicPath(const std::string& peer_nic_path) { + << peer_nic_path_ << " -> " << peer_nic_path; + disconnectUnlocked(); + } ++ ++generation_; + peer_nic_path_ = peer_nic_path; + } + + int EfaEndPoint::setupConnectionsByActive() { +- RWSpinlock::WriteGuard guard(lock_); +- if (status_.load(std::memory_order_relaxed) == CONNECTED) return 0; +- +- // Loopback: handshake against ourselves. Use the binary overload +- // so we avoid hex-encoding the local address just to have +- // insertPeerAddr decode it right back. +- if (context_.nicPath() == peer_nic_path_) { +- const auto& bytes = context_.localEpAddrBytes(); +- int ret = context_.insertPeerAddrBytes(bytes.data(), bytes.size(), +- peer_fi_addr_); +- if (ret != 0) return ret; +- status_.store(CONNECTED, std::memory_order_release); +- LOG(INFO) << "EFA loopback connection established: " << toString(); +- return 0; +- } +- +- // Exchange addresses via the transfer-metadata handshake RPC. ++ std::lock_guard setup_guard(active_setup_mutex_); + TransferMetadata::HandShakeDesc local_desc, peer_desc; +- local_desc.local_nic_path = context_.nicPath(); +- local_desc.peer_nic_path = peer_nic_path_; +- local_desc.efa_addr = context_.localEpAddr(); ++ uint64_t generation; ++ { ++ RWSpinlock::WriteGuard guard(lock_); ++ if (status_.load(std::memory_order_relaxed) == CONNECTED) return 0; ++ ++ if (context_.nicPath() == peer_nic_path_) { ++ // Loopback: handshake against ourselves. Use the binary overload ++ // so we avoid hex-encoding the local address just to have ++ // insertPeerAddr decode it right back. ++ const auto& bytes = context_.localEpAddrBytes(); ++ int ret = context_.insertPeerAddrBytes(bytes.data(), bytes.size(), ++ peer_fi_addr_); ++ if (ret != 0) return ret; ++ status_.store(CONNECTED, std::memory_order_release); ++ LOG(INFO) << "EFA loopback connection established: " << toString(); ++ return 0; ++ } ++ generation = generation_; ++ // Exchange addresses via the transfer-metadata handshake RPC. ++ local_desc.local_nic_path = context_.nicPath(); ++ local_desc.peer_nic_path = peer_nic_path_; ++ local_desc.efa_addr = context_.localEpAddr(); ++ } + +- auto peer_server_name = getServerNameFromNicPath(peer_nic_path_); +- auto peer_nic_name = getNicNameFromNicPath(peer_nic_path_); ++ auto peer_server_name = getServerNameFromNicPath(local_desc.peer_nic_path); ++ auto peer_nic_name = getNicNameFromNicPath(local_desc.peer_nic_path); + if (peer_server_name.empty() || peer_nic_name.empty()) { +- LOG(ERROR) << "Parse peer EFA nic path failed: " << peer_nic_path_; ++ LOG(ERROR) << "Parse peer EFA nic path failed: " ++ << local_desc.peer_nic_path; + return ERR_INVALID_ARGUMENT; + } + ++ // A reciprocal RPC needs our passive handler, which takes lock_. + int rc = context_.engine().sendHandshake(peer_server_name, local_desc, + peer_desc); ++ ++ RWSpinlock::WriteGuard guard(lock_); ++ // A passive handshake may have connected the endpoint while the RPC was ++ // in flight; reuse that connection and discard this reply. ++ if (status_.load(std::memory_order_relaxed) == CONNECTED) return 0; ++ if (generation != generation_) { ++ LOG(WARNING) << "Discarding stale EFA handshake reply: " << toString(); ++ return ERR_ENDPOINT; ++ } + if (rc) return rc; + + if (peer_desc.efa_addr.empty()) { +@@ -157,6 +173,7 @@ void EfaEndPoint::disconnect() { + } + + void EfaEndPoint::disconnectUnlocked() { ++ ++generation_; + if (peer_fi_addr_ != FI_ADDR_UNSPEC) { + context_.removePeerAddr(peer_fi_addr_); + peer_fi_addr_ = FI_ADDR_UNSPEC; +@@ -167,6 +184,7 @@ void EfaEndPoint::disconnectUnlocked() { + + void EfaEndPoint::markDetachedForTeardown() { + RWSpinlock::WriteGuard guard(lock_); ++ ++generation_; + peer_fi_addr_ = FI_ADDR_UNSPEC; + cached_peer_addr_.clear(); + status_.store(UNCONNECTED, std::memory_order_release); +-- +2.50.1 (Apple Git-155) + diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-loopback-stream.patch b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-loopback-stream.patch new file mode 100644 index 0000000000..be8ee56eb1 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/mooncake-efa-loopback-stream.patch @@ -0,0 +1,46 @@ +diff --git a/mooncake-transfer-engine/src/transport/efa_transport/efa_context.cpp b/mooncake-transfer-engine/src/transport/efa_transport/efa_context.cpp +index fd323c23..b950526d 100644 +--- a/mooncake-transfer-engine/src/transport/efa_transport/efa_context.cpp ++++ b/mooncake-transfer-engine/src/transport/efa_transport/efa_context.cpp +@@ -815,6 +815,27 @@ void EfaContext::removePeerAddr(fi_addr_t fi_addr) { + } + } + ++#if defined(USE_CUDA) ++// Per-thread, per-device non-blocking stream for loopback copies. The legacy ++// default stream implicitly orders against every blocking stream on the ++// device, so a synchronous cudaMemcpy + cudaStreamSynchronize(0) here can wait ++// on unrelated work (e.g. a collective that needs other ranks to launch) while ++// holding the context lock those ranks' launches need. The stream is created ++// in, and only used with, the device's primary context. ++static cudaStream_t loopbackStream(int device, cudaError_t& rc) { ++ thread_local std::unordered_map streams; ++ auto it = streams.find(device); ++ if (it != streams.end()) { ++ rc = cudaSuccess; ++ return it->second; ++ } ++ cudaStream_t stream = nullptr; ++ rc = cudaStreamCreateWithFlags(&stream, cudaStreamNonBlocking); ++ if (rc == cudaSuccess) streams.emplace(device, stream); ++ return stream; ++} ++#endif ++ + bool EfaContext::tryLoopbackCopy(Transport::Slice* slice) { + // Only intra-process self-transfers qualify. We compare the SERVER name + // (host:rpc_port), NOT the full nic path: local_server_name embeds this +@@ -883,8 +904,11 @@ bool EfaContext::tryLoopbackCopy(Transport::Slice* slice) { + return true; + } + +- cudaError_t rc = cudaMemcpy(dst, src, len, cudaMemcpyDefault); +- if (rc == cudaSuccess) rc = cudaStreamSynchronize(0); ++ cudaError_t rc; ++ cudaStream_t stream = loopbackStream(device, rc); ++ if (rc == cudaSuccess) ++ rc = cudaMemcpyAsync(dst, src, len, cudaMemcpyDefault, stream); ++ if (rc == cudaSuccess) rc = cudaStreamSynchronize(stream); + context.restore(); + if (rc != cudaSuccess) { + LOG(ERROR) << "EFA loopback CUDA copy failed: " diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 9623470eb5..f2ee6a8510 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -113,6 +113,10 @@ base: # off by two: GPU 0 could never transfer (AddressNotRegistered, 0% store # hits) and other GPUs posted through a neighbouring GPU's NICs. MC_MS_FILTERS: "rdmap86s0,rdmap87s0,rdmap101s0,rdmap102s0,rdmap116s0,rdmap117s0,rdmap131s0,rdmap132s0,rdmap146s0,rdmap147s0,rdmap161s0,rdmap162s0,rdmap176s0,rdmap177s0,rdmap191s0,rdmap192s0" + # Route same-node EFA peers through the EFA device instead of libfabric's + # shm provider, which would run CUDA IPC copies on Mooncake's device-less + # CQ poller thread in a GPU-0 context. + FI_EFA_ENABLE_SHM_TRANSFER: "0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" VLLM_SERVER_DEV_MODE: "1" @@ -146,6 +150,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true + # With async scheduling, prefill TP0 blocks in kernel launch on an idle + # GPU 0 under Mooncake EFA traffic and the engine stops serving. + no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -177,6 +184,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true + # With async scheduling, prefill TP0 blocks in kernel launch on an idle + # GPU 0 under Mooncake EFA traffic and the engine stops serving. + no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index f60634d827..8e54a33f15 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10498,5 +10498,5 @@ - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated configurations." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, NIXL LIBFABRIC plugin rebuilt against the installed libfabric, shm transfer and async scheduling disabled." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From b935282fe7ebf4bcce1e72ae88bbf39ea5a9e46c Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Thu, 22 Oct 2026 11:24:30 -0400 Subject: [PATCH 30/33] Kimi K3 B300 EFA: disable custom allreduce, drop changes that did not 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 --- .../configs/kimik3-b300-efa-setup.sh | 45 ------------------- .../vllm/b300-fp4/agentx/disagg-variants.yaml | 16 +++---- inferencex-e2e/docs/waiver/4304.md | 13 +++++- inferencex-e2e/perf-changelog.yaml | 2 +- 4 files changed, 20 insertions(+), 56 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh index 62fd470db4..e6c47ecd5f 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -4,21 +4,6 @@ set -eo pipefail source /infmax-workspace/benchmarks/check_env.sh check_env_vars KIMI_EFA_BUILD_CACHE LD_LIBRARY_PATH -# An EFA device that has failed memory registrations stays degraded until the -# host reboots, and heavy RDMA on it freezes the host. Refuse such a node here -# instead of letting a worker take it down. -reg_mr_errors=0 -for counter in /sys/class/infiniband/*/hw_counters/reg_mr_err \ - /sys/class/infiniband/*/ports/*/hw_counters/reg_mr_err; do - [ -r "$counter" ] || continue - reg_mr_errors=$((reg_mr_errors + $(cat "$counter"))) -done -if [ "$reg_mr_errors" -gt 0 ]; then - echo "EFA devices on $(hostname) report $reg_mr_errors failed memory registrations since boot;" \ - "reboot the node before running EFA workloads on it." >&2 - exit 1 -fi - export DEBIAN_FRONTEND=noninteractive # The NVIDIA CUDA apt mirror is intermittently mid-sync (index size mismatch); # retry instead of failing the whole worker setup. @@ -115,36 +100,6 @@ fi tar -xzf "$cache/libfabric.tar.gz" -C / ldconfig -# NIXL's wheel ships a LIBFABRIC plugin compiled against libfabric 1.x headers -# but loads the libfabric 2.6 above at runtime. Rebuild just that plugin from -# the same NIXL release against these headers and drop it into the wheel. -nixl_cache="$KIMI_EFA_BUILD_CACHE/nixl-1683cf3b-lf-e83bf01a-v1" -mkdir -p "$nixl_cache" -exec 8>"$nixl_cache/build.lock" -flock 8 -if [ ! -f "$nixl_cache/ready" ]; then - apt-get install -y -qq libhwloc-dev - python3 -m pip install --no-cache-dir 'meson==1.9.1' 'ninja==1.13.0' 'pybind11[global]==3.1.0' - git clone https://github.com/ai-dynamo/nixl.git "$task_dir/nixl" - git -C "$task_dir/nixl" checkout --detach 1683cf3b7f3d11674c03c5e861cea22339876c96 - ( - cd "$task_dir/nixl" - meson setup build --buildtype=release -Dlibfabric_path=/opt/amazon/efa \ - -Denable_plugins=LIBFABRIC -Dbuild_tests=false -Dbuild_examples=false \ - -Dinstall_headers=false -Dwith_trace=false -Dnixl_cuda_arch_list=100 \ - -Dcudapath_inc=/usr/local/cuda/include -Dcudapath_lib=/usr/local/cuda/lib64 - ninja -C build src/plugins/libfabric/libplugin_LIBFABRIC.so - patchelf --set-rpath '$ORIGIN/..:$ORIGIN/../../nixl_cu13.libs' \ - build/src/plugins/libfabric/libplugin_LIBFABRIC.so - ) - cp "$task_dir/nixl/build/src/plugins/libfabric/libplugin_LIBFABRIC.so" "$nixl_cache/" - touch "$nixl_cache/ready" -fi -nixl_plugins="$vllm_site_packages/.nixl_cu13.mesonpy.libs/plugins" -cp "$nixl_cache/libplugin_LIBFABRIC.so" "$nixl_plugins/libplugin_LIBFABRIC.so" -flock -u 8 -readelf -V "$nixl_plugins/libplugin_LIBFABRIC.so" | grep -q FABRIC_1.9 - python3 -m pip uninstall -y \ mooncake-transfer-engine mooncake-transfer-engine-cuda13 mooncake-transfer-engine-efa-cuda13 python3 -m pip install --no-deps "$cache/"*.whl diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 8fc25fef70..e98a29def7 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -114,8 +114,8 @@ base: # hits) and other GPUs posted through a neighbouring GPU's NICs. MC_MS_FILTERS: "rdmap86s0,rdmap87s0,rdmap101s0,rdmap102s0,rdmap116s0,rdmap117s0,rdmap131s0,rdmap132s0,rdmap146s0,rdmap147s0,rdmap161s0,rdmap162s0,rdmap176s0,rdmap177s0,rdmap191s0,rdmap192s0" # Route same-node EFA peers through the EFA device instead of libfabric's - # shm provider, which would run CUDA IPC copies on Mooncake's device-less - # CQ poller thread in a GPU-0 context. + # shm provider, which runs CUDA IPC copies on Mooncake's device-less CQ + # poller thread in a GPU-0 context. FI_EFA_ENABLE_SHM_TRANSFER: "0" NCCL_MNNVL_ENABLE: "0" NCCL_NVLS_ENABLE: "1" @@ -150,9 +150,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # Diagnostic: async scheduling is off while the EFA prefill hang (TP0 - # blocked in kernel launch on an idle GPU 0) is root-caused. - no-async-scheduling: true + # vLLM's custom all-gather inside CUDA graphs, with async scheduling, + # leaves one prefill GPU idle mid-graph under this workload; use NCCL. + disable-custom-all-reduce: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -184,9 +184,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # Diagnostic: async scheduling is off while the EFA prefill hang (TP0 - # blocked in kernel launch on an idle GPU 0) is root-caused. - no-async-scheduling: true + # vLLM's custom all-gather inside CUDA graphs, with async scheduling, + # leaves one prefill GPU idle mid-graph under this workload; use NCCL. + disable-custom-all-reduce: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 diff --git a/inferencex-e2e/docs/waiver/4304.md b/inferencex-e2e/docs/waiver/4304.md index 123931a0dc..9c4a668ecf 100644 --- a/inferencex-e2e/docs/waiver/4304.md +++ b/inferencex-e2e/docs/waiver/4304.md @@ -46,6 +46,15 @@ acceptance selection. all eight registrations under the same mixed-backing conditions. The patched full-model Dynamo prefill control also reached readiness at unchanged 160 GiB capacity per rank, with all eight mappings fully huge-page-backed. +- Apply `mooncake-efa-handshake-lock.patch`, upstream + [Mooncake #4704](https://github.com/kvcache-ai/Mooncake/pull/4704) without its + tests: do not hold the EFA endpoint lock across the handshake RPC. Two ranks + setting up connections to each other otherwise deadlock (AB-BA). +- Apply `mooncake-efa-loopback-stream.patch`: run Mooncake's same-process + loopback copies on a private non-blocking stream instead of a synchronous + legacy-stream `cudaMemcpy`, which waited behind concurrent collectives while + holding the CUDA context lock other ranks needed to launch them. The rebuilt + wheel is identified as `0.3.13.post1+gc3fa13ec.collapse1.hs1.lb1`. - Set `NIXL_DISABLE_CUDA_ADDR_WA=1` for NIXL 1.5's existing device-context fallback. CUDA VMM allocations do not provide the owning context expected by its pointer-address workaround. This is configuration, not a NIXL patch. @@ -61,7 +70,7 @@ Drop the vLLM opt-out patch when the pinned image exposes a supported way to disable NVLink-only latent-tail fusion or automatically selects its unfused path on unsupported topologies. Drop the libfabric patch once the EFA installer ships the three upstream changes. Replace the Mooncake source build with an -official EFA CUDA 13 wheel once it includes #4393 and the host-chunk collapse -fix. Remove the NIXL environment override when its VMM context handling supports +official EFA CUDA 13 wheel once it includes #4393, #4704, the host-chunk +collapse fix and the loopback-stream fix. Remove the NIXL environment override when its VMM context handling supports the default path. Retain only the EFA userspace installation if it is still absent from the pinned upstream image. diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 5c96c9b21b..a43b1eaafb 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10735,5 +10735,5 @@ - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, NIXL LIBFABRIC plugin rebuilt against the installed libfabric, shm transfer disabled, and async scheduling disabled as a diagnostic for the EFA prefill hang." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and vLLM custom allreduce disabled (its CUDA-graph all-gather stalls a prefill GPU with async scheduling)." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From 504eb5ee9a3cc9336bcd258eb6903eea24772603 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Thu, 22 Oct 2026 13:16:59 -0400 Subject: [PATCH 31/33] Kimi K3 B300 EFA: disable async scheduling instead of custom allreduce 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 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 12 ++++++------ inferencex-e2e/perf-changelog.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index e98a29def7..502bec4722 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -150,9 +150,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # vLLM's custom all-gather inside CUDA graphs, with async scheduling, - # leaves one prefill GPU idle mid-graph under this workload; use NCCL. - disable-custom-all-reduce: true + # With async scheduling, one prefill GPU stops mid-CUDA-graph under this + # Mooncake EFA workload while its peers spin; run synchronously. + no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -184,9 +184,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # vLLM's custom all-gather inside CUDA graphs, with async scheduling, - # leaves one prefill GPU idle mid-graph under this workload; use NCCL. - disable-custom-all-reduce: true + # With async scheduling, one prefill GPU stops mid-CUDA-graph under this + # Mooncake EFA workload while its peers spin; run synchronously. + no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 0ec104da23..6b2969da46 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10813,5 +10813,5 @@ - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and vLLM custom allreduce disabled (its CUDA-graph all-gather stalls a prefill GPU with async scheduling)." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and vLLM async scheduling disabled (with it, a prefill GPU stalls mid-CUDA-graph under this workload)." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From b40249a6dc8c5ba174e0d9efd54d9ac1acbfabde Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Thu, 22 Oct 2026 14:36:24 -0400 Subject: [PATCH 32/33] Kimi K3 B300 EFA: drop async-scheduling workaround; turn off prefill 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 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 7 ------- inferencex-e2e/perf-changelog.yaml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 502bec4722..75154c6e06 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -150,9 +150,6 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # With async scheduling, one prefill GPU stops mid-CUDA-graph under this - # Mooncake EFA workload while its peers spin; run synchronously. - no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -164,7 +161,6 @@ base: moe-backend: deep_gemm_mega_moe max-num-seqs: 64 speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' - kv_events: true decode: nodes: 1 workers: 1 @@ -184,9 +180,6 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true - # With async scheduling, one prefill GPU stops mid-CUDA-graph under this - # Mooncake EFA workload while its peers spin; run synchronously. - no-async-scheduling: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 6b2969da46..e4890d63f3 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10813,5 +10813,5 @@ - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and vLLM async scheduling disabled (with it, a prefill GPU stalls mid-CUDA-graph under this workload)." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and prefill KV-cache events off." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304 From eb928ae6939666f2c2f33e7a3bde88b002a8a7d5 Mon Sep 17 00:00:00 2001 From: wzhao18 Date: Sun, 25 Oct 2026 15:07:25 -0400 Subject: [PATCH 33/33] Kimi K3 B300 EFA: run prefill in eager mode; restore prefill KV events 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 --- .../kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml | 4 ++++ inferencex-e2e/perf-changelog.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml index 75154c6e06..032b3523a5 100644 --- a/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -150,6 +150,9 @@ base: decode-context-parallel-size: 8 dcp-comm-backend: "a2a" no-enable-flashinfer-autotune: true + # A prefill GPU stops mid-CUDA-graph under this Mooncake EFA workload + # while its TP peers spin; run prefill without CUDA graphs. + enforce-eager: true trust-remote-code: true max-cudagraph-capture-size: 512 stream-interval: 10 @@ -161,6 +164,7 @@ base: moe-backend: deep_gemm_mega_moe max-num-seqs: 64 speculative-config: '{"model":"Inferact/Kimi-K3-DSpark","attention_backend":"TOKENSPEED_MLA","method":"dspark","num_speculative_tokens":4,"draft_sample_method":"probabilistic","rejection_sample_method":"block"}' + kv_events: true decode: nodes: 1 workers: 1 diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 5779db8399..3c83de046f 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -10848,5 +10848,5 @@ - agentic-coding no-evals: true description: - - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and prefill KV-cache events off." + - "Add B300 Kimi K3 DSpark DCP disaggregated configurations on the EFA cluster: Mooncake with the EFA handshake-lock and loopback-stream fixes, libfabric shm transfer disabled, and prefill in eager mode (a prefill GPU stalls mid-CUDA-graph under this workload)." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304