EinsteinToolkit / CarpetX

CarpetX is a Cactus driver for the Einstein Toolkit based on AMReX
GNU Lesser General Public License v3.0
17 stars 11 forks source link

avoid having to set SIMD_CPU for GPU builds #68

Open rhaas80 opened 1 year ago

rhaas80 commented 1 year ago

Instead of expecting the user to set `SIMD_CP`U for GPU builds it may be possible to check of AMReX itself was built with GPU support (via AMREX_USE_GPU which is defined in AMReX/include/AMReX_Config.H).

eschnett commented 1 year ago

This is also necessary for ROCM.

The problem is that neither nvcc nor hipcc can handle the Intel SIMD intrinsics. They report errors when reading the respective header files for various reasons, e.g. hipcc claims that float16 is not a type that can be vectorized. (It can.) We thus need to disable SIMD vectorization for these compilers. This is more of a compiler problem that we need to work around than a fundamental design issue.