This revision was automatically updated to reflect the committed changes.
Closed by commit rL313369: [CUDA] Work around a new quirk in CUDA9 headers.
(authored by tra).
Changed prior to commit:
https://reviews.llvm.org/D37906?vs=115415=115422#toc
Repository:
rL LLVM
jlebar accepted this revision.
jlebar added a comment.
This revision is now accepted and ready to land.
> BTW, this change essentially augments the job that the "#undef GNUC" above
> used to do in older CUDA versions. CUDA9 replaced GNUC with _GLIBCXX_MATH_H
> in CUDA-9 in some places.
Ah,
tra added a comment.
I don't think we really care why they do it for nvcc.
My understanding is that nvcc needs to avoid name clashes between their
implementation of functions and the ones that come from the host headers and
that's why they have to tread really carefully around host includes.
jlebar added a comment.
This is a bit of a Chesterton's Fence -- do we know why they're doing this?
I guess it's probably going to be OK because our overriding semantics will make
it OK, and our test-suite tests (should) exercise all of math.h. But I'm still
a little worried about it.
tra created this revision.
Herald added a subscriber: sanjoy.
In CUDA-9 some of device-side math functions that we need are conditionally
defined within '#if _GLIBCXX_MATH_H'. We need to temporarily undo the guard
around inclusion of math_functions.hpp
https://reviews.llvm.org/D37906
Files: