This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP
ClosedPublic

Authored by jhuber6 on May 9 2022, 12:11 PM.

Details

Summary

Currently we define the __CUDA_ARCH__ macro only in CUDA mode. This
patch allows us to use this macro in OpenMP-offloading mode when
targeting NVPTX.

Diff Detail

Event Timeline

jhuber6 created this revision.May 9 2022, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 12:11 PM
jhuber6 requested review of this revision.May 9 2022, 12:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 12:11 PM
jhuber6 retitled this revision from [OpenMP] Add __CUDA_ARCH__ definition when offloading with OpenMP to [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP.May 9 2022, 12:13 PM
jhuber6 edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 9 2022, 1:00 PM
tra accepted this revision.May 9 2022, 1:08 PM

@jhuber6 I think this or one of your other openmp commits has caused the Driver/cuda-openmp-driver.cu test failure here: https://lab.llvm.org/buildbot/#/builders/214/builds/1274/steps/6/logs/stdio

@jhuber6 I think this or one of your other openmp commits has caused the Driver/cuda-openmp-driver.cu test failure here: https://lab.llvm.org/buildbot/#/builders/214/builds/1274/steps/6/logs/stdio

Is that still failing? I saw another build-bot fail on that test as well, so I pushed a quick change and it went green. When I check a more recent build there it doesn't show the test failing.

RKSimon added a comment.EditedMay 14 2022, 8:59 AM

Sorry - my mistake - its a different test failure now! Nothing to do with openmp.