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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Verwijs in nieuw issue
Block a user