This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Make the new driver properly ignore non-CUDA inputs
ClosedPublic

Authored by jhuber6 on Jul 15 2022, 10:54 AM.

Details

Summary

The new driver generated offloadinga actions for each active toolchain.
However, for CUDA and HIP it is possible for the toolchain to be active
but one of the files is not a valid input. This can occur if the user
compiles both a CUDA and C source file in the same compiler invocation.
This patch adds some simple logic to quit if the input is not valid as
well.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 15 2022, 10:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 10:54 AM
jhuber6 requested review of this revision.Jul 15 2022, 10:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 10:54 AM
tra accepted this revision.Jul 15 2022, 11:25 AM

LGTM

This revision is now accepted and ready to land.Jul 15 2022, 11:25 AM
MaskRay added inline comments.Jul 15 2022, 11:34 AM
clang/test/Driver/cuda-phases.cu
270

Use --target=. -target is legacy.

271

The continuation line is typically indented by 2 spaces

273

If -NEXT is applicable, add it

297

delete blank line

jhuber6 updated this revision to Diff 445087.Jul 15 2022, 11:51 AM

Adjusting tests

MaskRay accepted this revision.Jul 15 2022, 1:29 PM
This revision was landed with ongoing or failed builds.Jul 15 2022, 2:38 PM
This revision was automatically updated to reflect the committed changes.