From 7cfb11efc7521b3139ce55ff8865c5b86ee31846 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Sun, 15 Dec 2024 15:34:52 +0100 Subject: [PATCH] Fix HOST_DEVICE_CONSTANT macro for AMD GPUs --- FWCore/Utilities/interface/HostDeviceConstant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FWCore/Utilities/interface/HostDeviceConstant.h b/FWCore/Utilities/interface/HostDeviceConstant.h index 00bd9df4eaa2f..762dae9a4fb04 100644 --- a/FWCore/Utilities/interface/HostDeviceConstant.h +++ b/FWCore/Utilities/interface/HostDeviceConstant.h @@ -16,7 +16,7 @@ // Note these objects may be at different memory addresses on the host and device, so their pointers will be different // -- but the actual values should be the same. -#ifdef __CUDA_ARCH__ +#if defined(__CUDA_ARCH__) or defined(__HIP_DEVICE_COMPILE__) #define HOST_DEVICE_CONSTANT __device__ constexpr #else #define HOST_DEVICE_CONSTANT constexpr