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

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 13:21:10 PDT 2015

echristo accepted this revision.
echristo added a comment.

In http://reviews.llvm.org/D13171#272441, @tra wrote:

> In http://reviews.llvm.org/D13171#272397, @echristo wrote:
> > I'm ignoring the content of the header, but this seems to be a not terrible way to do things. I gather that cuda_runtime.h is something that's typically included by the driver by nvidia and not the client?
> Correct. cuda_runtime.h (and all it pulls in) is -include'd under the hood by nvcc.
> > Also, tests?
> I'll add a test to verify that "-include cuda_runtime.h" shows up on cc1 command line where/when it's expected.


> What would be a good way to test the wrapper itself within clang tree without real CUDA headers?

Hrm. Maybe a set of inputs that stub out things? Hard really.

> I've done fair amount of manual testing outside of clang source tree.


> - manual comparison of preprocessed output from cuda_runtime.h between host and device passes.

> - compiled 39 out of 46 thrust examples and verified that they produce output identical to nvcc-compiled binaries.


LGTM with those changes and give a thought at how to test this in tree better.




More information about the cfe-commits mailing list