[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 29 18:56:48 PDT 2020


yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.

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 nullptr to make things simpler.


https://reviews.llvm.org/D88524

Files:
  clang/lib/Driver/Driver.cpp
  clang/test/Driver/hip-phases.hip
  clang/test/Driver/hip-toolchain-device-only.hip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88524.295162.patch
Type: text/x-patch
Size: 6357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200930/61bb4b6b/attachment.bin>


More information about the cfe-commits mailing list