ROCm / HIP-CPU

An implementation of HIP that works on CPUs, across OSes.
MIT License
107 stars 19 forks source link

Implement missing function: `hipEventQuery` #55

Open fwyzard opened 6 months ago

fwyzard commented 6 months ago

Would it be possible to implement hipEventQuery ?

According to the current HIP documentation:

hipError_t hipEventQuery(hipEvent_t event)

Query the status of the specified event. This function will return hipSuccess if all commands in the appropriate stream (specified to hipEventRecord()) have completed.

The documentation goes on to say that

If that work has not completed, or if hipEventRecord() was not called on the event, then hipErrorNotReady is returned.

However this is not what I observe: hipEventQuery() returns hipSuccess for an event that has been just created, before hipEventRecord() was ever called with it.

fwyzard commented 6 months ago

See also https://github.com/ROCm/HIP/issues/3383 for the HIP documentation.

fwyzard commented 6 months ago

See https://github.com/ROCm-Developer-Tools/HIP-CPU/pull/56 for an attempt to implement hipEventQuery().