diff options
author | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2020-09-29 20:16:32 -0400 |
---|---|---|
committer | Yaxun (Sam) Liu <yaxun.liu@amd.com> | 2020-10-02 19:05:51 -0400 |
commit | cbd420c5ed8568774ace3ad8385b2346288e152c (patch) | |
tree | 824742f805d1e14430c62e27d9cece85d70768a4 /clang/lib/Basic/Cuda.cpp | |
parent | 3847986fd2c838026b9d883bb61f2e419988c1a5 (diff) | |
download | llvm-cbd420c5ed8568774ace3ad8385b2346288e152c.zip llvm-cbd420c5ed8568774ace3ad8385b2346288e152c.tar.gz llvm-cbd420c5ed8568774ace3ad8385b2346288e152c.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Basic/Cuda.cpp')
-rw-r--r-- | clang/lib/Basic/Cuda.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Basic/Cuda.cpp b/clang/lib/Basic/Cuda.cpp index 2abbe3e..7de42c1 100644 --- a/clang/lib/Basic/Cuda.cpp +++ b/clang/lib/Basic/Cuda.cpp @@ -64,6 +64,7 @@ struct CudaArchToStringMap { { CudaArch::GFX##gpu, "gfx" #gpu, "compute_amdgcn" } CudaArchToStringMap arch_names[] = { // clang-format off + {CudaArch::UNUSED, "", ""}, SM2(20, "compute_20"), SM2(21, "compute_20"), // Fermi SM(30), SM(32), SM(35), SM(37), // Kepler SM(50), SM(52), SM(53), // Maxwell |