From 1531e24327b12a6854b3e1dfa7a3bb0da3630981 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 2 Aug 2018 20:20:23 -0400 Subject: [PATCH] P4 to Git Change 1589087 by skudchad@skudchad_rocm on 2018/08/02 20:10:02 SWDEV-145570 - [HIP] - hipHccModuleLaunchKernel needs to be a c++ sym Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#9 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#14 edit --- api/hip/hip_hcc.map.in | 2 +- api/hip/hip_module.cpp | 25 ++++++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/api/hip/hip_hcc.map.in b/api/hip/hip_hcc.map.in index 7f21b0ebd7..48bb8eccba 100644 --- a/api/hip/hip_hcc.map.in +++ b/api/hip/hip_hcc.map.in @@ -107,7 +107,6 @@ global: hipModuleGetGlobal; hipModuleLaunchKernel; hipModuleLaunchKernelExt; - hipHccModuleLaunchKernel; hipModuleLoad; hipModuleLoadData; hipModuleLoadDataEx; @@ -166,6 +165,7 @@ global: hipHccGetAcceleratorView*; hipCreateSurfaceObject*; hipDestroySurfaceObject*; + hipHccModuleLaunchKernel*; }; local: *; diff --git a/api/hip/hip_module.cpp b/api/hip/hip_module.cpp index 23cf47d724..6b154b2d9e 100644 --- a/api/hip/hip_module.cpp +++ b/api/hip/hip_module.cpp @@ -244,17 +244,28 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f, sharedMemBytes, hStream, kernelParams, extra, nullptr, nullptr); } -hipError_t hipModuleLaunchKernelExt(hipFunction_t f, - uint32_t gridDimX, uint32_t gridDimY, uint32_t gridDimZ, - uint32_t blockDimX, uint32_t blockDimY, uint32_t blockDimZ, - uint32_t sharedMemBytes, hipStream_t hStream, - void **kernelParams, void **extra, - hipEvent_t startEvent, hipEvent_t stopEvent) +hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t gridDimX, + uint32_t gridDimY, uint32_t gridDimZ, + uint32_t blockDimX, uint32_t blockDimY, + uint32_t blockDimZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, + hipEvent_t stopEvent) { return ihipModuleLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra, startEvent, stopEvent); } -const auto& hipHccModuleLaunchKernel = hipModuleLaunchKernelExt; +hipError_t hipModuleLaunchKernelExt(hipFunction_t f, uint32_t gridDimX, + uint32_t gridDimY, uint32_t gridDimZ, + uint32_t blockDimX, uint32_t blockDimY, + uint32_t blockDimZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, + hipEvent_t stopEvent) +{ + return ihipModuleLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, + sharedMemBytes, hStream, kernelParams, extra, startEvent, stopEvent); +}