P4 to Git Change 1456988 by gandryey@gera-w8 on 2017/09/08 17:48:25
SWDEV-129129 - [[CQE OCL][Vega vs Fiji] Upto 12% Performance drop observed on VEGA10 compared to FIJI while running BlackMagic Davinci Resolve
- Force tiny read_only buffers into USWC memory. That will avoid expensive tiny data uploads, which occur every frame.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#278 edit
[ROCm/clr commit: caa25fc792]
This commit is contained in:
@@ -1228,6 +1228,12 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const {
|
||||
? Resource::Remote
|
||||
: Resource::Local;
|
||||
|
||||
// Check if runtime can force a tiny buffer into USWC memory
|
||||
if ((size <= (GPU_MAX_REMOTE_MEM_SIZE * Ki)) && (type == Resource::Local) &&
|
||||
(owner.getMemFlags() & CL_MEM_READ_ONLY)) {
|
||||
type = Resource::RemoteUSWC;
|
||||
}
|
||||
|
||||
if (owner.getMemFlags() & CL_MEM_BUS_ADDRESSABLE_AMD) {
|
||||
type = Resource::BusAddressable;
|
||||
} else if (owner.getMemFlags() & CL_MEM_EXTERNAL_PHYSICAL_AMD) {
|
||||
|
||||
@@ -187,6 +187,8 @@ release(bool, OCL_STUB_PROGRAMS, false, \
|
||||
"1 = Enables OCL programs stubing") \
|
||||
release(bool, GPU_ANALYZE_HANG, false, \
|
||||
"1 = Enables GPU hang analysis") \
|
||||
release(uint, GPU_MAX_REMOTE_MEM_SIZE, 2, \
|
||||
"Maximum size (in Ki) that allows device memory substitution with system") \
|
||||
release_on_stg(uint, GPU_WAVE_LIMIT_CU_PER_SH, 0, \
|
||||
"Assume the number of CU per SH for wave limiter") \
|
||||
release_on_stg(uint, GPU_WAVE_LIMIT_MAX_WAVE, 10, \
|
||||
|
||||
Referens i nytt ärende
Block a user