From 3981cc165ce66e26aae8ab86303bbb976a173468 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 14 Aug 2018 19:06:08 -0400 Subject: [PATCH] P4 to Git Change 1593708 by vsytchen@vsytchen-win10 on 2018/08/14 18:51:20 SWDEV-145570 - [HIP] use IS_HIP variable to determine SVM size ReviewBoardURL = http://ocltc.amd.com/reviews/r/15632/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#103 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#295 edit --- rocclr/runtime/device/pal/paldevice.cpp | 5 ----- rocclr/runtime/utils/flags.hpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp index 39c2108f72..5770a50952 100644 --- a/rocclr/runtime/device/pal/paldevice.cpp +++ b/rocclr/runtime/device/pal/paldevice.cpp @@ -1169,11 +1169,6 @@ bool Device::init() { #endif info.pSettingsPath = "OCL"; info.maxSvmSize = static_cast(OCL_SET_SVM_SIZE * Mi); -#if defined(BUILD_HIP) - if (flagIsDefault(OCL_SET_SVM_SIZE)) { - info.maxSvmSize = static_cast(16384 * Mi); - } -#endif // PAL init if (Pal::Result::Success != Pal::CreatePlatform(info, platformObj_, &platform_)) { diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp index 5fe68572cc..3a81e74c3d 100644 --- a/rocclr/runtime/utils/flags.hpp +++ b/rocclr/runtime/utils/flags.hpp @@ -157,7 +157,7 @@ release(bool, DISABLE_DEFERRED_ALLOC, false, \ "Disables deferred memory allocation on device") \ release(int, AMD_GPU_FORCE_SINGLE_FP_DENORM, -1, \ "Force denorm for single precision: -1 - don't force, 0 - disable, 1 - enable") \ -release(uint, OCL_SET_SVM_SIZE, 4096, \ +release(uint, OCL_SET_SVM_SIZE, IF(IS_HIP, 16384, 4096), \ "set SVM space size for discrete GPU") \ debug(uint, OCL_SYSMEM_REQUIREMENT, 2, \ "Use flag to change the minimum requirement of system memory not to downgrade") \