Skip to content

CMake Options

Felix Weiglhofer edited this page Mar 30, 2023 · 1 revision

xpu provides a number of options in CMake to control compilation. These values should be set either in your CMakeLists.txt before adding xpu or in your initial CMake call via the -D flag.

Common Options

  • XPU_ENABLE_OPENMP: Enable / Disable compilation for OpenMP. (default=ON on Linux, OFF on MacOS)
  • XPU_DEBUG: Build device code with debug symbols and disable optimizations. (default=OFF)

CUDA Options

  • XPU_ENABLE_CUDA: Enable / Disable compilation for cuda. (default=OFF)
  • XPU_CUDA_ARCH: List of target cuda architectures. (default=75)

HIP Options

  • XPU_ENABLE_HIP: Enable / Disable compilation for hip. (default=OFF)
  • XPU_HIP_ARCH: List of target hip architectures. (default=gfx906;gfx908)
  • XPU_ROCM_ROOT: Path to rocm installation. (default=/opt/rocm)

SYCL Options

  • XPU_ENABLE_SYCL: Enable / Disable compilation for sycl. (default=OFF)
  • XPU_SYCL_CXX: Path to sycl compiler. (default=icpx)
  • XPU_SYCL_TARGETS: List of target sycl architectures. (default=spir64)

Development Options

  • XPU_BUILD_TESTS: Build unittests and benchmarks. (default=OFF)
  • XPU_BUILD_EXAMPLES: Build examples. (default=OFF)
Clone this wiki locally