AMDGPU toolchain currently only diagnose invalid target ID for OpenCL
source compilation. Invalid target ID is not diagnosed for assembler.
This patch fixes that.
| Paths 
 |  Differential  D88377  
Diagnose invalid target ID for AMDGPU toolchain for assembler ClosedPublic Authored by yaxunl on Sep 27 2020, 6:53 AM. 
Details Summary AMDGPU toolchain currently only diagnose invalid target ID for OpenCL This patch fixes that. 
Diff Detail 
 Event TimelineHerald added subscribers: kerbowa, t-tye, Anastasia and 5 others.  ·  View Herald TranscriptSep 27 2020, 6:53 AM Comment Actions Could you please add full context? Mostly looks good to me. 
 yaxunl mentioned this in D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary.Sep 29 2020, 6:56 PM yaxunl added a parent revision: D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary. yaxunl removed a parent revision: D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary. yaxunl added a child revision: D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary. yaxunl marked an inline comment as done.Comment Actions fix bug yaxunl removed a child revision: D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary.Oct 1 2020, 1:23 PM yaxunl added a parent revision: D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary. This revision is now accepted and ready to land.Oct 2 2020, 9:20 AM Closed by commit rG2cd75f738ec6: Diagnose invalid target ID for AMDGPU toolchain for assembler (authored by yaxunl).  ·  Explain WhyOct 2 2020, 4:38 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
Diff 295935 clang/lib/Driver/ToolChains/AMDGPU.h
 clang/lib/Driver/ToolChains/AMDGPU.cpp
 clang/lib/Driver/ToolChains/HIP.cpp
 clang/test/Driver/amdgpu-invalid-target-id.s
 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Why move the checking logic to the end if getGPUArch doesn't do any checking?