SWDEV-369566, SWDEV-369565, SWDEV-369564 - match with cuda return

Change-Id: I308f5344a64e5a06aa89685de9348f6722c196da


[ROCm/clr commit: 698f52acd8]
This commit is contained in:
pghafari
2022-11-26 05:38:25 -05:00
zatwierdzone przez Payam Ghafari
rodzic 0a2f9b7017
commit c4fc6ea3ab
2 zmienionych plików z 5 dodań i 4 usunięć
+1 -1
Wyświetl plik
@@ -244,7 +244,7 @@ hipError_t FatBinaryInfo::ExtractFatBinary(const std::vector<hip::Device*>& devi
return hipErrorFileNotFound;
}
if (fsize_ == 0) {
return hipErrorInvalidKernelFile;
return hipErrorInvalidImage;
}
// Extract the code object from file
+4 -3
Wyświetl plik
@@ -53,7 +53,6 @@ hipError_t hipModuleLoad(hipModule_t* module, const char* fname) {
hipError_t hipModuleLoadData(hipModule_t* module, const void* image) {
HIP_INIT_API(hipModuleLoadData, module, image);
HIP_RETURN(PlatformState::instance().loadModule(module, 0, image));
}
@@ -61,7 +60,6 @@ hipError_t hipModuleLoadDataEx(hipModule_t* module, const void* image, unsigned
hipJitOption* options, void** optionsValues) {
/* TODO: Pass options to Program */
HIP_INIT_API(hipModuleLoadDataEx, module, image);
HIP_RETURN(PlatformState::instance().loadModule(module, 0, image));
}
@@ -72,9 +70,12 @@ extern hipError_t __hipExtractCodeObjectFromFatBinary(
hipError_t hipModuleGetFunction(hipFunction_t* hfunc, hipModule_t hmod, const char* name) {
HIP_INIT_API(hipModuleGetFunction, hfunc, hmod, name);
if (hfunc == nullptr || name == nullptr) {
if (hfunc == nullptr || name == nullptr || strlen(name) == 0) {
HIP_RETURN(hipErrorInvalidValue);
}
if (hmod == nullptr) {
HIP_RETURN(hipErrorInvalidResourceHandle);
}
if (hipSuccess != PlatformState::instance().getDynFunc(hfunc, hmod, name)) {
LogPrintfError("Cannot find the function: %s for module: 0x%x \n", name, hmod);