From ca538dfa45da1a6988051a33a9fdae354ac59162 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 26 Apr 2018 14:51:10 -0400
Subject: [PATCH] P4 to Git Change 1546804 by
skudchad@skudchad_test2_win_opencl on 2018/04/26 14:28:38
SWDEV-145570 - [HIP] - Enable SVM mode if BUILD_HIP is defined.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/14711/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#87 edit
---
rocclr/runtime/device/pal/paldevice.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index de97499a80..0bb9066e72 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -1096,9 +1096,13 @@ bool Device::init() {
#ifdef ATI_BITS_32
info.flags.force32BitVaSpace = true;
info.flags.enableSvmMode = false;
+#else
+#if defined(BUILD_HIP)
+ info.flags.enableSvmMode = true;
#else
info.flags.enableSvmMode = !IS_LINUX;
#endif
+#endif
#endif
info.pSettingsPath = "OCL";
info.maxSvmSize = static_cast(OCL_SET_SVM_SIZE * Mi);