SWDEV-252801 - Fail if launch params exceeds launch_bounds

Change-Id: I90c8d0f1897ca63f00c3eec7c99d649a5c43416d
This commit is contained in:
Maneesh Gupta
2021-05-06 22:38:50 -07:00
parent 192c47e251
commit 2b04d249fc
+3 -2
View File
@@ -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) {