rocr: Remove extra check for page-aligned

ROCr initially had a bug where memory allocations that were not 4K
aligned were internally 4K aligned but ROCr would not keep track
of user-requested size. This would cause some pointer_info queries
to fail, but HIP was already aligning the buffer sizes for IPC
requests. For backward compatibility accross 2 minor versions,
we allowed IPC look-ups to be both aligned and un-aligned.
Removing this check as this 4 minor versions have been released
since then.


[ROCm/ROCR-Runtime commit: d52f1d0453]
Tá an tiomantas seo le fáil i:
David Yat Sin
2025-05-22 23:44:43 +00:00
tiomanta ag Yat Sin, David
tuismitheoir 4515a48355
tiomantas 8f7c7458aa
@@ -1215,13 +1215,8 @@ hsa_status_t Runtime::IPCCreate(void* ptr, size_t len, hsa_amd_ipc_memory_t* han
if (PtrInfo(ptr, &info, nullptr, nullptr, nullptr, &block) != HSA_STATUS_SUCCESS)
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
// Temporary: Previous versions of HIP will call hsa_amd_ipc_memory_create with the len aligned to
// granularity. We need to maintain backward compatibility for 2 releases so we temporarily allow
// this. After 2 releases, we will only allow info.sizeInBytes != len.
if ((info.agentBaseAddress != ptr) ||
(info.sizeInBytes != len && AlignUp(info.sizeInBytes, pageSize) != len)) {
if (info.agentBaseAddress != ptr || info.sizeInBytes != len)
return HSA_STATUS_ERROR_INVALID_ARGUMENT;
}
bool useFrag = (block.base != ptr || block.length != len);
// Assume all pointers and blocks are 4Kb aligned.