summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCUDA/Inputs/cuda.h
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2019-01-31 21:34:03 +0000
committerArtem Belevich <tra@google.com>2019-01-31 21:34:03 +0000
commitc62214da3de04f702e29e4ba4772c9463e2829ca (patch)
tree3b37c00552d8dcef2f88e1ec999796dd5798406e /clang/test/CodeGenCUDA/Inputs/cuda.h
parent8fa28a0db058eb53970f7eca3aaf71c86357e478 (diff)
downloadbcm5719-llvm-c62214da3de04f702e29e4ba4772c9463e2829ca.tar.gz
bcm5719-llvm-c62214da3de04f702e29e4ba4772c9463e2829ca.zip
[CUDA] add support for the new kernel launch API in CUDA-9.2+.
Instead of calling CUDA runtime to arrange function arguments, the new API constructs arguments in a local array and the kernels are launched with __cudaLaunchKernel(). The old API has been deprecated and is expected to go away in the next CUDA release. Differential Revision: https://reviews.llvm.org/D57488 llvm-svn: 352799
Diffstat (limited to 'clang/test/CodeGenCUDA/Inputs/cuda.h')
-rw-r--r--clang/test/CodeGenCUDA/Inputs/cuda.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/test/CodeGenCUDA/Inputs/cuda.h b/clang/test/CodeGenCUDA/Inputs/cuda.h
index 3adbdc5b6d1..0fd175765a2 100644
--- a/clang/test/CodeGenCUDA/Inputs/cuda.h
+++ b/clang/test/CodeGenCUDA/Inputs/cuda.h
@@ -15,13 +15,20 @@ struct dim3 {
};
typedef struct cudaStream *cudaStream_t;
-
+typedef enum cudaError {} cudaError_t;
#ifdef __HIP__
int hipConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
cudaStream_t stream = 0);
#else
-int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
- cudaStream_t stream = 0);
+extern "C" int cudaConfigureCall(dim3 gridSize, dim3 blockSize,
+ size_t sharedSize = 0,
+ cudaStream_t stream = 0);
+extern "C" int __cudaPushCallConfiguration(dim3 gridSize, dim3 blockSize,
+ size_t sharedSize = 0,
+ cudaStream_t stream = 0);
+extern "C" cudaError_t cudaLaunchKernel(const void *func, dim3 gridDim,
+ dim3 blockDim, void **args,
+ size_t sharedMem, cudaStream_t stream);
#endif
extern "C" __device__ int printf(const char*, ...);
OpenPOWER on IntegriCloud