[Piglit] [PATCH 1/4] cl: Add float type vstore test

Jan Vesely jan.vesely at rutgers.edu
Sat Jul 30 17:56:03 UTC 2016


Passes on intel, clover(AMD Turks,Kaveri), beignet, CUDA

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

diff --git a/tests/cl/program/execute/vstore-float.cl b/tests/cl/program/execute/vstore-float.cl
new file mode 100644
index 0000000..968d980
--- /dev/null
+++ b/tests/cl/program/execute/vstore-float.cl
@@ -0,0 +1,126 @@
+/*!
+[config]
+name: Vector store float2,3,4,8,16
+clc_version_min: 10
+
+dimensions: 1
+global_size: 1 0 0
+
+[test]
+name: vector store float2
+kernel_name: vstore2_test
+arg_out: 0 buffer float[2] 56.0 65.0
+arg_in: 1 buffer float[2] 56.0 65.0
+
+[test]
+name: vector store float2 with offset
+kernel_name: vstore2_offset
+arg_out: 0 buffer float[4] 0 0 56.0 65.0
+arg_in: 1 buffer float[2] 56.0 65.0
+
+[test]
+name: vector store float3
+kernel_name: vstore3_test
+arg_out: 0 buffer float[3] 56.0 65.0 12.0
+arg_in: 1 buffer float[3] 56.0 65.0 12.0
+
+[test]
+name: vector store float3 with offset
+kernel_name: vstore3_offset
+arg_out: 0 buffer float[6] 0 0 0 56.0 65.0 12.0
+arg_in: 1 buffer float[3] 56.0 65.0 12.0
+
+[test]
+name: vector store float4
+kernel_name: vstore4_test
+arg_out: 0 buffer float[4] 56.0 65.0 18.0 81.0
+arg_in: 1 buffer float[4] 56.0 65.0 18.0 81.0
+
+[test]
+name: vector store float4 with offset
+kernel_name: vstore4_offset
+arg_out: 0 buffer float[8] 0 0 0 0 56.0 65.0 18.0 81.0
+arg_in: 1 buffer float[4] 56.0 65.0 18.0 81.0
+
+[test]
+name: vector store float8
+kernel_name: vstore8_test
+arg_out: 0 buffer float[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0
+arg_in: 1 buffer float[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0
+
+[test]
+name: vector store float8 with offset
+kernel_name: vstore8_offset
+arg_out: 0 buffer float[16] 0 0 0 0 0 0 0 0 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0
+arg_in: 1 buffer float[8] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0
+
+[test]
+name: vector store float16
+kernel_name: vstore16_test
+arg_out: 0 buffer float[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0
+arg_in: 1 buffer float[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0
+
+[test]
+name: vector store float16 with offset
+kernel_name: vstore16_offset
+arg_out: 0 buffer float[32] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \
+                         56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0
+arg_in: 1 buffer float[16] 56.0 65.0 18.0 81.0 12.0 21.0 34.0 43.0 23.0 32.0 67.0 76.0 78.0 87.0 89.0 98.0
+!*/
+
+kernel void vstore2_test(global float* out, global float* in) {
+  float2 val = {in[0], in[1]};
+  vstore2(val, 0, out);
+}
+
+kernel void vstore2_offset(global float* out, global float* in) {
+  float2 val = {in[0], in[1]};
+  vstore2((float2)0, 0, out);
+  vstore2(val, 1, out);
+}
+
+kernel void vstore3_test(global float* out, global float* in) {
+  float3 val = {in[0], in[1], in[2]};
+  vstore3(val, 0, out);
+}
+
+kernel void vstore3_offset(global float* out, global float* in) {
+  float3 val = {in[0], in[1], in[2]};
+  vstore3((float3)0, 0, out);
+  vstore3(val, 1, out);
+}
+
+kernel void vstore4_test(global float* out, global float* in) {
+  float4 val = {in[0], in[1], in[2], in[3]};
+  vstore4(val, 0, out);
+}
+
+kernel void vstore4_offset(global float* out, global float* in) {
+  float4 val = {in[0], in[1], in[2], in[3]};
+  vstore4((float4)0, 0, out);
+  vstore4(val, 1, out);
+}
+
+kernel void vstore8_test(global float* out, global float* in) {
+  float8 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]};
+  vstore8(val, 0, out);
+}
+
+kernel void vstore8_offset(global float* out, global float* in) {
+  float8 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7]};
+  vstore8((float8)0, 0, out);
+  vstore8(val, 1, out);
+}
+
+kernel void vstore16_test(global float* out, global float* in) {
+  float16 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7],
+               in[8], in[9], in[10], in[11], in[12], in[13], in[14], in[15]};
+  vstore16(val, 0, out);
+}
+
+kernel void vstore16_offset(global float* out, global float* in) {
+  float16 val = {in[0], in[1], in[2], in[3], in[4], in[5], in[6], in[7],
+               in[8], in[9], in[10], in[11], in[12], in[13], in[14], in[15]};
+  vstore16((float16)0, 0, out);
+  vstore16(val, 1, out);
+}
-- 
2.7.4



More information about the Piglit mailing list