[all-commits] [llvm/llvm-project] 7f1e6f: [OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP i...
Johannes Doerfert via All-commits
all-commits at lists.llvm.org
Fri Jul 10 16:55:35 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 7f1e6fcff9427adfa8efa3bfeeeac801da788b87
https://github.com/llvm/llvm-project/commit/7f1e6fcff9427adfa8efa3bfeeeac801da788b87
Author: Johannes Doerfert <johannes at jdoerfert.de>
Date: 2020-07-10 (Fri, 10 Jul 2020)
Changed paths:
M clang/lib/Headers/__clang_cuda_cmath.h
M clang/lib/Headers/__clang_cuda_device_functions.h
M clang/lib/Headers/__clang_cuda_libdevice_declares.h
M clang/lib/Headers/__clang_cuda_math.h
M clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h
M clang/lib/Headers/openmp_wrappers/cmath
M clang/lib/Headers/openmp_wrappers/math.h
Log Message:
-----------
[OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP in wrapper headers
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__.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D78155
More information about the All-commits
mailing list