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


[ROCm/hip commit: cfa3155082]
Этот коммит содержится в:
sunway513
2017-04-06 23:55:15 +00:00
коммит произвёл Ben Sander
родитель 7502166e5a
Коммит eaeecbd461
4 изменённых файлов: 99 добавлений и 41 удалений
-17
Просмотреть файл
@@ -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.