This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Only allow NVIDIA offload-arch during CUDA compilation.
ClosedPublic

Authored by tra on Jul 1 2021, 10:00 AM.

Details

Summary

Otherwise, if someone specifies a valid AMD arch, we may end up triggering an
assertion on unexpected arch later on.

Current tests didn't catch it because the failure does not get triggered with -###.

Diff Detail

Event Timeline

tra created this revision.Jul 1 2021, 10:00 AM
tra requested review of this revision.Jul 1 2021, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2021, 10:00 AM
yaxunl accepted this revision.Jul 6 2021, 10:42 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Jul 6 2021, 10:42 AM
This revision was landed with ongoing or failed builds.Jul 13 2021, 11:09 AM
This revision was automatically updated to reflect the committed changes.
tra added a comment.Jul 13 2021, 11:44 AM

Ugh. I broke the cuda-bad-arch.cu test.

clang/test/Driver/cuda-bad-arch.cu
30

HIP tests should've used -x hip. I'll fix the test shortly.

dyung added a subscriber: dyung.Jul 13 2021, 11:58 AM

I think your change also broke cuda-flush-denormals-to-zero.cu:

https://lab.llvm.org/buildbot/#/builders/139/builds/7048

tra added a comment.Jul 13 2021, 11:59 AM

Ugh. I broke the cuda-bad-arch.cu test.

Should be fixed in 25629bb45f0a4b8c8e99dbde4f4a7e3d980b9fd7