hipEventRecord only needs one lock; remove locked_eventIsReady

Bu işleme şunda yer alıyor:
Jeff Daily
2019-11-06 15:56:32 +00:00
ebeveyn 444122dfb9
işleme b2af1820f5
3 değiştirilmiş dosya ile 13 ekleme ve 29 silme
+13 -19
Dosyayı Görüntüle
@@ -222,25 +222,19 @@ hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop) {
hipError_t hipEventQuery(hipEvent_t event) {
HIP_INIT_SPECIAL_API(hipEventQuery, TRACE_QUERY, event);
hipError_t status = hipSuccess;
if (!event) return ihipLogStatus(hipErrorInvalidResourceHandle);
if ( NULL == event)
{
status = hipErrorInvalidResourceHandle;
} else {
if (!(event->_flags & hipEventReleaseToSystem)) {
tprintf(DB_WARN,
"hipEventQuery on event without system-scope fence ; consider creating with "
"hipEventReleaseToSystem\n");
}
auto ecd = event->locked_copyCrit();
if ((ecd._state == hipEventStatusRecording) && !ecd._stream->locked_eventIsReady(event)) {
status = hipErrorNotReady;
} else {
status = hipSuccess;
}
if (!(event->_flags & hipEventReleaseToSystem)) {
tprintf(DB_WARN,
"hipEventQuery on event without system-scope fence ; consider creating with "
"hipEventReleaseToSystem\n");
}
return ihipLogStatus(status);
auto ecd = event->locked_copyCrit();
if (ecd._state == hipEventStatusRecording && !ecd.marker().is_ready()) {
return ihipLogStatus(hipErrorNotReady);
}
return ihipLogStatus(hipSuccess);
}
-8
Dosyayı Görüntüle
@@ -325,14 +325,6 @@ void ihipStream_t::locked_streamWaitEvent(ihipEventData_t& ecd) {
}
// Causes current stream to wait for specified event to complete:
// Note this does not provide any kind of host serialization.
bool ihipStream_t::locked_eventIsReady(hipEvent_t event) {
LockedAccessor_EventCrit_t ecrit(event->criticalData());
return (ecrit->_eventData.marker().is_ready());
}
// Create a marker in this stream.
// Save state in the event so it can track the status of the event.
hc::completion_future ihipStream_t::locked_recordEvent(hipEvent_t event) {
-2
Dosyayı Görüntüle
@@ -583,8 +583,6 @@ class ihipStream_t {
void locked_streamWaitEvent(ihipEventData_t& event);
hc::completion_future locked_recordEvent(hipEvent_t event);
bool locked_eventIsReady(hipEvent_t event);
ihipStreamCritical_t& criticalData() { return _criticalData; };
//---