This is an archive of the discontinued LLVM Phabricator instance.

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
source compilation. Invalid target ID is not diagnosed for assembler.

This patch fixes that.

Diff Detail

Event Timeline

yaxunl created this revision.Sep 27 2020, 6:53 AM
yaxunl requested review of this revision.Sep 27 2020, 6:53 AM
ashi1 added a comment.Sep 28 2020, 8:34 AM

Could you please add full context? Mostly looks good to me.

clang/lib/Driver/ToolChains/HIP.cpp
243

Why move the checking logic to the end if getGPUArch doesn't do any checking?

yaxunl updated this revision to Diff 294728.Sep 28 2020, 9:21 AM

update patch with full context

yaxunl marked an inline comment as done.Sep 28 2020, 9:23 AM
yaxunl added inline comments.
clang/lib/Driver/ToolChains/HIP.cpp
243

It is moved to a different function which is called for both source file compilation and assembler.

ashi1 accepted this revision.Oct 2 2020, 9:20 AM

LGTM

This revision is now accepted and ready to land.Oct 2 2020, 9:20 AM
tra accepted this revision.Oct 2 2020, 9:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2020, 4:38 PM