[Piglit] [PATCH 1/1] cl: Add kernel_exec and __kernel_exec macro test

Jan Vesely jan.vesely at rutgers.edu
Thu Jul 27 16:28:20 UTC 2017


Based on attributes test. Passed on beignet (IVB) and clover(Turks) with posted libclc patch.

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 tests/cl/program/execute/kernel_exec.cl | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 tests/cl/program/execute/kernel_exec.cl

diff --git a/tests/cl/program/execute/kernel_exec.cl b/tests/cl/program/execute/kernel_exec.cl
new file mode 100644
index 000000000..3afad15f0
--- /dev/null
+++ b/tests/cl/program/execute/kernel_exec.cl
@@ -0,0 +1,39 @@
+/*!
+[config]
+name: kernel_exec macro tests
+clc_version_min: 10
+
+[test]
+name: kernel_exec
+kernel_name: testKernel
+dimensions: 1
+global_size: 4 0 0
+arg_out: 0 buffer int2[4] repeat 5
+
+[test]
+name: __kernel_exec
+kernel_name: test__Kernel
+dimensions: 1
+global_size: 4 0 0
+arg_out: 0 buffer int3[4] repeat 7
+
+!*/
+
+kernel_exec(4, int2) void testKernel(
+	global int2* out
+) {
+	const size_t gid = get_global_id(0);
+	if (gid >= get_global_size(0))
+		return;
+	out[gid] = (int2){5, 5};
+}
+
+__kernel_exec(4, int3) void test__Kernel(
+	global int3* out
+) {
+	const size_t gid = get_global_id(0);
+	if (gid >= get_global_size(0))
+		return;
+	out[gid] = (int3){7, 7, 7};
+}
+
-- 
2.13.3



More information about the Piglit mailing list