From 10adf2e5abfe5f7d9ae96a664e0d9adc7c183f22 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Fri, 5 Apr 2024 17:48:33 +0200 Subject: [PATCH] Build alpaka code in GPU-only mode Build alpaka device code for the CUDA and ROCm back-ends in "GPU only" mode. In this mode, functions marked as ALPAKA_FN_ACC are marked as __device__ functions, and are compiled only for the corresponding GPU device back-ends. Currently, functions marked as ALPAKA_FN_ACC are marked as __host__ __device__ functions, and may be compiled for both device and host back-ends. The latter leads to linker errors in kernels that use device symbols like threadIdx, blockIdx, etc. that are compiled for the ROCm back-end. --- scram-tools.file/tools/alpaka/alpaka-cuda.xml | 6 +++--- scram-tools.file/tools/alpaka/alpaka-rocm.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scram-tools.file/tools/alpaka/alpaka-cuda.xml b/scram-tools.file/tools/alpaka/alpaka-cuda.xml index 64bd97f71bf..1208ebce73f 100644 --- a/scram-tools.file/tools/alpaka/alpaka-cuda.xml +++ b/scram-tools.file/tools/alpaka/alpaka-cuda.xml @@ -2,8 +2,8 @@ - - + + - + diff --git a/scram-tools.file/tools/alpaka/alpaka-rocm.xml b/scram-tools.file/tools/alpaka/alpaka-rocm.xml index d33be6a13b4..393fe1ad690 100644 --- a/scram-tools.file/tools/alpaka/alpaka-rocm.xml +++ b/scram-tools.file/tools/alpaka/alpaka-rocm.xml @@ -2,8 +2,8 @@ - - + + - +