From 9aef33385daa8f778a1b161e6e63cd027d62dc90 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 25 Oct 2016 19:49:21 -0400 Subject: [PATCH] P4 to Git Change 1331691 by lmoriche@lmoriche_opencl_dev on 2016/10/25 19:42:32 SWDEV-105604 - OpenCL program manager for LC on PAL - Enable PAL for Gfx8 when building with LC. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#14 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#257 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/macros.hpp#7 edit [ROCm/clr commit: baf0aa9e4d9326bc02315050f883d51209991528] --- projects/clr/rocclr/runtime/device/pal/palkernel.cpp | 2 +- projects/clr/rocclr/runtime/utils/flags.hpp | 2 +- projects/clr/rocclr/runtime/utils/macros.hpp | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp index e45a4ef514..46e95682dc 100644 --- a/projects/clr/rocclr/runtime/device/pal/palkernel.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palkernel.cpp @@ -1162,7 +1162,7 @@ HSAILKernel::loadArguments( #if defined(WITH_LIGHTNING_COMPILER) //!!!!!FIXME_lmoriche: fix the hidden args - size_t zero; + size_t zero = 0; WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); WriteAqlArg(&aqlArgBuf, &zero, sizeof(zero)); diff --git a/projects/clr/rocclr/runtime/utils/flags.hpp b/projects/clr/rocclr/runtime/utils/flags.hpp index 4ba6b781dd..a776d08dd0 100644 --- a/projects/clr/rocclr/runtime/utils/flags.hpp +++ b/projects/clr/rocclr/runtime/utils/flags.hpp @@ -163,7 +163,7 @@ release(bool, GPU_IFH_MODE, false, \ "1 = Enable GPU IFH (infinitely fast hardware) mode. Any other value keeps setting disabled.") \ release(bool, GPU_MIPMAP, true, \ "Enables GPU mipmap extension") \ -release(uint, GPU_ENABLE_PAL, 2, \ +release(uint, GPU_ENABLE_PAL, IF(IS_LIGHTNING,1,2), \ "Enables PAL backend. 0 - GSL(default), 1 - PAL, 2 - GSL and PAL") \ release(bool, DISABLE_DEFERRED_ALLOC, false, \ "Disables deferred memory allocation on device") \ diff --git a/projects/clr/rocclr/runtime/utils/macros.hpp b/projects/clr/rocclr/runtime/utils/macros.hpp index d3cb6a2b60..7ea54b6d05 100644 --- a/projects/clr/rocclr/runtime/utils/macros.hpp +++ b/projects/clr/rocclr/runtime/utils/macros.hpp @@ -98,6 +98,13 @@ # define NOT_WIN64(x) x #endif /*!_WIN64*/ +#ifdef WITH_LIGHTNING_COMPILER +# define LIGHTNING_ONLY(x) x +# define IS_LIGHTNING true +#else /* !WITH_LIGHTNING_COMPILER */ +# define LIGHTNING_ONLY(x) +#endif /* !WITH_LIGHTNING_COMPILER */ + #ifndef IS_LINUX # define IS_LINUX false #endif @@ -107,6 +114,9 @@ #ifndef IS_WINDOWS # define IS_WINDOWS false #endif +#ifndef IS_LIGHTNING +# define IS_LIGHTNING false +#endif #define IF_LEFT_true(x) x #define IF_LEFT_false(x)