Skip to content

perf(dpa): add session-aware routing and post-prefill decode protection - #2016

Open
yhl-amd wants to merge 4 commits into
ROCm:mainfrom
yhl-amd:perf/dpa-agentic-session-scheduling
Open

perf(dpa): add session-aware routing and post-prefill decode protection#2016
yhl-amd wants to merge 4 commits into
ROCm:mainfrom
yhl-amd:perf/dpa-agentic-session-scheduling

Conversation

@yhl-amd

@yhl-amd yhl-amd commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • propagate X-Dynamo-Session-ID / X-Correlation-ID through the OpenAI path and load-place new DPA sessions using estimated uncached prefill tokens plus request-equivalent decode pressure
  • keep established sessions on an immutable cache owner so later agent turns preserve prefix-cache locality; child correlation IDs are placed independently
  • add an opt-in post-prefill decode interval, synchronized across DPA ranks through the existing delayer reduction
  • arm the interval only after a prefill forward actually completes, rather than when the delayer merely permits admission
  • expose routing counters/gauges and document the new controls and production defaults

Enablement

export ATOM_DP_SESSION_AFFINITY=1
export ATOM_DP_LB_REQ_EQUIV=512
export ATOM_ENABLE_PREFILL_DELAYER=1
export ATOM_PREFILL_DECODE_INTERVAL=10

# server
--dp-load-balance least_tokens

All new behavior is opt-in: session affinity defaults to off and the post-prefill decode interval defaults to 0. Existing sessions never migrate.

Benchmark evidence

On the 3600-second DPA8 agentic comparison, the combined routing + PDI configuration measured:

  • input throughput: +0.05% (neutral)
  • mean TTFT: -4.15%
  • p50 TTFT: -3.10%
  • mean ITL: -1.16%
  • p50 ITL: -0.23%

That run also included the dense low-batch-size CUDA Graph change, so the result is evidence for the combined configuration and is not presented as isolated PDI attribution.

A separate 600-second replay-cost migration experiment reduced input throughput by 0.71%, cache read by 0.94 pp, and actual prefix hits by roughly 2.04 pp. This PR therefore keeps established session ownership strict and excludes migration.

The prior +4.47% DPA result depended on a separate device-synchronization change and is intentionally not claimed here.

Validation

  • 69 passed, 1 skipped: DP routing, API header propagation, prefill delayer, and partial-prefill-tail tests
  • 33 passed: sequence and prefill scheduler tests
  • Black check passed on changed Python files
  • Ruff passed on changed Python files
  • compileall and git diff --check passed

Scope notes

This PR intentionally excludes device synchronization, session migration, LMCache/offload, MegaMoE fixed-slot transport, and independent-replica experiments.

InferenceX currently reports Unsupported agentic server metrics backend for ATOM metrics during final aggregation. Raw AIPerf JSON/CSV export completes successfully; aggregator support is outside this ATOM change.

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Run after the PR is approved and Pre Checkin passes
  • ✅ Run immediately when an approval review is submitted
  • ✅ Can be requested before approval with labels
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, and SGLang
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests

Heavy jobs are skipped when the PR is not approved and no matching ci:* label is present.
Add labels via the sidebar or gh pr edit 2016 --add-label <label>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants