SWDEV-365048 - extra marker is required for HW event check, which is done before the callback is finished.
Change-Id: Ib46bfc4e060a60fb14aa782688d35b34534cca65
This commit is contained in:
zatwierdzone przez
Jaydeepkumar Patel
rodzic
55d085ca8c
commit
e7a34f9efe
@@ -587,10 +587,21 @@ hipError_t streamCallback_common(hipStream_t stream, StreamCallback* cbo, void*
|
|||||||
if (last_command != nullptr) {
|
if (last_command != nullptr) {
|
||||||
last_command->release();
|
last_command->release();
|
||||||
}
|
}
|
||||||
|
// Extra marker is required for HW event check, which is done before the callback is finished.
|
||||||
|
// Add the new barrier to stall the stream, until the callback is done
|
||||||
|
eventWaitList.clear();
|
||||||
|
eventWaitList.push_back(command);
|
||||||
|
amd::Command* block_command = new amd::Marker(*hostQueue, !kMarkerDisableFlush, eventWaitList);
|
||||||
|
if (block_command == nullptr) {
|
||||||
|
return hipErrorInvalidValue;
|
||||||
|
}
|
||||||
|
block_command->enqueue();
|
||||||
|
block_command->release();
|
||||||
|
|
||||||
// Release the callback marker
|
// Release the callback marker
|
||||||
command->release();
|
command->release();
|
||||||
// Notify the command queue about a possible waiter for the calback
|
// Notify the command queue about a possible waiter for the calback
|
||||||
command->notifyCmdQueue();
|
block_command->notifyCmdQueue();
|
||||||
|
|
||||||
return hipSuccess;
|
return hipSuccess;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user