P4 to Git Change 1778971 by cpaquot@cpaquot-ocl-lc-lnx on 2019/05/06 17:03:12

SWDEV-187125 - [HIP] Protect hip::Event with lock and add threadId to logs.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#3 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#30 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#18 edit
This commit is contained in:
foreman
2019-05-06 17:43:06 -04:00
parent 09920e6024
commit d41643c39f
5 changed files with 121 additions and 74 deletions
+3 -13
View File
@@ -219,15 +219,9 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
}
if(startEvent != nullptr) {
eStart->stream_ = queue;
amd::Command* startCommand = new hip::TimerMarker(*eStart->stream_);
amd::Command* startCommand = new hip::TimerMarker(*queue);
startCommand->enqueue();
if (eStart->event_ != nullptr) {
eStart->event_->release();
}
eStart->event_ = &startCommand->event();
eStart->addMarker(queue, startCommand);
}
amd::NDRangeKernelCommand* command = new amd::NDRangeKernelCommand(*queue, waitList, *kernel, ndrange, sharedMemBytes);
@@ -244,11 +238,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
command->enqueue();
if(stopEvent != nullptr) {
if (eStop->event_ != nullptr) {
eStop->event_->release();
}
eStop->stream_ = queue;
eStop->event_ = &command->event();
eStop->addMarker(queue, command);
command->retain();
}