[PATCH] D24429: [test-suite] Add CUDA printf test.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 14:45:14 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL281102: [test-suite] Add CUDA printf test. (authored by jlebar).
Changed prior to commit:
https://reviews.llvm.org/D24429?vs=70905&id=70914#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24429
Files:
test-suite/trunk/External/CUDA/CMakeLists.txt
test-suite/trunk/External/CUDA/printf.cu
test-suite/trunk/External/CUDA/printf.reference_output
Index: test-suite/trunk/External/CUDA/printf.reference_output
===================================================================
--- test-suite/trunk/External/CUDA/printf.reference_output
+++ test-suite/trunk/External/CUDA/printf.reference_output
@@ -0,0 +1,17 @@
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+kernel_printf a 2 3 4.000000 5.000000 abcdefg
+exit 0
Index: test-suite/trunk/External/CUDA/CMakeLists.txt
===================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt
+++ test-suite/trunk/External/CUDA/CMakeLists.txt
@@ -46,6 +46,7 @@
macro(create_local_cuda_tests VariantSuffix)
create_one_local_test(axpy axpy.cu)
create_one_local_test(empty empty.cu)
+ create_one_local_test(printf printf.cu)
create_one_local_test(future future.cu)
endmacro()
Index: test-suite/trunk/External/CUDA/printf.cu
===================================================================
--- test-suite/trunk/External/CUDA/printf.cu
+++ test-suite/trunk/External/CUDA/printf.cu
@@ -0,0 +1,11 @@
+__global__ void kernel(char a, short b, int c, float d, double e) {
+ const char* f = "abcdefg";
+ printf("kernel_printf %c %d %d %f %f %s\n", a, b, c, d, e, f);
+}
+
+int main(int argc, char* argv[]) {
+ kernel<<<2, 8>>>('a', 2, 3, 4, 5);
+ cudaDeviceSynchronize();
+ cudaDeviceReset();
+ return 0;
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24429.70914.patch
Type: text/x-patch
Size: 2023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/59a04f1c/attachment.bin>
More information about the llvm-commits
mailing list