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 new file mode 100644 index 0000000000..e6c47ecd5f --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/configs/kimik3-b300-efa-setup.sh @@ -0,0 +1,145 @@ +#!/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 +# 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 \ + 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 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 \ + -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-collapse-hs-lb-v1" +mkdir -p "$cache" +exec 9>"$cache/build.lock" +flock 9 +if [ ! -f "$cache/ready" ]; then + 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" + ( + 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" 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" + 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 \ + -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 build_nvlink_allocator + 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 + ) + 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 + +# 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' +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.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/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/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/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/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..240a09e416 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/agg-megakernel-variants.yaml @@ -0,0 +1,115 @@ +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: + # 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: + 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 + 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' + 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 + 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..032b3523a5 --- /dev/null +++ b/inferencex-e2e/benchmarks/multi_node/srt-slurm-recipes/kimik3/vllm/b300-fp4/agentx/disagg-variants.yaml @@ -0,0 +1,403 @@ +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" + # 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" + # 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" + # Route same-node EFA peers through the EFA device instead of libfabric's + # 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" + 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 + # 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 + 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 + 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: + # 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: + 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 16118ca8b9..04ba8f8fa0 100644 --- a/inferencex-e2e/configs/nvidia-master.yaml +++ b/inferencex-e2e/configs/nvidia-master.yaml @@ -10243,6 +10243,204 @@ 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 + + +# 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 # Kimi-K3 GB200 disaggregated points: one # TP16/DCP16 prefill role and one TP16/DCP16 decode role, four 4-GPU nodes each diff --git a/inferencex-e2e/configs/runners.yaml b/inferencex-e2e/configs/runners.yaml index 9243e6eda5..bb11b0c053 100644 --- a/inferencex-e2e/configs/runners.yaml +++ b/inferencex-e2e/configs/runners.yaml @@ -543,7 +543,13 @@ clusters: partition: batch_1 account: benchmark exclusive: true - exclude: [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] @@ -570,6 +576,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/docs/waiver/4304.md b/inferencex-e2e/docs/waiver/4304.md new file mode 100644 index 0000000000..9c4a668ecf --- /dev/null +++ b/inferencex-e2e/docs/waiver/4304.md @@ -0,0 +1,76 @@ +# 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 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. +- 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.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. +- 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. + +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 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, #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/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 e12be1756f..2e7c6d0bf4 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 diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 9524a19f4c..384fba703b 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -11197,3 +11197,12 @@ - "Balanced TP4 at conc 64 with L2 HiCache (write_back, hicache-size 180 GB per rank), and the scheduler and decode graph batch at 128." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4499 scenario-type: [agentic-coding] + +- config-keys: + - kimik3-fp4-b300-dynamo-vllm-agentic-dspark-mooncake-dcp8-disagg + scenario-type: + - 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 in eager mode (a prefill GPU stalls mid-CUDA-graph under this workload)." + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4304