P4 to Git Change 1783299 by cpaquot@cpaquot-ocl-lc-lnx on 2019/05/15 11:56:14

SWDEV-189541 - [HIP] Increase SVM size to 64Gb for HIP.
	Introducing HIP_SET_SVM_SIZE to set SVM size specifically for HIP.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#135 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#307 edit


[ROCm/clr commit: 38a5fe9b0a]
This commit is contained in:
foreman
2019-05-15 12:17:35 -04:00
parent 91e69cf454
commit 0e4baf14ed
2 changed files with 10 additions and 1 deletions
@@ -1294,6 +1294,15 @@ bool Device::init() {
info.pSettingsPath = "OCL";
info.maxSvmSize = static_cast<Pal::gpusize>(OCL_SET_SVM_SIZE * Mi);
if (IS_LINUX) {
//! @note: Linux may have a deadlock if runtime will attempt to reserve
//! VA range, which is much bigger than sysmem size
size_t maxVirtualReserve = amd::Os::getPhysicalMemSize() << 1;
if (info.maxSvmSize > maxVirtualReserve) {
info.maxSvmSize = maxVirtualReserve;
}
}
// PAL init
if (Pal::Result::Success != Pal::CreatePlatform(info, platformObj_, &platform_)) {
return false;
+1 -1
View File
@@ -129,7 +129,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, 16384, \
release(uint, OCL_SET_SVM_SIZE, 4*16384, \
"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") \