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.
This commit is contained in:
committed by
Yat Sin, David
orang tua
c3978d03a4
melakukan
d52f1d0453
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user