[PATCH] D141051: [CUDA]HIP] Add support for `--offload-arch=native` to CUDA and refactor

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 06:35:16 PST 2023


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, tra, yaxunl, MaskRay.
Herald added subscribers: kosarev, mattd, carlosgalvezp, asavonic, StephenFan, kerbowa, jvesely.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

This patch adds basic support for `--offload-arch=native` to CUDA. This
is done using the `nvptx-arch` tool that was introduced previously. Some
of the logic for handling executing these tools was factored into a
common helper as well. This patch does not add support for OpenMP or the
"new" driver. That will be done later.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141051

Files:
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/ToolChain.h
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/ToolChains/AMDGPU.cpp
  clang/lib/Driver/ToolChains/AMDGPU.h
  clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
  clang/lib/Driver/ToolChains/Cuda.cpp
  clang/lib/Driver/ToolChains/Cuda.h
  clang/test/Driver/Inputs/nvptx-arch/nvptx_arch_fail
  clang/test/Driver/Inputs/nvptx-arch/nvptx_arch_sm_70
  clang/test/Driver/amdgpu-hip-system-arch.c
  clang/test/Driver/amdgpu-openmp-system-arch-fail.c
  clang/test/Driver/nvptx-cuda-system-arch.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141051.486551.patch
Type: text/x-patch
Size: 20201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230105/79fb37df/attachment-0001.bin>


More information about the cfe-commits mailing list