CarpetX icon indicating copy to clipboard operation
CarpetX copied to clipboard

avoid having to set SIMD_CPU for GPU builds

Open rhaas80 opened this issue 2 years ago • 1 comments

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).

rhaas80 avatar Apr 05 '23 16:04 rhaas80

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.

eschnett avatar Apr 14 '23 13:04 eschnett