Skip to content

Commit 438ca45

Browse files
committed
Add OpenCL-CTS to base provider
1 parent d8c8ff3 commit 438ca45

2 files changed

Lines changed: 235 additions & 0 deletions

File tree

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
unit: job
2+
plugin: shell
3+
id: setup/install_opencl_cts
4+
category_id: com.canonical.plainbox::graphics
5+
_summary: Install opencl-cts snap
6+
_purpose:
7+
This job will install the opencl-cts snap, a dependency of opencl conformance testing
8+
user: root
9+
command:
10+
if snap list opencl-cts &>/dev/null; then
11+
snap refresh --edge opencl-cts
12+
else
13+
snap install --edge opencl-cts
14+
fi
15+
estimated_duration: 1m
16+
17+
plugin: resource
18+
id: graphics/cl_gpu_avail
19+
category_id: com.canonical.plainbox::graphics
20+
user: root
21+
requires:
22+
package.name == 'clinfo'
23+
_summary: Checks for GPU for OpenCL
24+
environ:
25+
# necessary for local mode
26+
XDG_SESSION_TYPE
27+
XDG_RUNTIME_DIR
28+
estimated_duration: 1s
29+
command:
30+
if clinfo --prop CL_DEVICE_TYPE | grep -q CL_DEVICE_TYPE_GPU; then
31+
echo "PASS: Found a GPU for OpenCL"
32+
else
33+
echo "FAIL: No GPU available in clinfo"
34+
exit 1
35+
fi
36+
37+
id: graphics/cl_basic
38+
depends:
39+
setup/install_opencl_cts
40+
graphics/cl_gpu_avail
41+
category_id: com.canonical.plainbox::graphics
42+
flags: simple
43+
user: root
44+
_summary: Run the basic tests from OpenCL-CTS
45+
environ:
46+
# necessary for local mode
47+
XDG_SESSION_TYPE
48+
XDG_RUNTIME_DIR
49+
estimated_duration: 5m
50+
command: opencl-cts.test basic/test_basic
51+
_siblings: [
52+
{ "id": "graphics/cl_geometrics",
53+
"_summary": "Run the geometrics tests from OpenCL-CTS",
54+
"command": "opencl-cts.test geometrics/test_geometrics" },
55+
{ "id": "graphics/cl_api",
56+
"_summary": "Run the api tests from OpenCL-CTS",
57+
"command": "opencl-cts.test api/test_api" },
58+
{ "id": "graphics/cl_compiler",
59+
"_summary": "Run the compiler tests from OpenCL-CTS",
60+
"command": "opencl-cts.test compiler/test_compiler" },
61+
{ "id": "graphics/cl_commonfns",
62+
"_summary": "Run the commonfns tests from OpenCL-CTS",
63+
"command": "opencl-cts.test commonfns/test_commonfns" },
64+
{ "id": "graphics/cl_relationals",
65+
"_summary": "Run the relationals tests from OpenCL-CTS",
66+
"command": "opencl-cts.test relationals/test_relationals" },
67+
{ "id": "graphics/cl_thread_dimensions",
68+
"_summary": "Run the thread_dimensions tests from OpenCL-CTS",
69+
"command": "opencl-cts.test thread_dimensions/test_thread_dimensions full*" },
70+
{ "id": "graphics/cl_mult_device_contexts",
71+
"_summary": "Run the mult_device_contexts tests from OpenCL-CTS",
72+
"command": "opencl-cts.test multiple_device_context/test_multiples" },
73+
{ "id": "graphics/cl_atomics",
74+
"_summary": "Run the atomics tests from OpenCL-CTS",
75+
"command": "opencl-cts.test atomics/test_atomics" },
76+
{ "id": "graphics/cl_profiling",
77+
"_summary": "Run the profiling tests from OpenCL-CTS",
78+
"command": "opencl-cts.test profiling/test_profiling" },
79+
{ "id": "graphics/cl_events",
80+
"_summary": "Run the events tests from OpenCL-CTS",
81+
"command": "opencl-cts.test events/test_events" },
82+
{ "id": "graphics/cl_allocations_single",
83+
"_summary": "Run the allocations_single tests from OpenCL-CTS",
84+
"command": "opencl-cts.test allocations/test_allocations single 5 all" },
85+
{ "id": "graphics/cl_allocations_multiple",
86+
"_summary": "Run the allocations_multiple tests from OpenCL-CTS",
87+
"command": "opencl-cts.test allocations/test_allocations multiple 5 all" },
88+
{ "id": "graphics/cl_vectors",
89+
"_summary": "Run the vectors tests from OpenCL-CTS",
90+
"command": "opencl-cts.test vectors/test_vectors" },
91+
{ "id": "graphics/cl_printf",
92+
"_summary": "Run the printf tests from OpenCL-CTS",
93+
"command": "opencl-cts.test printf/test_printf" },
94+
{ "id": "graphics/cl_dev_partition",
95+
"_summary": "Run the dev_partition tests from OpenCL-CTS",
96+
"command": "opencl-cts.test device_partition/test_device_partition" },
97+
{ "id": "graphics/cl_buffers",
98+
"_summary": "Run the buffers tests from OpenCL-CTS",
99+
"command": "opencl-cts.test buffers/test_buffers" },
100+
{ "id": "graphics/cl_cl_get_info",
101+
"_summary": "Run the cl_get_info tests from OpenCL-CTS",
102+
"command": "opencl-cts.test images/clGetInfo/test_cl_get_info" },
103+
{ "id": "graphics/cl_kernel_image_methods",
104+
"_summary": "Run the kernel_image_methods tests from OpenCL-CTS",
105+
"command": "opencl-cts.test images/kernel_image_methods/test_kernel_image_methods" },
106+
{ "id": "graphics/cl_image_streams_nearest",
107+
"_summary": "Run the image_streams_nearest tests from OpenCL-CTS",
108+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams CL_FILTER_NEAREST" },
109+
{ "id": "graphics/cl_image_streams_pitches_nearest",
110+
"_summary": "Run the image_streams_pitches_nearest tests from OpenCL-CTS",
111+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams use_pitches CL_FILTER_NEAREST" },
112+
{ "id": "graphics/cl_image_streams_max_nearest",
113+
"_summary": "Run the image_streams_max_nearest tests from OpenCL-CTS",
114+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams max_images CL_FILTER_NEAREST" },
115+
{ "id": "graphics/cl_cl_copy_images",
116+
"_summary": "Run the cl_copy_images tests from OpenCL-CTS",
117+
"command": "opencl-cts.test images/clCopyImage/test_cl_copy_images" },
118+
{ "id": "graphics/cl_cl_copy_small_images",
119+
"_summary": "Run the cl_copy_small_images tests from OpenCL-CTS",
120+
"command": "opencl-cts.test images/clCopyImage/test_cl_copy_images small_images" },
121+
{ "id": "graphics/cl_cl_copy_max_images",
122+
"_summary": "Run the cl_copy_max_images tests from OpenCL-CTS",
123+
"command": "opencl-cts.test images/clCopyImage/test_cl_copy_images max_images" },
124+
{ "id": "graphics/cl_read_write_images",
125+
"_summary": "Run the read_write_images tests from OpenCL-CTS",
126+
"command": "opencl-cts.test images/clReadWriteImage/test_cl_read_write_images" },
127+
{ "id": "graphics/cl_read_write_images_pitches",
128+
"_summary": "Run the read_write_images_pitches tests from OpenCL-CTS",
129+
"command": "opencl-cts.test images/clReadWriteImage/test_cl_read_write_images use_pitches" },
130+
{ "id": "graphics/cl_read_write_max_images",
131+
"_summary": "Run the read_write_max_images tests from OpenCL-CTS",
132+
"command": "opencl-cts.test images/clReadWriteImage/test_cl_read_write_images max_images" },
133+
{ "id": "graphics/cl_cl_fill_images",
134+
"_summary": "Run the cl_fill_images tests from OpenCL-CTS",
135+
"command": "opencl-cts.test images/clFillImage/test_cl_fill_images" },
136+
{ "id": "graphics/cl_cl_fill_images_pitches",
137+
"_summary": "Run the cl_fill_images_pitches tests from OpenCL-CTS",
138+
"command": "opencl-cts.test images/clFillImage/test_cl_fill_images use_pitches" },
139+
{ "id": "graphics/cl_cl_fill_images_max",
140+
"_summary": "Run the cl_fill_images_max tests from OpenCL-CTS",
141+
"command": "opencl-cts.test images/clFillImage/test_cl_fill_images max_images" },
142+
{ "id": "graphics/cl_samplerless_reads",
143+
"_summary": "Run the samplerless_reads tests from OpenCL-CTS",
144+
"command": "opencl-cts.test images/samplerlessReads/test_samplerless_reads" },
145+
{ "id": "graphics/cl_samplerless_reads_pitches",
146+
"_summary": "Run the samplerless_reads_pitches tests from OpenCL-CTS",
147+
"command": "opencl-cts.test images/samplerlessReads/test_samplerless_reads use_pitches" },
148+
{ "id": "graphics/cl_samplerless_reads_max",
149+
"_summary": "Run the samplerless_reads_max tests from OpenCL-CTS",
150+
"command": "opencl-cts.test images/samplerlessReads/test_samplerless_reads max_images" },
151+
{ "id": "graphics/cl_mem_host_flags",
152+
"_summary": "Run the mem_host_flags tests from OpenCL-CTS",
153+
"command": "opencl-cts.test mem_host_flags/test_mem_host_flags" },
154+
{ "id": "graphics/cl_image_streams_linear",
155+
"_summary": "Run the image_streams_linear tests from OpenCL-CTS",
156+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams CL_FILTER_LINEAR" },
157+
{ "id": "graphics/cl_image_streams_linear_pitches",
158+
"_summary": "Run the image_streams_linear_pitches tests from OpenCL-CTS",
159+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams use_pitches CL_FILTER_LINEAR" },
160+
{ "id": "graphics/cl_image_streams_linear_max",
161+
"_summary": "Run the image_streams_linear_max tests from OpenCL-CTS",
162+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams max_images CL_FILTER_LINEAR" },
163+
{ "id": "graphics/cl_gl",
164+
"_summary": "Run the gl tests from OpenCL-CTS",
165+
"command": "opencl-cts.test gl/test_gl" },
166+
{ "id": "graphics/cl_select",
167+
"_summary": "Run the select tests from OpenCL-CTS",
168+
"command": "opencl-cts.test select/test_select" },
169+
{ "id": "graphics/cl_conversions",
170+
"_summary": "Run the conversions tests from OpenCL-CTS",
171+
"command": "opencl-cts.test conversions/test_conversions" },
172+
{ "id": "graphics/cl_contractions",
173+
"_summary": "Run the contractions tests from OpenCL-CTS",
174+
"command": "opencl-cts.test contractions/test_contractions" },
175+
{ "id": "graphics/cl_bruteforce",
176+
"_summary": "Run the bruteforce tests from OpenCL-CTS",
177+
"command": "opencl-cts.test math_brute_force/test_bruteforce" },
178+
{ "id": "graphics/cl_integer_ops",
179+
"_summary": "Run the integer_ops tests from OpenCL-CTS",
180+
"command": "opencl-cts.test integer_ops/test_integer_ops" },
181+
{ "id": "graphics/cl_half",
182+
"_summary": "Run the half tests from OpenCL-CTS",
183+
"command": "opencl-cts.test half/test_half" },
184+
{ "id": "graphics/cl_c11_atomics",
185+
"_summary": "Run the c11_atomics tests from OpenCL-CTS",
186+
"command": "opencl-cts.test c11_atomics/test_c11_atomics" },
187+
{ "id": "graphics/cl_device_execution",
188+
"_summary": "Run the device_execution tests from OpenCL-CTS",
189+
"command": "opencl-cts.test device_execution/test_device_execution" },
190+
{ "id": "graphics/cl_addr_space",
191+
"_summary": "Run the addr_space tests from OpenCL-CTS",
192+
"command": "opencl-cts.test generic_address_space/test_generic_address_space" },
193+
{ "id": "graphics/cl_non_uniform_work_group",
194+
"_summary": "Run the non_uniform_work_group tests from OpenCL-CTS",
195+
"command": "opencl-cts.test non_uniform_work_group/test_non_uniform_work_group" },
196+
{ "id": "graphics/cl_pipes",
197+
"_summary": "Run the pipes tests from OpenCL-CTS",
198+
"command": "opencl-cts.test pipes/test_pipes" },
199+
{ "id": "graphics/cl_svm",
200+
"_summary": "Run the svm tests from OpenCL-CTS",
201+
"command": "opencl-cts.test SVM/test_svm" },
202+
{ "id": "graphics/cl_workgroups",
203+
"_summary": "Run the workgroups tests from OpenCL-CTS",
204+
"command": "opencl-cts.test workgroups/test_workgroups" },
205+
{ "id": "graphics/cl_device_timer",
206+
"_summary": "Run the device_timer tests from OpenCL-CTS",
207+
"command": "opencl-cts.test device_timer/test_device_timer" },
208+
{ "id": "graphics/cl_spirv_new",
209+
"_summary": "Run the spirv_new tests from OpenCL-CTS",
210+
"command": "opencl-cts.test spirv_new/test_spirv_new --spirv-binaries-path spirv_bin" },
211+
{ "id": "graphics/cl_spir",
212+
"_summary": "Run the spir tests from OpenCL-CTS",
213+
"command": "opencl-cts.test spir/test_spir" },
214+
{ "id": "graphics/cl_image_streams_mipmaps",
215+
"_summary": "Run the image_streams_mipmaps tests from OpenCL-CTS",
216+
"command": "opencl-cts.test images/kernel_read_write/test_image_streams test_mipmaps CL_FILTER_NEAREST" },
217+
{ "id": "graphics/cl_cl_copy_images_mipmaps",
218+
"_summary": "Run the cl_copy_images_mipmaps tests from OpenCL-CTS",
219+
"command": "opencl-cts.test images/clCopyImage/test_cl_copy_images test_mipmaps" },
220+
{ "id": "graphics/cl_cl_read_write_images_mipmaps",
221+
"_summary": "Run the cl_read_write_images_mipmaps tests from OpenCL-CTS",
222+
"command": "opencl-cts.test images/clReadWriteImage/test_cl_read_write_images test_mipmaps" },
223+
{ "id": "graphics/cl_subgroups",
224+
"_summary": "Run the subgroups tests from OpenCL-CTS",
225+
"command": "opencl-cts.test subgroups/test_subgroups" }]

providers/base/units/graphics/test-plan.pxu

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,3 +345,13 @@ include:
345345
after-suspend-graphics/webgl-conformance-test-.*
346346
bootstrap_include:
347347
browser_resource
348+
349+
id: opencl-test-plan
350+
unit: test plan
351+
_name: Graphics test plan for verifying OpenCL
352+
include:
353+
setup/install_opencl_cts
354+
graphics/cl_.*
355+
bootstrap_include:
356+
graphics_card
357+
executable

0 commit comments

Comments
 (0)