From 73c10d5edd2b2e51fbe800705680aac374df142c Mon Sep 17 00:00:00 2001 From: David Rohr Date: Fri, 11 Dec 2020 21:42:30 +0100 Subject: [PATCH] GPU: Workaround for reoccuring HIP problem parsing host-code during device compilation --- GPU/Common/GPUCommonLogger.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GPU/Common/GPUCommonLogger.h b/GPU/Common/GPUCommonLogger.h index fc5fa6aac505d..5cabc470ad865 100644 --- a/GPU/Common/GPUCommonLogger.h +++ b/GPU/Common/GPUCommonLogger.h @@ -16,12 +16,12 @@ #include "GPUCommonDef.h" -#if defined(GPUCA_GPUCODE_DEVICE) +#if defined(GPUCA_GPUCODE_DEVICE) || defined(__HIPCC__) namespace o2::gpu::detail { struct DummyLogger { template - GPUd() DummyLogger& operator<<(Args... args) + GPUhd() DummyLogger& operator<<(Args... args) { return *this; } @@ -34,7 +34,7 @@ struct DummyLogger { #define LOGF(...) #define LOGP(...) -#elif defined(GPUCA_GPUCODE_DEVICE) +#elif defined(GPUCA_GPUCODE_DEVICE) || defined(__HIPCC__) #define LOG(...) o2::gpu::detail::DummyLogger() //#define LOG(...) static_assert(false, "LOG(...) << ... unsupported in GPU code"); #define LOGF(type, string, ...) \