[all-commits] [llvm/llvm-project] 7dc23a: [CUDA] Add a flag to manually specify the target f...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri May 13 13:31:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7dc23abbd3b298016cc6ae49a124f414e76903b6
      https://github.com/llvm/llvm-project/commit/7dc23abbd3b298016cc6ae49a124f414e76903b6
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-05-13 (Fri, 13 May 2022)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Cuda.cpp
    M clang/test/Driver/cuda-openmp-driver.cu

  Log Message:
  -----------
  [CUDA] Add a flag to manually specify the target feature to use with CUDA

Summary:
Normally we parse through the CUDA installation to disover the needed
features. However, we may want to build libraries on targets that do not
currently have CUDA installed but still need to know which features to
make use of when creating the PTX or bitcode. This flag is a simple way
to specify this so we can compile certain codes withotu a valid CUDA
installation.

Ideally this could be done via an -Xarch or simimlar flag but currently
they cannot handle this. We would need to support using an -Xarch flag
that takes multiple arguments that then pass them to the -Xclang
functionality.


  Commit: 54e02179b33f6bfd1c7bd836e790effd5ffb715c
      https://github.com/llvm/llvm-project/commit/54e02179b33f6bfd1c7bd836e790effd5ffb715c
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-05-13 (Fri, 13 May 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/CMakeLists.txt

  Log Message:
  -----------
  [Libomptarget] Build the static library without CUDA installed

Summary:
This patch allows users to compile the static library without CUDA
installed on the system. This requires the new flag `--cuda-feature` to
indicate that we need `+ptx61` in order to compile the runtime.


Compare: https://github.com/llvm/llvm-project/compare/bdba3d091c66...54e02179b33f


More information about the All-commits mailing list