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
Tento commit je obsažen v:
Jatin Chaudhary authored and GitHub committed 2025-12-09 16:10:25 +01:00
1 rodič a08170bc75
revize eea93d58a2
2 files changed
+13 -1

No files matched your search

+7 -1
Zobrazit soubor
@@ -450,12 +450,18 @@ hipError_t StatCO::getStatFunc(hipFunction_t* hfunc, const void* hostFunction, i
// Lazy load
FatBinaryInfo** module = it->second->moduleInfo();
if (*(module) == nullptr) {
if (module != nullptr) {
amd::ScopedLock lock(sclock_);
if (*(module) == nullptr) {
hipError_t err = digestFatBinary(module_to_hostModule_[module], *module);
assert(err == hipSuccess);
if (err != hipSuccess) {
return err;
}
}
} else {
// Module was nullptr
return hipErrorInvalidDeviceFunction;
}
return it->second->getStatFunc(hfunc, deviceId);