SWDEV-333848 - Regression fix

Change-Id: I328770d5c51418c7f5bcb73696c81311d8dc3aef
Este cometimento está contido em:
Jaydeep Patel criou e Saleel Kudchadker cometeu 2022-04-29 13:27:46 -04:00
1 ascendente 8ed471f210
cometimento 118fad741a
1 ficheiro modificado
+9 -5
+9 -5
Ver ficheiro
@@ -71,11 +71,15 @@ hipError_t Event::synchronize() {
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status
static constexpr bool kWaitCompletion = true;
if (!g_devices[deviceId()]->devices()[0]->IsHwEventReady(*event_, kWaitCompletion)) {
amd::Command* command = nullptr;
hipError_t status = recordCommand(command, event_->command().queue(), flags);
command->enqueue();
g_devices[deviceId()]->devices()[0]->IsHwEventReady(command->event(), kWaitCompletion);
command->release();
if (event_->HwEvent() != nullptr) {
amd::Command* command = nullptr;
hipError_t status = recordCommand(command, event_->command().queue(), flags);
command->enqueue();
g_devices[deviceId()]->devices()[0]->IsHwEventReady(command->event(), kWaitCompletion);
command->release();
} else {
event_->awaitCompletion();
}
}
return hipSuccess;