Refactor events and add initial event option for hipHccModuleLaunchKernel
- Change hipEvent_t to a class. - Move event logic inside the class. - Add _type to support Independent, StartCommand, StopCommand events. StartCommand returns start timestamp from events. Change-Id: I4ddd694f2645a3ff7170c9111dc1d3e39931ca21
This commit is contained in:
@@ -1641,23 +1641,6 @@ const char *ihipErrorString(hipError_t hip_error)
|
||||
};
|
||||
|
||||
|
||||
void ihipSetTs(hipEvent_t e)
|
||||
{
|
||||
ihipEvent_t *eh = e;
|
||||
if (eh->_state == hipEventStatusRecorded) {
|
||||
// already recorded, done:
|
||||
return;
|
||||
} else {
|
||||
// TODO - use completion-future functions to obtain ticks and timestamps:
|
||||
hsa_signal_t *sig = static_cast<hsa_signal_t*> (eh->_marker.get_native_handle());
|
||||
if (sig) {
|
||||
if (hsa_signal_load_acquire(*sig) == 0) {
|
||||
eh->_timestamp = eh->_marker.get_end_tick();
|
||||
eh->_state = hipEventStatusRecorded;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Returns true if copyEngineCtx can see the memory allocated on dstCtx and srcCtx.
|
||||
|
||||
Reference in New Issue
Block a user