This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] provide wrapper functions for new NVCC builtins.
ClosedPublic

Authored by tra on May 18 2023, 11:14 AM.

Details

Summary

For sm_80 NVCC introduced a handful of builtins with the names that deviate from
the historic nvvm_/nv naming convention. Clang/LLVM does provide equivalent
builtins, but using different names. This patch maps NVCC-style builtins to
their clang counterparts.

Diff Detail

Event Timeline

tra created this revision.May 18 2023, 11:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 11:14 AM
tra published this revision for review.May 18 2023, 11:16 AM
tra added reviewers: jlebar, nyalloc.
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 11:16 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
tra updated this revision to Diff 523466.May 18 2023, 11:22 AM

Prefix function args with __.

jlebar accepted this revision.May 18 2023, 11:26 AM
This revision is now accepted and ready to land.May 18 2023, 11:26 AM
tra updated this revision to Diff 523472.May 18 2023, 11:31 AM

Put the wrappers behind CUDA_ARCH >= 800, as these clang builtins are not
available on older GPUs.

tra updated this revision to Diff 523879.May 19 2023, 11:45 AM

Added __nv_associate_access_property_impl() stub.

tra updated this revision to Diff 523881.May 19 2023, 11:47 AM

typo fix.

This revision was landed with ongoing or failed builds.May 19 2023, 11:49 AM
This revision was automatically updated to reflect the committed changes.