[all-commits] [llvm/llvm-project] 26d38f: [OpenMP][NVPTX] Refined CMake logic to choose comp...

Shilei Tian via All-commits all-commits at lists.llvm.org
Sat Jan 30 12:15:09 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26d38f6d20ff137d89cb7c891b739662de1ca508
      https://github.com/llvm/llvm-project/commit/26d38f6d20ff137d89cb7c891b739662de1ca508
  Author: Shilei Tian <tianshilei1992 at gmail.com>
  Date:   2021-01-30 (Sat, 30 Jan 2021)

  Changed paths:
    M openmp/libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
    M openmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt

  Log Message:
  -----------
  [OpenMP][NVPTX] Refined CMake logic to choose compute capabilites

This patch refines the logic to choose compute capabilites via the
environment variable `LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES`. It supports the
following values (all case insensitive):
- "all": Build `deviceRTLs` for all supported compute capabilites;
- "auto": Only build for the compute capability auto detected. Note that this
  requires CUDA. If CUDA is not found, a CMake fatal error will be raised.
- "xx,yy" or "xx;yy": Build for compute capabilities `xx` and `yy`.

If `LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES` is not set, it is equivalent to set
it to `all`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95687




More information about the All-commits mailing list