SWDEV-350025 - Added hipLaunchHostFunc functionality

Change-Id: I6b9d547f7ddf84e617e35ff5d5a490ff458272ef
This commit is contained in:
Anusha Godavarthy Surya
2022-08-29 12:12:26 +00:00
parent e5dff9a140
commit 52a22a1263
9 changed files with 89 additions and 29 deletions
+3 -2
View File
@@ -112,13 +112,14 @@ hipError_t IPCEvent::streamWaitCommand(amd::Command*& command, amd::HostQueue* q
hipError_t IPCEvent::enqueueStreamWaitCommand(hipStream_t stream, amd::Command* command) {
auto t{new CallbackData{ipc_evt_.ipc_shmem_->read_index, ipc_evt_.ipc_shmem_}};
StreamCallback* cbo = new StreamCallback(
stream, reinterpret_cast<hipStreamCallback_t>(WaitThenDecrementSignal), t, command);
StreamCallback* cbo = new StreamAddCallback(
stream, reinterpret_cast<hipStreamCallback_t>(WaitThenDecrementSignal), t);
if (!command->setCallback(CL_COMPLETE, ihipStreamCallback, cbo)) {
command->release();
return hipErrorInvalidHandle;
}
command->enqueue();
command->release();
command->awaitCompletion();
return hipSuccess;
}