Skip to content

Commit f7d2b0e

Browse files
seungrokjclaude
andcommitted
perf(amd): Kimi-K3.1 MI355X vLLM agentic: 898 GB CPU offload, mbt 8192, capture cap 8192
Shrink the Simple CPU offload pool to 2700 blocks per TP rank (cpu_bytes_to_use_per_rank 112251571200, dram-utilization 0.2994 -> 898 GB) to cut the per-GPU VRAM the pinned pool's page tables take, keep THP_MEM_ALLOC_ENABLE=1, and lower max-num-batched-tokens and the cudagraph capture cap to 8192 at conc 4-48. Conc 1 is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 740ee08 commit f7d2b0e

3 files changed

Lines changed: 32 additions & 20 deletions

File tree

‎inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/kimik3.1/vllm/mi355x-fp4-mtp/agentic.yaml‎

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,15 @@ base:
4747
attention-config: '{"indexer_kv_dtype":"mxfp4"}'
4848
additional-config: '{"kda_prefill_backend":"fused"}'
4949
# Prefix-cached prefill chunks end on K3.1's 1152-token packed DSA block, so the budget floors to a multiple of 1152.
50-
max-num-batched-tokens: 16384
50+
max-num-batched-tokens: 8192
5151
# Kernel scratch, up to HSA_SCRATCH_SINGLE_LIMIT_ASYNC per dispatch, is allocated outside this budget, so leave headroom.
5252
gpu-memory-utilization: 0.90
5353
stream-interval: 10
5454
disable-uvicorn-access-log: true
55-
# 224.875 GB per rank; TOTAL_CPU_DRAM_GB (1799) split across the 8 TP ranks.
56-
kv-transfer-config: '{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use_per_rank":224875000000,"lazy_offload":false}}'
55+
# 2700 offload blocks of 41,574,656 B per rank (112.25 GB; TOTAL_CPU_DRAM_GB 898 across the
56+
# 8 TP ranks). Pinning the pool costs VRAM for its page tables on every GPU, so it is sized
57+
# to the conc-48 trace's reuse rather than to the host.
58+
kv-transfer-config: '{"kv_connector":"SimpleCPUOffloadConnector","kv_role":"kv_both","kv_connector_extra_config":{"cpu_bytes_to_use_per_rank":112251571200,"lazy_offload":false}}'
5759
env:
5860
VLLM_ROCM_USE_AITER: '1'
5961
VLLM_ROCM_USE_AITER_MOE_SITUV2: '1'
@@ -95,13 +97,15 @@ base:
9597
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: 'vllm:'
9698

