From 4e71cb437e35ae4ab5ce22f3ed4ae5993666d9fe Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 12 Aug 2019 19:16:30 -0400 Subject: [PATCH] P4 to Git Change 1982034 by cpaquot@cpaquot-ocl-lc-lnx on 2019/08/12 19:08:13 SWDEV-199606 - [HIP] hipStreamQuery issue Don't test against CL_COMMAND_MARKER but 0 instead (user visible=false) Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#15 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#6 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#22 edit --- api/hip/hip_event.cpp | 4 ++-- api/hip/hip_event.hpp | 2 +- api/hip/hip_stream.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/hip/hip_event.cpp b/api/hip/hip_event.cpp index 8262a770d0..143d2eded9 100644 --- a/api/hip/hip_event.cpp +++ b/api/hip/hip_event.cpp @@ -115,7 +115,7 @@ hipError_t Event::streamWait(amd::HostQueue* hostQueue, uint flags) { amd::Command::EventWaitList eventWaitList; eventWaitList.push_back(event_); - amd::Command* command = new amd::Marker(*hostQueue, true, eventWaitList); + amd::Command* command = new amd::Marker(*hostQueue, false, eventWaitList); if (command == NULL) { return hipErrorOutOfMemory; } @@ -241,7 +241,7 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) { amd::Command* command = queue->getLastQueuedCommand(true); if (command == nullptr) { - command = new amd::Marker(*queue, true); + command = new amd::Marker(*queue, false); command->enqueue(); } diff --git a/api/hip/hip_event.hpp b/api/hip/hip_event.hpp index 410c19c7b4..ddf7a9c06b 100644 --- a/api/hip/hip_event.hpp +++ b/api/hip/hip_event.hpp @@ -30,7 +30,7 @@ namespace hip { class TimerMarker: public amd::Marker { public: - TimerMarker(amd::HostQueue& queue) : amd::Marker(queue, true) { + TimerMarker(amd::HostQueue& queue) : amd::Marker(queue, false) { profilingInfo_.enabled_ = true; profilingInfo_.callback_ = nullptr; profilingInfo_.start_ = profilingInfo_.end_ = 0; diff --git a/api/hip/hip_stream.cpp b/api/hip/hip_stream.cpp index a87e0e0d79..5dfe6f2db0 100644 --- a/api/hip/hip_stream.cpp +++ b/api/hip/hip_stream.cpp @@ -244,8 +244,7 @@ hipError_t hipStreamQuery(hipStream_t stream) { } amd::Event& event = command->event(); - - if (command->type() != CL_COMMAND_MARKER) { + if (command->type() != 0) { event.notifyCmdQueue(); } HIP_RETURN((command->status() == CL_COMPLETE) ? hipSuccess : hipErrorNotReady);