SWDEV-413997 - Fixing alignment validation check for power of 2 instead of granularity factor.
Change-Id: I1e0db6e0628c09d26850e5a0339e2a4660442db8
[ROCm/clr commit: 00ddc3e284]
Этот коммит содержится в:
коммит произвёл
Karthik Jayaprakash
родитель
79b3fc1fb8
Коммит
867769b0ec
@@ -56,7 +56,7 @@ 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)
|
||||
|| ((alignment % dev_info.virtualMemAllocGranularity_) != 0)) {
|
||||
|| ((alignment & (alignment - 1)) != 0)) {
|
||||
HIP_RETURN(hipErrorMemoryAllocation);
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user