From 8610e93f391b7947fba89ae5a5f97d3aef36bc35 Mon Sep 17 00:00:00 2001 From: agodavar Date: Thu, 7 Jan 2021 05:36:04 -0500 Subject: [PATCH] SWDEV-267154 - Add checks for grid and block dimensions 0 Change-Id: I54799c0a4a42a91f6226f94a1e3ff7bc79046a98 --- rocclr/hip_module.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rocclr/hip_module.cpp b/rocclr/hip_module.cpp index 43a8ce2c32..829a72e20c 100755 --- a/rocclr/hip_module.cpp +++ b/rocclr/hip_module.cpp @@ -231,7 +231,11 @@ hipError_t ihipModuleLaunchKernel(hipFunction_t f, uint32_t globalWorkSizeX, "%s", "Both, kernelParams and extra Params are provided, only one should be provided"); return hipErrorInvalidValue; } - + if (globalWorkSizeX == 0 || globalWorkSizeY == 0 || globalWorkSizeZ == 0 || + blockDimX == 0 || blockDimY == 0 || blockDimZ == 0) { + return hipErrorInvalidValue; + } + hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f); amd::Kernel* kernel = function->kernel();