SWDEV-290160 - Add blocking command for callbacks in IPC and graph

Change-Id: I1474e19db6ebf2559e1b2c8dd7d06139bd699835
Этот коммит содержится в:
German Andryeyev
2021-06-24 15:02:58 -04:00
родитель c42308e2e5
Коммит 52f5b0fa16
2 изменённых файлов: 27 добавлений и 1 удалений
+13
Просмотреть файл
@@ -355,10 +355,23 @@ hipError_t hipGraphExec::Run(hipStream_t stream) {
if (!event.setCallback(CL_COMPLETE, hipGraphExec::ResetGraph, command)) {
return hipErrorInvalidHandle;
}
hipGraphExec::activeGraphExec_[command] = this;
lastEnqueuedGraphCmd_ = command;
bExecPending_.store(true);
command->enqueue();
// Add the new barrier to stall the stream, until the callback is done
amd::Command::EventWaitList eventWaitList;;
eventWaitList.push_back(command);
amd::Command* block_command = new amd::Marker(*queue, !kMarkerDisableFlush, eventWaitList);
if (block_command == nullptr) {
return hipErrorInvalidValue;
}
block_command->enqueue();
block_command->release();
command->release();
return hipSuccess;
}