SWDEV-554626 - return correct error code (#1107)

* SWDEV-554626 - return hipErrorInvalidDeviceFunction when we can not load module
Return correct error code when modules are empty

* Match the error codes

* Revert the error code
This commit is contained in:
Jatin Chaudhary
2025-12-09 15:10:25 +00:00
committed by GitHub
parent a08170bc75
commit eea93d58a2
2 changed files with 13 additions and 1 deletions
+6
View File
@@ -701,6 +701,12 @@ hipError_t ihipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDi
hipError_t hip_error =
PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
// Handle Invalid Image
if(hip_error == hipErrorInvalidImage) {
return hip_error;
}
if ((hip_error != hipSuccess) || (func == nullptr)) {
// assume its hip function type if we did not get a valid output from static
// func lookup