Compiler Settings
THOR builds with a SYCL compiler that targets CPUs and GPUs across vendors. THOR supports two SYCL implementations: AdaptiveCpp (primary development target) and Intel oneAPI DPC++/C++ Compiler.
Choosing a SYCL Compiler
For installation see AdaptiveCpp or Intel oneAPI. Development is done against AdaptiveCpp; newer features may lag in oneAPI.
Select the compiler by setting CXX and CC before building.
For AdaptiveCpp:
For Intel oneAPI DPC++/C++ Compiler:
Ahead-of-Time (AOT) vs. Just-in-Time (JIT) Compilation
SYCL kernels can be compiled at build time (AOT) or at runtime (JIT). THOR prefers JIT because:
- THOR has many kernel variants — AOT compilation of all of them is slow.
- The hardware target need not be known at build time, which suits mixed-vendor HPC environments.
- Runtime constants can be folded during JIT, enabling further optimization.
JIT is the default for both AdaptiveCpp and Intel oneAPI. To force AOT under AdaptiveCpp, pass -DACPP_TARGETS="<targets>" to CMake (see the AdaptiveCpp compilation docs).