P4 to Git Change 1981152 by cpaquot@cpaquot-ocl-lc-lnx on 2019/08/09 20:33:32

SWDEV-193430 - [HIP] Delay creating HostQueue till commands are enqueued.

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#34 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#68 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#21 edit


[ROCm/clr commit: 3494344c4d]
This commit is contained in:
foreman
2019-08-09 20:41:13 -04:00
parent e7c316bc92
commit b31e671b32
6 changed files with 85 additions and 44 deletions
+2 -2
View File
@@ -231,7 +231,7 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f,
queue = hip::getNullStream();
} else {
hip::getNullStream()->finish();
queue = as_amd(reinterpret_cast<cl_command_queue>(hStream))->asHostQueue();
queue = reinterpret_cast<hip::Stream*>(hStream)->asHostQueue();
}
if ((params & amd::NDRangeKernelCommand::CooperativeGroups) &&
!device->info().cooperativeGroups_) {
@@ -387,7 +387,7 @@ hipError_t ihipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsL
for (int i = 0; i < numDevices; ++i) {
hipSetDevice(i);
const hipLaunchParams& launch = launchParamsList[i];
amd::HostQueue* queue = as_amd(reinterpret_cast<cl_command_queue>(launch.stream))->asHostQueue();
amd::HostQueue* queue = reinterpret_cast<hip::Stream*>(launch.stream)->asHostQueue();
hipFunction_t func = PlatformState::instance().getFunc(launch.func, i);
if (func == nullptr) {
HIP_RETURN(result);