This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP in wrapper headers
ClosedPublic

Authored by jdoerfert on Apr 14 2020, 2:00 PM.

Details

Summary

Due to recent changes we cannot use OpenMP in CUDA files anymore
(PR45533) as the math handling of CUDA is different when _OPENMP is
defined. We actually want this different behavior only if we are
offloading with OpenMP to NVIDIA, thus generating NVPTX. With this patch
we do not interfere with the CUDA math handling except if we are in
NVPTX offloading mode, as indicated by the presence of OPENMP_NVPTX.

Diff Detail

Event Timeline

jdoerfert created this revision.Apr 14 2020, 2:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2020, 2:01 PM
tra accepted this revision.May 19 2020, 1:16 PM

LGTM.

This revision is now accepted and ready to land.May 19 2020, 1:16 PM
This revision was automatically updated to reflect the committed changes.