SWDEV-281062 - hipIpcOpenMemHandle should return the base ptr

hipIpcOpenMemHandle should return the device pointer which is
similar to the base ptr of the original allocation even if the offset
to the original pointer is passed to hipIpcGetMemHandle

Change-Id: I99c0553e8c67c15b5fed880b6a4c74bce39c3aee


[ROCm/clr commit: 88fca7bf9e]
Tá an tiomantas seo le fáil i:
Satyanvesh Dittakavi tiomanta 2021-04-22 02:59:05 -04:00
1 tuismitheoir 0d43d02b1e
tiomantas f97bc7f6f2
1 comhad athraithe
+2 -2
+2 -2
Féach ar an gComhad
@@ -2126,8 +2126,8 @@ bool Device::IpcAttach(const void* handle, size_t mem_size, size_t mem_offset,
//Make sure the mem_offset doesnt overflow the allocated memory
guarantee((mem_offset < mem_size) && "IPC mem offset greater than allocated size");
// Return offsetted device pointer and maintain offsetted_ptr to orig_dev_ptr in map
*dev_ptr = reinterpret_cast<address>(orig_dev_ptr) + mem_offset;
// Return orig_dev_ptr
*dev_ptr = reinterpret_cast<address>(orig_dev_ptr);
return true;
}