From e94aa7fb8ce449385ceb4908a005cfeb06cec755 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 6 May 2019 18:02:54 -0400 Subject: [PATCH] P4 to Git Change 1778985 by cpaquot@cpaquot-ocl-lc-lnx on 2019/05/06 17:21:57 SWDEV-188668 - [HIP] Implemented hipExtModuleLaunchKernel. Ignoring the flag for now. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#14 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#15 edit ... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#25 edit [ROCm/hip commit: 1e856beba96305fa434722ec36bac39b54a16c1e] --- projects/hip/api/hip/hip_hcc.def.in | 1 + projects/hip/api/hip/hip_hcc.map.in | 1 + projects/hip/api/hip/hip_module.cpp | 17 +++++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/projects/hip/api/hip/hip_hcc.def.in b/projects/hip/api/hip/hip_hcc.def.in index 6f2295dbf7..44dd6edea7 100644 --- a/projects/hip/api/hip/hip_hcc.def.in +++ b/projects/hip/api/hip/hip_hcc.def.in @@ -47,6 +47,7 @@ hipEventElapsedTime hipEventQuery hipEventRecord hipEventSynchronize +hipExtModuleLaunchKernel hipFree hipFreeArray hipFuncSetCacheConfig diff --git a/projects/hip/api/hip/hip_hcc.map.in b/projects/hip/api/hip/hip_hcc.map.in index b29d81f2f6..49318d6e15 100644 --- a/projects/hip/api/hip/hip_hcc.map.in +++ b/projects/hip/api/hip/hip_hcc.map.in @@ -48,6 +48,7 @@ global: hipEventQuery; hipEventRecord; hipEventSynchronize; + hipExtModuleLaunchKernel; hipFree; hipFreeArray; hipFuncSetCacheConfig; diff --git a/projects/hip/api/hip/hip_module.cpp b/projects/hip/api/hip/hip_module.cpp index ad13ab5ff2..58fa5e3680 100644 --- a/projects/hip/api/hip/hip_module.cpp +++ b/projects/hip/api/hip/hip_module.cpp @@ -162,12 +162,12 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, 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) + hipEvent_t startEvent, hipEvent_t stopEvent, uint32_t flags = 0) { HIP_INIT_API(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, - kernelParams, extra, startEvent, stopEvent); + kernelParams, extra, startEvent, stopEvent, flags); hip::Function* function = hip::Function::asFunction(f); amd::Kernel* kernel = function->function_; @@ -258,6 +258,19 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f, sharedMemBytes, hStream, kernelParams, extra, nullptr, nullptr)); } +hipError_t hipExtModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, + uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ, + uint32_t localWorkSizeX, uint32_t localWorkSizeY, + uint32_t localWorkSizeZ, size_t sharedMemBytes, + hipStream_t hStream, void** kernelParams, void** extra, + hipEvent_t startEvent, hipEvent_t stopEvent, uint32_t flags) +{ + HIP_RETURN(ihipModuleLaunchKernel(f, globalWorkSizeX, globalWorkSizeY, globalWorkSizeZ, localWorkSizeX, localWorkSizeY, + localWorkSizeZ, sharedMemBytes, hStream, kernelParams, extra, startEvent, stopEvent, flags)); +} + + + hipError_t hipHccModuleLaunchKernel(hipFunction_t f, uint32_t gridDimX, uint32_t gridDimY, uint32_t gridDimZ, uint32_t blockDimX, uint32_t blockDimY,