Raman-Raje opened a new pull request, #20471:
URL: https://github.com/apache/tvm/pull/20471
## Motivation
The Vulkan backend has no device-specific `Timer` implementation, so
profiling
falls back to the default CPU wall-clock timer. That timer measures host-side
submission and synchronization, not actual GPU execution, so profiling
results
on Vulkan devices are inaccurate.
## Changes
- Add `VulkanTimerNode` (`vulkan_timer.h` / `vulkan_timer.cc`), which
measures GPU
execution time using Vulkan timestamp queries (`vkCmdWriteTimestamp`)
recorded
on the device's compute stream.
- Store `timestampPeriod` and the compute queue family's
`timestampValidBits` in
`VulkanDeviceProperties`. They are used to convert ticks to nanoseconds
and to
mask invalid upper bits of the timestamp values.
- Check at timer construction that the compute queue supports timestamp
queries
(`timestampValidBits > 0`) and fail with a clear error if it does not.
- Register the Vulkan timer factory so `Timer::Start(dev)` picks it up
automatically for Vulkan devices.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]