SWDEV-373400 - Lower the threshold of single alloc percent for APUs w/ small VRAM
Change-Id: Ie8e3504a0c468bc44633991cdfde66bcf0b74f06
This commit is contained in:
committed by
German Andryeyev
parent
c2abac32c8
commit
35a0855e4e
@@ -1245,6 +1245,13 @@ bool Device::populateOCLDeviceConstants() {
|
||||
assert(global_segment_size > 0);
|
||||
info_.globalMemSize_ = static_cast<uint64_t>(global_segment_size);
|
||||
|
||||
// For APU with vram size <= 512MiB, use a smaller single alloc percentage
|
||||
if (info_.globalMemSize_ <= 536870912) {
|
||||
if (flagIsDefault(GPU_SINGLE_ALLOC_PERCENT)) {
|
||||
GPU_SINGLE_ALLOC_PERCENT = 75;
|
||||
}
|
||||
}
|
||||
|
||||
gpuvm_segment_max_alloc_ =
|
||||
uint64_t(info_.globalMemSize_ * std::min(GPU_SINGLE_ALLOC_PERCENT, 100u) / 100u);
|
||||
assert(gpuvm_segment_max_alloc_ > 0);
|
||||
|
||||
Reference in New Issue
Block a user