[PATCH] D28301: [CUDA] Pre-include sm_60 and sm_61 headers.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 10:05:15 PST 2017


tra created this revision.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.

CUDA-8.0 comes with new headers which nvcc pre-includes via cuda_runtime.h
Clang now makes them available as well.


https://reviews.llvm.org/D28301

Files:
  lib/Headers/__clang_cuda_runtime_wrapper.h


Index: lib/Headers/__clang_cuda_runtime_wrapper.h
===================================================================
--- lib/Headers/__clang_cuda_runtime_wrapper.h
+++ lib/Headers/__clang_cuda_runtime_wrapper.h
@@ -232,6 +232,11 @@
 // hardware, seems to generate faster machine code because ptxas can more easily
 // reason about our code.
 
+#if CUDA_VERSION >= 8000
+#include "sm_60_atomic_functions.hpp"
+#include "sm_61_intrinsics.hpp"
+#endif
+
 #undef __MATH_FUNCTIONS_HPP__
 
 // math_functions.hpp defines ::signbit as a __host__ __device__ function.  This


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28301.83071.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170104/aaa82190/attachment.bin>


More information about the cfe-commits mailing list