From 5edb4185a29ca638f8385fe4bbf9d191b0d4e755 Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Tue, 21 Jun 2016 16:04:04 -0500 Subject: [PATCH] Use GRID_LAUNCH_VERSION define provided by HCC grid_launch.h Change-Id: I5a7b31f13c4055cdca3a8854728d59db7dc5a7bb [ROCm/clr commit: 5fecff5a595834eb1fd8120b07d9fbcb620791ba] --- .../clr/hipamd/include/hcc_detail/hip_runtime.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/include/hcc_detail/hip_runtime.h b/projects/clr/hipamd/include/hcc_detail/hip_runtime.h index 8594954e75..21da60631a 100644 --- a/projects/clr/hipamd/include/hcc_detail/hip_runtime.h +++ b/projects/clr/hipamd/include/hcc_detail/hip_runtime.h @@ -38,8 +38,6 @@ THE SOFTWARE. #include -// Use field names for grid_launch 2.0 structure: -#define USE_GRID_LAUNCH_20 0 #define CUDA_SUCCESS hipSuccess @@ -50,6 +48,16 @@ THE SOFTWARE. // Remainder of this file only compiles with HCC #ifdef __HCC__ #include + +#if defined (GRID_LAUNCH_VERSION) and (GRID_LAUNCH_VERSION >= 20) +// Use field names for grid_launch 2.0 structure, if HCC supports GL 2.0. +#define USE_GRID_LAUNCH_20 1 +#else +#define USE_GRID_LAUNCH_20 0 +#endif + + + extern int HIP_TRACE_API; //TODO-HCC-GL - change this to typedef. @@ -529,7 +537,7 @@ do {\ hipStream_t trueStream = (ihipPreLaunchKernel(_stream, _numBlocks3D, _blockDim3D, &lp)); \ if (HIP_TRACE_API) {\ fprintf(stderr, KGRN "<