SWDEV-413997 - Alignment should be a multiple of device granularity.
Change-Id: Ie9c636385bbe3139c2dc24c16f31c9d5e2d56b95
[ROCm/clr commit: f9fd5f4049]
This commit is contained in:
committed by
Karthik Jayaprakash
parent
cba839f38d
commit
6a36bf3b30
@@ -55,7 +55,8 @@ hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void*
|
||||
}
|
||||
|
||||
const auto& dev_info = g_devices[0]->devices()[0]->info();
|
||||
if (size == 0 || ((size % dev_info.virtualMemAllocGranularity_) != 0)) {
|
||||
if (size == 0 || ((size % dev_info.virtualMemAllocGranularity_) != 0)
|
||||
|| ((alignment % dev_info.virtualMemAllocGranularity_) != 0)) {
|
||||
HIP_RETURN(hipErrorMemoryAllocation);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user