From 18808d87a4be4c68a31c3ebfc39b334a3aecda1f Mon Sep 17 00:00:00 2001 From: pghafari Date: Thu, 29 Sep 2022 12:18:07 -0400 Subject: [PATCH] SWDEV-356557, SWDEV-356558 - matching cuda return Change-Id: I3b7d50e07bd437bd23a495439d66940ff30f7f07 [ROCm/clr commit: d7b27989b41dbd914ad9c87ae195b2ff68e853b5] --- projects/clr/hipamd/src/hip_memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index ee943686dc..80e605ba4f 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -2909,7 +2909,7 @@ hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* dev_ptr) { if(!device->IpcCreate(dev_ptr, &(ihandle->psize), &(ihandle->ipc_handle), &(ihandle->poffset))) { LogPrintfError("IPC memory creation failed for memory: 0x%x", dev_ptr); - HIP_RETURN(hipErrorInvalidDevicePointer); + HIP_RETURN(hipErrorInvalidValue); } HIP_RETURN(hipSuccess); @@ -2964,7 +2964,7 @@ hipError_t hipIpcCloseMemHandle(void* dev_ptr) { /* detach the memory */ if (!device->IpcDetach(dev_ptr)){ - HIP_RETURN(hipErrorInvalidHandle); + HIP_RETURN(hipErrorInvalidValue); } HIP_RETURN(hipSuccess);