Skip to content

test(ep): add configurable CLI knobs to dispatch/combine benchmark#459

Open
amd-arozanov wants to merge 5 commits into
ROCm:mainfrom
amd-arozanov:feat/bench-dispatch-combine-knobs
Open

test(ep): add configurable CLI knobs to dispatch/combine benchmark#459
amd-arozanov wants to merge 5 commits into
ROCm:mainfrom
amd-arozanov:feat/bench-dispatch-combine-knobs

Conversation

@amd-arozanov

Copy link
Copy Markdown

Motivation

The dispatch/combine benchmark script only supported a fixed set of scenarios. This makes it hard to explore different kernel implementations, routing patterns, or tune benchmark timing without editing the script. This PR adds CLI flags to cover these cases.

Technical Details

Adds the following flags to --cmd bench (all optional, defaulting to prior behavior):

  • --warmup / --iters – number of warmup and timing iteration.
  • --routing – select the token-to-expert routing pattern; adds a new remote_round_robin pattern that always routes to a remote rank.
  • --kernel-type – select the dispatch/combine kernel implementation
  • --verify – skip the host-side correctness check during warmup.
  • --graph-replay-iters – control how many times each captured CUDA graph is replayed per timed sample.

Test Plan

Run bench_dispatch_combine.py with new command line options

Test Result

bench_dispatch_combine.py works, default values were not changed, new command line arguments work as expected

Submission Checklist

Expose the previously hardcoded warmup/iteration counts as CLI flags
for --cmd bench and --cmd profile, defaulting to None so each command
keeps its existing default when the flag is unset.
Let --cmd bench skip the expensive host-side correctness check during
warmup when only performance numbers are needed (default: 1, same as before).
Let --cmd bench pick a routing pattern via --routing (default: random,
same as before), including a new remote_round_robin pattern that always
routes tokens to a remote rank.
Adds a --kernel-type CLI flag to select the dispatch/combine kernel
implementation to benchmark (IntraNode, IntraNodeLL, InterNode,
InterNodeV1, InterNodeV1LL, AsyncLL), threaded through
bench_dispatch_combine() and _bench_dispatch_combine() into
EpDispatchCombineConfig. Defaults to "IntraNode", matching the
existing EpDispatchCombineConfig default, so legacy behavior is
unchanged when the flag is omitted.
Adds a --graph-replay-iters CLI flag controlling how many times each
captured CUDA graph is replayed per --iters sample in run() (bench
command only), to amortize host-side timing overhead. Defaults to
None/unset so the existing hardcoded default of 10 is preserved when
the flag is omitted.
@jhchouuu jhchouuu requested a review from QizhouZhang97 July 13, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant