[PATCH] D13171: [CUDA] Added a wrapper header for inclusion of stock CUDA headers.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 12:44:53 PDT 2015

tra updated this revision to Diff 37912.
tra added a comment.
Herald added a subscriber: klimek.

Changed header wrapping strategy. Previous version was attempting to
make CUDA headers work for host/device compilations separately. In the
end host and device compilations ended up with different view of
CUDA-provided functions. While it mostly worked, that is not what we
really want. What we want is to have identical view of device-specific
functions in both cases and let function overloading handle name clashes
between host and device functions.


This wrapper now always includes CUDA headers exactly the same way during
host and device compilation passes and produces identical preprocessed
content during host and device side compilation for sm_35 GPUs. Device
compilation passes for older GPUs will see a smaller subset of device
functions supported by particular GPU.


As a bonus this wrapper works with CUDA 7.5 now.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13171.37912.patch
Type: text/x-patch
Size: 7264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151020/6c04d4c7/attachment.bin>

More information about the cfe-commits mailing list