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

Shilei Tian via All-commits all-commits at lists.llvm.org
Mon Feb 15 14:06:01 PST 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a29ff5bae41a06302e0c90b47387e3bff8bbdd8c
      https://github.com/llvm/llvm-project/commit/a29ff5bae41a06302e0c90b47387e3bff8bbdd8c
  Author: Shilei Tian <tianshilei1992 at gmail.com>
  Date:   2021-02-15 (Mon, 15 Feb 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

(cherry picked from commit 26d38f6d20ff137d89cb7c891b739662de1ca508)




More information about the All-commits mailing list