From 0ac6dcbd246aa8e40d94248b6e89d6d968135723 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 15 May 2019 23:14:28 -0400
Subject: [PATCH] P4 to Git Change 1783658 by cpaquot@cpaquot-ocl-lc-lnx on
2019/05/15 22:55:22
SWDEV-189541 - [HIP] Make sure maxSvmSize is power of two.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#136 edit
---
rocclr/runtime/device/pal/paldevice.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index 12b4cc47fe..ae0ba7196e 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -1302,6 +1302,7 @@ bool Device::init() {
info.maxSvmSize = maxVirtualReserve;
}
}
+ info.maxSvmSize = amd::nextPowerOfTwo(info.maxSvmSize - 1);
// PAL init
if (Pal::Result::Success != Pal::CreatePlatform(info, platformObj_, &platform_)) {