diff --git a/projects/hip/include/hip/amd_detail/device_functions.h b/projects/hip/include/hip/amd_detail/device_functions.h index e476a1a013..0e37e256df 100644 --- a/projects/hip/include/hip/amd_detail/device_functions.h +++ b/projects/hip/include/hip/amd_detail/device_functions.h @@ -1238,6 +1238,13 @@ unsigned __smid(void) return (se_id << HW_ID_CU_ID_SIZE) + cu_id; } +/** + * Map HIP_DYNAMIC_SHARED to "extern __shared__" for compatibility with old HIP applications + * To be removed in a future release. + */ +#define HIP_DYNAMIC_SHARED(type, var) extern __shared__ type var[]; +#define HIP_DYNAMIC_SHARED_ATTRIBUTE + #endif //defined(__clang__) && defined(__HIP__) diff --git a/projects/hip/include/hip/nvidia_detail/hip_runtime.h b/projects/hip/include/hip/nvidia_detail/hip_runtime.h index dfe41cf3c3..a42fecc611 100644 --- a/projects/hip/include/hip/nvidia_detail/hip_runtime.h +++ b/projects/hip/include/hip/nvidia_detail/hip_runtime.h @@ -95,6 +95,13 @@ typedef int hipLaunchParm; #define HIP_SYMBOL(X) &X +/** + * Map HIP_DYNAMIC_SHARED to "extern __shared__" for compatibility with old HIP applications + * To be removed in a future release. + */ +#define HIP_DYNAMIC_SHARED(type, var) extern __shared__ type var[]; +#define HIP_DYNAMIC_SHARED_ATTRIBUTE + #ifdef __HIP_DEVICE_COMPILE__ #define abort_() \ { asm("trap;"); }