Merge "hipStreamAddCallback test seg faults" into amd-master-next
[ROCm/clr commit: 446c8685e2]
Tento commit je obsažen v:
@@ -251,6 +251,11 @@ hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback
|
|||||||
amd::HostQueue* hostQueue = reinterpret_cast<hip::Stream*>
|
amd::HostQueue* hostQueue = reinterpret_cast<hip::Stream*>
|
||||||
(stream)->asHostQueue();
|
(stream)->asHostQueue();
|
||||||
amd::Command* command = hostQueue->getLastQueuedCommand(true);
|
amd::Command* command = hostQueue->getLastQueuedCommand(true);
|
||||||
|
if (command == nullptr) {
|
||||||
|
amd::Command::EventWaitList eventWaitList;
|
||||||
|
command = new amd::Marker(*hostQueue, false, eventWaitList);
|
||||||
|
command->enqueue();
|
||||||
|
}
|
||||||
amd::Event& event = command->event();
|
amd::Event& event = command->event();
|
||||||
StreamCallback* cbo = new StreamCallback(stream, callback, userData, command);
|
StreamCallback* cbo = new StreamCallback(stream, callback, userData, command);
|
||||||
|
|
||||||
|
|||||||
Odkázat v novém úkolu
Zablokovat Uživatele