From 4c99d307ebe30d15fdc3a0eee29cc1e11a0f4acf Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 11 Jan 2018 14:11:44 -0500 Subject: [PATCH] P4 to Git Change 1502648 by gandryey@gera-ocl-lc on 2018/01/11 13:59:40 SWDEV-116219 - Allocating memory on GPU is 2x slower on win10 RS than on win7 - Remove 512MB limit for resource cache to avoid expensive KMD memory allocations in Win10 RS Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#358 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#40 edit --- rocclr/runtime/device/gpu/gpusettings.cpp | 1 - rocclr/runtime/device/pal/palsettings.cpp | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp index aaa86662e0..0890463b81 100644 --- a/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/rocclr/runtime/device/gpu/gpusettings.cpp @@ -419,7 +419,6 @@ bool Settings::create(const CALdeviceattribs& calAttr, bool reportAsOCL12Device, } else { resourceCacheSize_ = std::max((calAttr.localRAM / 8) * Mi, GPU_RESOURCE_CACHE_SIZE * Mi); } - resourceCacheSize_ = std::min(resourceCacheSize_, 512 * Mi); #endif // Override current device settings diff --git a/rocclr/runtime/device/pal/palsettings.cpp b/rocclr/runtime/device/pal/palsettings.cpp index ca08b5e166..f7a2d9c95a 100644 --- a/rocclr/runtime/device/pal/palsettings.cpp +++ b/rocclr/runtime/device/pal/palsettings.cpp @@ -400,17 +400,12 @@ bool Settings::create(const Pal::DeviceProperties& palProp, } } - if (apuSystem_ && ((heaps[Pal::GpuHeapLocal].heapSize + heaps[Pal::GpuHeapInvisible].heapSize) < (150 * Mi))) { remoteAlloc_ = true; } -// Save resource cache size -#ifdef ATI_OS_LINUX - // Due to EPR#406216, set the default value for Linux for now - resourceCacheSize_ = GPU_RESOURCE_CACHE_SIZE * Mi; -#else + // Update resource cache size if (remoteAlloc_) { resourceCacheSize_ = std::max((heaps[Pal::GpuHeapGartUswc].heapSize / 8), (uint64_t)GPU_RESOURCE_CACHE_SIZE * Mi); @@ -419,8 +414,6 @@ bool Settings::create(const Pal::DeviceProperties& palProp, std::max(((heaps[Pal::GpuHeapLocal].heapSize + heaps[Pal::GpuHeapInvisible].heapSize) / 8), (uint64_t)GPU_RESOURCE_CACHE_SIZE * Mi); } - resourceCacheSize_ = std::min(resourceCacheSize_, 512 * Mi); -#endif #if defined(WITH_LIGHTNING_COMPILER) switch (palProp.gfxLevel) {