From efea939ee11008b084864bf295bcbfeb7789f9f0 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 @@ - - + + - +