SWDEV-413997 - Fixing alignment validation check for power of 2 instead of granularity factor.

Change-Id: I1e0db6e0628c09d26850e5a0339e2a4660442db8


[ROCm/clr commit: 00ddc3e284]
Этот коммит содержится в:
kjayapra-amd
2024-03-29 14:51:08 -04:00
коммит произвёл Karthik Jayaprakash
родитель 79b3fc1fb8
Коммит 867769b0ec
+1 -1
Просмотреть файл
@@ -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);
}