This is an archive of the discontinued LLVM Phabricator instance.

[CUDA, NVPTX] Allow targeting sm_86 GPUs.
ClosedPublic

Authored by tra on Feb 3 2021, 1:35 PM.

Details

Summary

The patch only plumbs through the option necessary for targeting sm_86 GPUs w/o adding any new functionality.

Diff Detail

Event Timeline

tra created this revision.Feb 3 2021, 1:35 PM
tra requested review of this revision.Feb 3 2021, 1:35 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 3 2021, 1:35 PM
jdoerfert accepted this revision.Feb 3 2021, 1:49 PM

One nit below. Seems reasonable in general.

So we add ptx72 but it's not used with sm_86, interesting.

clang/lib/Driver/ToolChains/Cuda.cpp
103

leftover?

This revision is now accepted and ready to land.Feb 3 2021, 1:49 PM
tra updated this revision to Diff 321220.Feb 3 2021, 1:53 PM
tra edited the summary of this revision. (Show Details)

Removed debug printout

tra marked an inline comment as done.Feb 3 2021, 1:56 PM

So we add ptx72 but it's not used with sm_86, interesting.

ptx71 is the minimum/default requited PTX version for sm_86. If we compile with CUDA-11.2, clang will set the '+ptx72' as we may potentially need it in order to link in libdevice bitcode or if source code (e.g CUDA headers) has inline asm with instructions supported by CUDA-11.2.

In D95974#2540352, @tra wrote:

So we add ptx72 but it's not used with sm_86, interesting.

ptx71 is the minimum/default requited PTX version for sm_86. If we compile with CUDA-11.2, clang will set the '+ptx72' as we may potentially need it in order to link in libdevice bitcode or if source code (e.g CUDA headers) has inline asm with instructions supported by CUDA-11.2.

I see, thanks :)

This revision was landed with ongoing or failed builds.Feb 9 2021, 11:01 AM
This revision was automatically updated to reflect the committed changes.