[all-commits] [llvm/llvm-project] cbd420: [CUDA][HIP] Fix bound arch for offload action for ...

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Fri Oct 2 16:14:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cbd420c5ed8568774ace3ad8385b2346288e152c
      https://github.com/llvm/llvm-project/commit/cbd420c5ed8568774ace3ad8385b2346288e152c
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M clang/include/clang/Basic/Cuda.h
    M clang/lib/Basic/Cuda.cpp
    M clang/lib/Basic/Targets/NVPTX.cpp
    M clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
    M clang/lib/Driver/Driver.cpp
    M clang/test/Driver/hip-phases.hip
    A clang/test/Driver/hip-toolchain-device-only.hip

  Log Message:
  -----------
  [CUDA][HIP] Fix bound arch for offload action for fat binary

Currently CUDA/HIP toolchain uses "unknown" as bound arch
for offload action for fat binary. This causes -mcpu or -march
with "unknown" added in HIPToolChain::TranslateArgs or
CUDAToolChain::TranslateArgs.

This causes issue for https://reviews.llvm.org/D88377 since
HIP toolchain needs to check -mcpu in HIPToolChain::TranslateArgs.

The bound arch of offload action for fat binary is not really
used, therefore set it to CudaArch::UNUSED.

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




More information about the All-commits mailing list