From 048b9261f71d7ef3377b0ca308ca8d6b36e202e1 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 27 Oct 2015 18:19:02 -0400
Subject: [PATCH] P4 to Git Change 1204542 by bwicakso@opencl-hsa-stg-bwicakso
on 2015/10/27 17:46:17
SWDEV-79891 - dgpu optimization.
Details:
- Memory pool for kernarg buffer.
- Object pool for signal.
- Memory size and alloc limit.
- Use kernel to do fillBuffer operation.
Test: TC precheckin http://ocltc.amd.com:8111/viewLog.html?buildId=13693232&tab=buildResultsDiv&buildTypeId=PrecheckinTestsOpenCLSanity_PrecheckinSanityKaveriLinux64bitDebugHsaFoundation
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsablit.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsasettings.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsasettings.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.cpp#48 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#244 edit
---
rocclr/runtime/utils/flags.hpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp
index a9838d127f..cb8abed624 100644
--- a/rocclr/runtime/utils/flags.hpp
+++ b/rocclr/runtime/utils/flags.hpp
@@ -154,6 +154,10 @@ release(bool, ENVVAR_HSA_POLL_KERNEL_COMPLETION, false, \
"Determines if Hsa runtime should use polling scheme") \
release(bool, HSA_LOCAL_MEMORY_ENABLE, false, \
"Enable HSA device local memory usage") \
+release(uint, HSA_KERNARG_POOL_SIZE, 2 * 1024 * 1024, \
+ "Kernarg pool size") \
+release(uint, HSA_SIGNAL_POOL_SIZE, 16, \
+ "Signal object pool size") \
release(bool, HSA_ENABLE_ATOMICS_32B, false, \
"1 = Enable SVM atomics in 32 bits (HSA backend-only). Any other value keeps then disabled.") \
release(bool, GPU_IFH_MODE, false, \