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 "<