This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Only emit CUDA version warnings when creating the CUDA toolchain
ClosedPublic

Authored by jhuber6 on Jul 18 2023, 8:30 AM.

Details

Summary

This warning primarily applies to users of the CUDA langues as there may
be new features we rely on. The other two users of the toolchain are
OpenMP via -fopenmp --offload-arch=sm_70 and a cross-compiled build
via --target=nvptx64-nvida-cuda -march=sm_70. Both of these do not
rely directly on things that would change significantly between CUDA
versions, and the way they are built can sometims make this warning
print many times.

This patch changees the behaiour to only check for the version when
building for CUDA offloading specifically, the other two will not have
this check.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 18 2023, 8:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 8:30 AM
Herald added a subscriber: mattd. · View Herald Transcript
jhuber6 requested review of this revision.Jul 18 2023, 8:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2023, 8:30 AM
jhuber6 updated this revision to Diff 541562.Jul 18 2023, 8:35 AM

Fix wrong comment

tra accepted this revision.Jul 18 2023, 11:03 AM
This revision is now accepted and ready to land.Jul 18 2023, 11:03 AM
This revision was landed with ongoing or failed builds.Jul 18 2023, 11:48 AM
This revision was automatically updated to reflect the committed changes.