Skip to content

Fix host dispatch benchmark timing window - #923

Closed
jhinpan wants to merge 1 commit into
ROCm:mainfrom
jhinpan:fix/dispatch-benchmark-timing
Closed

Fix host dispatch benchmark timing window#923
jhinpan wants to merge 1 commit into
ROCm:mainfrom
jhinpan:fix/dispatch-benchmark-timing

Conversation

@jhinpan

@jhinpan jhinpan commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move the final GPU drain outside bench_wallclock's measured interval so it measures host dispatch as documented
  • add a deterministic regression test that locks the synchronization/timestamp ordering
  • keep the change intentionally narrow; the broader timing-contract and CI analysis is documented in the supporting Gist

Why

The previous implementation sampled the end timestamp after torch.cuda.synchronize(). For GPU-bound workloads that turns the metric into roughly max(host submit, GPU throughput) rather than CPU dispatch overhead, contradicting the function's docstring and making results workload-size dependent.

Test plan

  • python3 -m pytest tests/unit/test_launch_overhead.py -q
  • python3 -m ruff check tests/unit/test_launch_overhead.py

Move the final synchronization outside the measured window so the benchmark matches its documented host-dispatch semantics, and lock the ordering with a regression test.
Copilot AI review requested due to automatic review settings July 29, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jhinpan

jhinpan commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #924, which carries this validated host-dispatch fix and implements the full timing-contract, event-timer cleanup, raw-us schema, verified graph benchmark, and calibrated CI gate.

@jhinpan jhinpan closed this Jul 30, 2026
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.

2 participants