SWDEV-373147 - Return error when getDeviceKernel returns nullptr

Change-Id: Ie9fcaa2bff87cb8ef363dc7e8362b74b8725b3b6


[ROCm/clr commit: 707ca92a80]
This commit is contained in:
Anusha GodavarthySurya
2022-12-19 09:21:25 +00:00
committed by Anusha Godavarthy Surya
parent 0019cfdf7c
commit b534cb32d2
+3
View File
@@ -230,6 +230,9 @@ hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWorkSizeX,
}
hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f);
amd::Kernel* kernel = function->kernel();
if (!kernel->getDeviceKernel(*device)) {
return hipErrorInvalidDevice;
}
// Make sure the launch params are not larger than if specified launch_bounds
// If it exceeds, then return a failure
if (blockDimX * blockDimY * blockDimZ >