SWDEV-413997 - Alignment should be a multiple of device granularity.
Change-Id: Ie9c636385bbe3139c2dc24c16f31c9d5e2d56b95
This commit is contained in:
کامیت شده توسط
Karthik Jayaprakash
والد
cfc07c88ee
کامیت
f9fd5f4049
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user