From a486ce6f0cfc0c0956cf27d15bbc196c3e568ecb Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Thu, 6 May 2021 22:38:50 -0700 Subject: [PATCH] SWDEV-252801 - Fail if launch params exceeds launch_bounds Change-Id: I90c8d0f1897ca63f00c3eec7c99d649a5c43416d [ROCm/hip commit: 2b04d249fca544fa2680d82621d0c5735559fbb7] --- projects/hip/rocclr/hip_module.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/hip/rocclr/hip_module.cpp b/projects/hip/rocclr/hip_module.cpp index b79ad4385f..08ef410670 100755 --- a/projects/hip/rocclr/hip_module.cpp +++ b/projects/hip/rocclr/hip_module.cpp @@ -244,10 +244,11 @@ inline hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWork hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f); amd::Kernel* kernel = function->kernel(); // Make sure the launch params are not larger than if specified launch_bounds - // If it exceeds, then print a warning and continue for now + // If it exceeds, then return a failure if (blockDimX * blockDimY * blockDimZ > kernel->getDeviceKernel(*device)->workGroupInfo()->size_) { - LogPrintfWarning("%s", "Launch params are larger than launch bounds"); + LogPrintfError("%s", "Launch params are larger than launch bounds"); + return hipErrorLaunchFailure; } if (params & amd::NDRangeKernelCommand::CooperativeGroups) {