define CCTK_DEVICE and CCTK_HOST in Cactus
Issue #2737
new
Cactus supports CUDA programming in the option lists level via various CUDA_FOO
variables but does not provide macros for __device__
and __host__
modifiers used by both CUDA and HIP accelerators.
It would be good if Cactus could provide those depending on which compiler is detected, Predefined defines to look for are (copying AMReX): CUDA_ARCH || HIP_DEVICE_COMPILE || SYCL_DEVICE_ONLY
(in its include/AMReX_GpuQualifiers.H
).
Comments (1)
-
reporter - Log in to comment
Alternatively one may also look for
__HCC__
and__CUDACC__
according to https://sep5.readthedocs.io/en/latest/Programming_Guides/HIP-porting-guide.html