Skip the dispatch clock unless a slow dispatch is being logged #308

Merged
SkippySteve merged 1 commit from fix/dispatch-clock into main 2026-11-07 20:18:24 +00:00
SkippySteve commented 2026-11-07 20:06:33 +00:00 (Migrated from github.com)

Summary

  • Every compute dispatch built a DispatchClock that read steady_clock at the start, after the program lookup, after the pipeline, and after the descriptors, then again in the destructor. The log prints at most 60 lines, and only when a dispatch takes 2 ms.
  • Those reads now happen only while RX_VK_SLOW_DISPATCH is set. Wait and pipeline-compile timings that feed the frame statistics are unchanged.

Test plan

  • python -I -B tests/test_dispatch_clock.py passes
  • Removing the destructor guard and the constructor's gate makes the test fail
  • CI: "Check dispatch timing stays off"
## Summary - Every compute dispatch built a `DispatchClock` that read `steady_clock` at the start, after the program lookup, after the pipeline, and after the descriptors, then again in the destructor. The log prints at most 60 lines, and only when a dispatch takes 2 ms. - Those reads now happen only while `RX_VK_SLOW_DISPATCH` is set. Wait and pipeline-compile timings that feed the frame statistics are unchanged. ## Test plan - [x] `python -I -B tests/test_dispatch_clock.py` passes - [x] Removing the destructor guard and the constructor's gate makes the test fail - [ ] CI: "Check dispatch timing stays off"
Commenting is not possible because the repository is archived.
No description provided.