2
0

SWDEV-478708 - Remove forced wait of 10us in hipEventQuery

Change-Id: I868aae14311c3cdfc09aa03252ac324c4b79b864
Este cometimento está contido em:
Satyanvesh Dittakavi
2024-09-17 08:51:18 +00:00
ascendente 9da90fe848
cometimento ade1954015
4 ficheiros modificados com 14 adições e 21 eliminações
+8 -8
Ver ficheiro
@@ -31,21 +31,21 @@ namespace hip {
static amd::Monitor eventSetLock{};
static std::unordered_set<hipEvent_t> eventSet;
bool Event::ready(eventType type) {
bool Event::ready() {
if (event_->status() != CL_COMPLETE) {
event_->notifyCmdQueue();
}
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
bool ready = CheckHwEvent(type);
bool ready = CheckHwEvent();
if (!ready) {
ready = (event_->status() == CL_COMPLETE);
}
return ready;
}
bool EventDD::ready(eventType type) {
bool EventDD::ready() {
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
bool ready = CheckHwEvent(type);
bool ready = CheckHwEvent();
// FIXME: Remove status check entirely
if (!ready) {
ready = (event_->status() == CL_COMPLETE);
@@ -61,7 +61,7 @@ hipError_t Event::query() {
return hipSuccess;
}
return ready(Query) ? hipSuccess : hipErrorNotReady;
return ready() ? hipSuccess : hipErrorNotReady;
}
hipError_t Event::synchronize() {
@@ -109,7 +109,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
return hipErrorInvalidHandle;
}
if (!ready(ElapsedTime)) {
if (!ready()) {
return hipErrorNotReady;
}
@@ -125,7 +125,7 @@ hipError_t Event::elapsedTime(Event& eStop, float& ms) {
return hipErrorInvalidHandle;
}
if (!ready(ElapsedTime) || !eStop.ready(ElapsedTime)) {
if (!ready() || !eStop.ready()) {
return hipErrorNotReady;
}
@@ -203,7 +203,7 @@ hipError_t Event::streamWait(hipStream_t stream, uint flags) {
hip::Stream* hip_stream = hip::getStream(stream);
// Access to event_ object must be lock protected
amd::ScopedLock lock(lock_);
if ((event_ == nullptr) || (event_->command().queue() == hip_stream) || ready(StreamWait)) {
if ((event_ == nullptr) || (event_->command().queue() == hip_stream) || ready()) {
return hipSuccess;
}
if (!event_->notifyCmdQueue()) {