From 51f3eeb8f2ca87be65c0481fdb7486d4f92394d4 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 24 Mar 2015 12:21:20 -0400
Subject: [PATCH] P4 to Git Change 1133833 by weizhang@weizhang-lnx-opencl-tmp
on 2015/03/24 12:09:34
EPR #410989 - [Project Brahma] - Report GPU devices as 1.2 until 2.0 is supported on Brahma stack.
1. Remove BRAHMA related definition from opencldefs since they are not needed.
2. Add the definition BRAHMA to runtimedefs since brahma stack is only for runtime/gpu
3. Report GPU devices as 1.2 until 2.0 is supported on Brahma stack.
Affected files ...
... //depot/stg/opencl/drivers/opencl/opencldefs#157 edit
... //depot/stg/opencl/drivers/opencl/runtime/runtimedefs#33 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#227 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/macros.hpp#6 edit
---
rocclr/runtime/utils/flags.hpp | 2 +-
rocclr/runtime/utils/macros.hpp | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp
index b7b508c8cf..db12e0f640 100644
--- a/rocclr/runtime/utils/flags.hpp
+++ b/rocclr/runtime/utils/flags.hpp
@@ -158,7 +158,7 @@ release(bool, GPU_ENABLE_LARGE_ALLOCATION, false, \
"Enable >4GB single allocations") \
release(bool, AMD_THREAD_TRACE_ENABLE, !IS_MAINLINE, \
"Enable thread trace extension") \
-release(uint, OPENCL_VERSION, 200, \
+release(uint, OPENCL_VERSION, (IS_BRAHMA ? 120 : 200), \
"Force GPU opencl verison") \
release(uint, CPU_OPENCL_VERSION, 120, \
"Force CPU opencl verison") \
diff --git a/rocclr/runtime/utils/macros.hpp b/rocclr/runtime/utils/macros.hpp
index e7765f8384..d3cb6a2b60 100644
--- a/rocclr/runtime/utils/macros.hpp
+++ b/rocclr/runtime/utils/macros.hpp
@@ -166,6 +166,12 @@
# define ALWAYSINLINE
#endif // !_MSC_VER
+#ifdef BRAHMA
+# define IS_BRAHMA true
+#else
+# define IS_BRAHMA false
+#endif
+
//! \endcond
#endif // MACROS_HPP_