summaryrefslogtreecommitdiffstats
path: root/Tests/Module/CheckIPOSupported-CUDA/bar.cu
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-04-22 16:51:26 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-07-22 14:34:45 (GMT)
commit96bc59b1ca01be231347404d178445263687dd22 (patch)
treed9c015f30a1e43f0d5ded6dc75a638471f085ed6 /Tests/Module/CheckIPOSupported-CUDA/bar.cu
parent1527d48cd0071e3e1737b51db3738f7f76ddbf80 (diff)
downloadCMake-96bc59b1ca01be231347404d178445263687dd22.zip
CMake-96bc59b1ca01be231347404d178445263687dd22.tar.gz
CMake-96bc59b1ca01be231347404d178445263687dd22.tar.bz2
CUDA: Add Device LTO support for nvcc
Fixes #22200
Diffstat (limited to 'Tests/Module/CheckIPOSupported-CUDA/bar.cu')
-rw-r--r--Tests/Module/CheckIPOSupported-CUDA/bar.cu12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/Module/CheckIPOSupported-CUDA/bar.cu b/Tests/Module/CheckIPOSupported-CUDA/bar.cu
new file mode 100644
index 0000000..79b276d
--- /dev/null
+++ b/Tests/Module/CheckIPOSupported-CUDA/bar.cu
@@ -0,0 +1,12 @@
+__device__ int foo_func(int);
+
+void __global__ bar_kernel(int x)
+{
+ foo_func(x);
+}
+
+int launch_kernel(int x)
+{
+ bar_kernel<<<1, 1>>>(x);
+ return x;
+}