Repository navigation
Commit 8a428bf
[AMD][AgentX] dsv4-fp4-mi355x-vllm-agentic-mtp: enable the DEP8 arm, fix gpu-mem-util, add opt-in RoPE+KV fusion
Builds on #2381 (amd/agentx_dsv4_vllm_mtp_0728).
Enable DEP8 (DP-attention + EP8)
--------------------------------
The entry comment ("Sweeps DP-attention on/off and EP=8") and the script
header (DEP = DP_ATTENTION=true, EP_SIZE>1) both describe this arm, and
the script already implements it: EP_SIZE>1 appends
--enable-expert-parallel and --enable-ep-weight-filter, DP_ATTENTION=true
swaps to --tensor-parallel-size 1 --data-parallel-size TP plus the DEP8
prefill budget. But every search-space row was ep:1/dp-attn:false, so
neither branch was ever taken. Adds a row that does:
{ tp: 8, ep: 8, dp-attn: true, kv-offloading: none,
conc-list: [32, 48, 64], router: vllm-router 0.1.14 }
The existing pure-TP row is kept as the comparison baseline -- it is the
configuration the MI355X agentic profile was captured on.
Motivation from that 200-step trace (TP8/DP1/EP-off):
* MoE GEMMs are latency-bound at small per-rank batch and scale
super-linearly with it -- mfma_moe1 x2.16 and mfma_moe2 x2.78 going
from 16 to 28 decode tokens/step, across 1643 ms of kernel time
(20.6%). DP-attention raises per-rank batch and should convert
directly.
* cross_device_reduce_2stage costs 577.8 ms (7.2%; 368.7 ms in decode)
as the per-layer MoE allreduce that EP replaces with all2all.
The second effect is the one that needs measuring rather than
extrapolating: all2all on MI355X is many small messages and may not beat
the fused allreduce. That is why this is a benchmark arm.
conc starts at 32 because --max-num-seqs is applied PER DP rank under
DP-attention; at conc 8 across 8 ranks most ranks sit empty and DEP is
strictly worse than pure TP. The router is required, not optional -- it
expands the single HTTP backend into one logical worker per DP rank and
stamps X-data-parallel-rank on forwarded requests. Both commented-out
DPA arms already carried it.
Fix --gpu-memory-utilization
----------------------------
Was a flat 0.90; now 0.86 for kv-offloading:none, 0.90 only when
offloading is on. The comment block above the assignment derives 0.86 in
detail (0.95 requests 273.6 GiB and every DP worker hard-fails against
the ~256 GiB free-at-init ceiling from the MI355X ~32 GiB/GPU carveout;
0.85 leaves ~23.9 GiB KV, below the 24.06 GiB one 1M-context request
needs once the MTP draft layer's KV is counted) and then the assignment
used 0.90 anyway, for mooncake headroom. Both mooncake and lmcache arms
are commented out, so every active arm is GPU-resident and 0.90
(259.2 GiB) sits above the documented hard-fail ceiling. The DRAM value
is preserved behind a KV_OFFLOADING check.
Opt-in ROCm RoPE + KV-cache fusion (ROCM_ROPE_KVCACHE_FUSION=1)
---------------------------------------------------------------
vLLM's O3 defaults enable fuse_rope_kvcache / fuse_rope_kvcache_cat_mla
on ROCm, but both land disabled in this recipe. The gate is
splitting_ops, not the custom-op list: with splitting_ops unset,
set_splitting_ops_for_v1 populates it from _attention_ops (appending
unified_kv_cache_update / unified_mla_kv_cache_update) and then
explicitly disables fuse_rope_kvcache with "splitting_ops is None and
Inductor graph partition is not enabled". The profiled server log shows
exactly that populated list, confirming the fusion never ran.
Passing an explicit empty splitting_ops is the escape hatch the warning
itself names. FULL_DECODE_ONLY is unaffected: the empty-list downgrade
branch only rewrites PIECEWISE and FULL_AND_PIECEWISE.
Trace evidence for the payoff (194 decode steps):
_inverse_rope_gptj_kernel 78.6 ms n=12800 6.14 us
fusedDeepseekV4QNormRopeKVRopeQuantInsert 80.3 ms n=12800 6.27 us
_finalize_norm_rope_quant_store 31.8 ms n=6200 5.14 us
All three sit on the ~4 us MI355X dispatch floor, so most of that time
is launch overhead rather than work. rope_kvcache_fusion_max_token_num
defaults to 256 and decode steps verify 16-28 tokens, so decode stays in
range. Left off by default: it changes the compiled graph structure and
needs its own accuracy gate before becoming the baseline.
Verification
------------
bash -n on the script; yaml.safe_load on both YAML files; and a harness
simulation of the arg-construction logic confirming all four
(dp-attn, ep, kv-offloading, fusion) combinations emit the intended
flags. Not yet run on hardware.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 6450c4d commit 8a428bf
3 files changed
Lines changed: 78 additions & 5 deletions
File tree
- benchmarks/single_node/agentic
- configs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
415 | 447 | | |
416 | 448 | | |
417 | 449 | | |
| |||
442 | 474 | | |
443 | 475 | | |
444 | 476 | | |
445 | | - | |
446 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
447 | 488 | | |
448 | 489 | | |
449 | 490 | | |
| |||
472 | 513 | | |
473 | 514 | | |
474 | 515 | | |
475 | | - | |
| 516 | + | |
476 | 517 | | |
477 | 518 | | |
478 | 519 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1550 | 1550 | | |
1551 | 1551 | | |
1552 | 1552 | | |
1553 | | - | |
1554 | | - | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
1555 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
1556 | 1578 | | |
1557 | 1579 | | |
1558 | 1580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5364 | 5364 | | |
5365 | 5365 | | |
5366 | 5366 | | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
0 commit comments