9799
# max-num-seqs stays below CONC from c4 to c32, and equals it at c1 and c48. The capture list is
98-
# the decode sizes, multiples of one plus the draft token count, then the prefill ladder.
100+
# the decode sizes, multiples of one plus the draft token count, then the prefill ladder up to
101+
# max-num-batched-tokens (8192 from c4 up).
99102
# Throughput runs replace block rejection with the golden acceptance length.
100103
override_gpu_kv_c1:
101104
roles:
102105
agg:
103106
args:
104107
max-num-seqs: 1
108+
max-num-batched-tokens: 16384
105109
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":16,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[2,4,6,8,10,12,14,16]}'
106110
additional-config: '{"decode_backend":"latency_specialized","kda_prefill_backend":"fused"}'
107111
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":7,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
@@ -119,80 +123,80 @@ override_dram_c4:
119123
agg:
120124
args:
121125
max-num-seqs: 2
122-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":16384,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[6,12,16,24,32,48,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240,12288,14336,16384]}'
126+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[6,12,16,24,32,48,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
123127
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":5,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
124128
benchmark:
125129
env:
126130
CONC: '4'
127131
KV_OFFLOADING: 'dram'
128-
TOTAL_CPU_DRAM_GB: '1799'
132+
TOTAL_CPU_DRAM_GB: '898'
129133

130134
override_dram_c10:
131135
roles:
132136
agg:
133137
args:
134138
max-num-seqs: 6
135-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":16384,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[6,12,18,24,30,36,48,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240,12288,14336,16384]}'
139+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[6,12,18,24,30,36,48,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
136140
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":5,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
137141
benchmark:
138142
env:
139143
CONC: '10'
140144
KV_OFFLOADING: 'dram'
141-
TOTAL_CPU_DRAM_GB: '1799'
145+
TOTAL_CPU_DRAM_GB: '898'
142146

143147
override_dram_c16:
144148
roles:
145149
agg:
146150
args:
147151
max-num-seqs: 10
148-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":16384,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240,12288,14336,16384]}'
152+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,64,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
149153
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":4,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
150154
benchmark:
151155
env:
152156
CONC: '16'
153157
KV_OFFLOADING: 'dram'
154-
TOTAL_CPU_DRAM_GB: '1799'
158+
TOTAL_CPU_DRAM_GB: '898'
155159

156160
override_dram_c24:
157161
roles:
158162
agg:
159163
args:
160164
max-num-seqs: 16
161-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":16384,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240,12288,14336,16384]}'
165+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
162166
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":4,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
163167
benchmark:
164168
env:
165169
CONC: '24'
166170
KV_OFFLOADING: 'dram'
167-
TOTAL_CPU_DRAM_GB: '1799'
171+
TOTAL_CPU_DRAM_GB: '898'
168172

169173
override_dram_c32:
170174
roles:
171175
agg:
172176
args:
173177
max-num-seqs: 24
174-
max-num-batched-tokens: 10240
178+
max-num-batched-tokens: 8192
175179
gpu-memory-utilization: 0.91
176-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":10240,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240]}'
180+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,128,160,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
177181
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":3,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
178182
benchmark:
179183
env:
180184
CONC: '32'
181185
KV_OFFLOADING: 'dram'
182-
TOTAL_CPU_DRAM_GB: '1799'
186+
TOTAL_CPU_DRAM_GB: '898'
183187

184188
override_dram_c48:
185189
roles:
186190
agg:
187191
args:
188192
max-num-seqs: 48
189-
max-num-batched-tokens: 10240
193+
max-num-batched-tokens: 8192
190194
gpu-memory-utilization: 0.91
191-
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":10240,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192,8704,10240]}'
195+
compilation-config: '{"mode":3,"cudagraph_mode":"FULL_AND_PIECEWISE","max_cudagraph_capture_size":8192,"custom_ops":["+fused_rms_norm_gated"],"cudagraph_capture_sizes":[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,224,256,288,320,352,384,416,448,480,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096,4608,5120,6144,6400,7168,8192]}'
192196
speculative-config: '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark-preview","num_speculative_tokens":3,"attention_backend":"ROCM_AITER_MLA","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}'
193197
benchmark:
194198
env:
195199
CONC: '48'
196200
KV_OFFLOADING: 'dram'
197-
TOTAL_CPU_DRAM_GB: '1799'
201+
TOTAL_CPU_DRAM_GB: '898'
198202

‎inferencex-e2e/configs/amd-master.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,8 @@ kimik3.1-fp4-mi355x-vllm-agentic-dspark:
937937
srt-recipe-dir: kimik3.1/vllm/mi355x-fp4-mtp
938938
scenarios:
939939
agentic-coding:
940-
# 0.6 resolves to 1799 GB of host DRAM, which the recipe's Simple CPU offload splits across the 8 TP ranks.
941-
- dram-utilization: 0.6
940+
# 0.2994 resolves to 898 GB of host DRAM, the recipe's 2700 Simple CPU offload blocks per TP rank across 8 ranks.
941+
- dram-utilization: 0.2994
942942
search-space:
943943
# The ~1.56 TB MXFP4 checkpoint needs all 8 GPUs. c1 keeps the KV cache on the GPUs.
944944
- { tp: 8, ep: 1, dcp-size: 8, spec-decoding: mtp, kv-offloading: none, conc-list: [1], srt-recipe: agentic.yaml }

‎inferencex-e2e/perf-changelog.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12046,6 +12046,14 @@
1204612046
- "Precision and speculative settings on the day-0 image: block rejection with the published Inferact/Kimi-K3.1-Pro-DSpark-preview draft (throughput points replace it with the golden acceptance length for their token count, 3.21 at conc 1, 3.08 at conc 4-10, 2.92 at conc 16-24 and 2.70 at conc 32-48; evals and AL gates verify for real), FP32 KDA recurrent state, BF16 all-reduce (no INT4 quick reduce, so the AITER AR+RMSNorm fusion keeps every payload), BF16 MoE stage 2 (AITER_FLYDSL_STAGE2_FP8=0, so the lossy MXFP8 path is off at every concurrency), the default MLA prefill backend at every point, and no FP8 indexer override or KDA input-projection quantization."
1204712047
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4806
1204812048

12049+
- config-keys:
12050+
- kimik3.1-fp4-mi355x-vllm-agentic-dspark
12051+
description:
12052+
- "Shrink the Simple CPU offload to 2700 blocks per TP rank, 112,251,571,200 bytes (112.25 GB) per rank and 898 GB across the 8 ranks, via dram-utilization 0.2994. The image registers the pool with cudaHostRegister, which costs VRAM for page tables on every GPU in proportion to its size, so a smaller pool leaves more of each GPU outside the gpu-memory-utilization budget. A replay of the conc-48 trace through a model of the offload puts the loss at about half a point of overall prefix-cache hit rate against the 1799 GB pool; the model is optimistic, and the hit rate falls steeply below about 2150 blocks."
12053+
- "Keep THP_MEM_ALLOC_ENABLE=1 so the pool is backed by transparent huge pages."
12054+
- "Lower max-num-batched-tokens to 8192 and cap the cudagraph capture list at 8192 (max_cudagraph_capture_size 8192) at conc 4-48. Conc 1 keeps max-num-batched-tokens 16384 and its decode-only capture list."
12055+
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4867
12056+
1204912057
- config-keys:
1205012058
- kimik3.1-fp4-mi355x-sglang-agentic-dflash
1205112059
scenario-type:

0 commit comments

Comments
 (0)