Description
Suggestion Description
When correlating timestamps from HSA, GPU agents, and external timing tools (profilers, other non-HSA devices, etc) a simultaneous snapshot of all timestamps is required. Today the only way to get this from user mode is to issue an AMDKFD_IOC_GET_CLOCK_COUNTERS
ioctl in order to get the counters and frequency atomically. Applications that require this need to open their own kfd and maintain it even though ROCR already has one opened, and it feels a bit nasty to do this from top-level code. The ioctl approach will also not be portable to Windows. It'd be nice if there were an HSA API that exposed the same information in a platform-agnostic way and hid the kfd details.
This could be added as a new HSA_AMD_AGENT_INFO_CLOCK_COUNTERS
query that returned the agent/cpu/system clock counters and system clock frequency struct/list - or a dedicated entry point that did it.
This is already wrapped in the kmt with hsaKmtGetClockCounters
.
Operating System
No response
GPU
No response
ROCm Component
No response