SWDEV-365908 - Do not align mem size for IPC

Remove alignment to granularity for IPC handles as ROCr has a patch that
will internally validate pointer sizes against requested size during
allocation instead of size aligned to page size. This patch is needed
together with this patch from ROCr:
f8a42a3a:Use user requested size for memory fragments

Change-Id: I28b25558ea03c836b44fafdb34b7330cf6887424
This commit is contained in:
David Yat Sin
2022-11-07 16:47:59 +00:00
parent dbeb2f5495
commit fa1b7925cf
+1 -2
View File
@@ -2209,8 +2209,7 @@ bool Device::IpcCreate(void* dev_ptr, size_t* mem_size, void* handle, size_t* me
return false;
}
// Pass the pointer and memory size to retrieve the handle
hsa_status = hsa_amd_ipc_memory_create(orig_dev_ptr, amd::alignUp(*mem_size, alloc_granularity()),
hsa_status = hsa_amd_ipc_memory_create(orig_dev_ptr, *mem_size,
reinterpret_cast<hsa_amd_ipc_memory_t*>(handle));
if (hsa_status != HSA_STATUS_SUCCESS) {