ROCm / roctracer

ROCm Tracer Callback/Activity Library for Performance tracing AMD GPUs
https://rocm.docs.amd.com/projects/roctracer/en/latest/
Other
69 stars 30 forks source link

No deviceId for `hipDeviceSynchronize` record #77

Closed bertwesarg closed 1 week ago

bertwesarg commented 2 years ago

The device_id field of an HIP_API_ID_hipDeviceSynchronize record (roctracer_record_t) does not yield a valid device. It seems random/uninitialized.

I'm currently using the correlation ID to correlate the device at host time with the activity record. Is this the intended way?

ppanchad-amd commented 1 month ago

@bertwesarg Apologies for the lack of response. Can you please check with the latest ROCm 6.2? If your issue is resolved, please close the ticket. Thanks!

schung-amd commented 1 week ago

Hi @bertwesarg, sorry for the delay. hipDeviceSynchronize is a HIP API call which does work on the CPU, as the current thread is told to wait until the GPU is finished. roctracer therefore records the process/thread ID of the associated CPU work and not the device/queue ID. As these fields are stored in a union (https://rocm.docs.amd.com/projects/roctracer/en/docs-6.0.0/roctracer_spec.html#activity-api), you are still able to query this field as device_id, but the stored data is the process_id.

bertwesarg commented 1 week ago

@all As roctracer will be replaced with rocprofiler SDK, I don't see a reason to continue here, do you?

schung-amd commented 1 week ago

Yes, while my comment is still relevant for roctracer usage, if you're happy with moving forward to rocprofv3 when it is released we can certainly close this out. Thanks for the reply!