SWDEV-371332 - [ABI Break] Return success for unregistered ptr

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ie58d16420578e7118997eb40a9fd6a6641b666f3


[ROCm/clr commit: d78aef7f66]
Dieser Commit ist enthalten in:
sdashmiz
2023-08-02 15:46:58 -04:00
committet von Rakesh Roy
Ursprung 515ea1eb56
Commit 555aacb1fb
+9 -3
Datei anzeigen
@@ -3411,10 +3411,16 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
attributes->type = hipMemoryTypeManaged;
}
HIP_RETURN(hipSuccess);
} else {
attributes->type = hipMemoryTypeUnregistered;
attributes->devicePointer = nullptr;
attributes->hostPointer = nullptr;
attributes->isManaged = false;
attributes->allocationFlags = 0;
attributes->device = hipInvalidDeviceId;
LogPrintfError("Cannot get amd_mem_obj for ptr: 0x%x \n", ptr);
}
LogPrintfError("Cannot get amd_mem_obj for ptr: %p \n", ptr);
HIP_RETURN(hipErrorInvalidValue);
HIP_RETURN(hipSuccess);
}
// ================================================================================================