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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user