aboutsummaryrefslogtreecommitdiff
path: root/tests/all_cl.tests
blob: fab760f6c851cc8b05d937247571b548ff62a047 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# All OpenCL tests that come with piglit, using default settings

import os

from framework.core import *
from framework.exectest import *

######
# Helper functions

def add_plain_test(group, name, args):
	group[name] = PlainExecTest(args)

def add_concurrent_test(group, name, args):
	test = PlainExecTest(args)
	test.runConcurrent = true;
	group[name] = PlainExecTest(args)

def add_plain_program_tester_test(group, name, filename):
	add_plain_test(group, name, ['cl-program-tester', 'tests/cl/program/'+filename])

######
# Collecting all tests
profile = TestProfile()

custom = Group()
api = Group()
program = Group()
profile.tests['Custom'] = custom
profile.tests['API'] = api
profile.tests['Program'] = program

######
# Tests

# Custom
add_plain_test(custom, 'Run simple kernel', ['cl-custom-run-simple-kernel'])

# API
#  Platform
add_plain_test(api, 'clGetPlatformIDs', ['cl-api-get-platform-ids'])
add_plain_test(api, 'clGetPlatformInfo', ['cl-api-get-platform-info'])
#  Device
add_plain_test(api, 'clGetDeviceIDs', ['cl-api-get-device-ids'])
add_plain_test(api, 'clGetDeviceInfo', ['cl-api-get-device-info'])
#  Context
add_plain_test(api, 'clCreateContext', ['cl-api-create-context'])
add_plain_test(api, 'clCreateContextFromType', ['cl-api-create-context-from-type'])
add_plain_test(api, 'clGetContextInfo', ['cl-api-get-context-info'])
add_plain_test(api, 'clRetainContext and clReleaseContext', ['cl-api-retain_release-context'])
#  Command Queues
add_plain_test(api, 'clCreateCommandQueue', ['cl-api-create-command-queue'])
add_plain_test(api, 'clRetainComandQueue and clReleaseCommandQueue', ['cl-api-retain_release-command-queue'])
add_plain_test(api, 'clGetCommandQueueInfo', ['cl-api-get-command-queue-info'])
#  Memory objects
add_plain_test(api, 'clCreateBuffer', ['cl-api-create-buffer'])
add_plain_test(api, 'clEnqueueReadBuffer and clEnqueueWriteBuffer', ['cl-api-enqueue-read_write-buffer'])
add_plain_test(api, 'clGetMemObjectInfo', ['cl-api-get-mem-object-info'])
add_plain_test(api, 'clGetImageInfo', ['cl-api-get-image-info'])
add_plain_test(api, 'clRetainMemObject and clReleaseMemObject', ['cl-api-retain_release-mem-object'])
#  Program
add_plain_test(api, 'clCreateProgramWithSource', ['cl-api-create-program-with-source'])
add_plain_test(api, 'clBuildProgram', ['cl-api-build-program'])
add_plain_test(api, 'clCreateKernelsInProgram', ['cl-api-create-kernels-in-program'])
add_plain_test(api, 'clGetProgramInfo', ['cl-api-get-program-info'])
add_plain_test(api, 'clGetProgramBuildInfo', ['cl-api-get-program-build-info'])
add_plain_test(api, 'clRetainProgram and clReleaseProgram', ['cl-api-retain_release-program'])
add_plain_test(api, 'clUnloadCompiler', ['cl-api-unload-compiler'])
#  Kernel
add_plain_test(api, 'clCreateKernel', ['cl-api-create-kernel'])
add_plain_test(api, 'clCreateKernelsInProgram', ['cl-api-create-kernels-in-program'])
add_plain_test(api, 'clGetKernelInfo', ['cl-api-get-kernel-info'])
add_plain_test(api, 'clGetKernelWorkGroupInfo', ['cl-api-get-kernel-work-group-info'])
add_plain_test(api, 'clRetainKernel and clReleaseKernel', ['cl-api-retain_release-kernel'])
add_plain_test(api, 'clSetKernelArg', ['cl-api-set-kernel-arg'])
#  Event
add_plain_test(api, 'clGetEventInfo', ['cl-api-get-event-info'])
add_plain_test(api, 'clRetainEvent and clReleaseEvent', ['cl-api-retain_release-event'])

# Program
add_plain_test(program, 'Run kernel with max work item sizes', ['cl-program-max-work-item-sizes'])

# Program tester
program_build = Group()
program_build_fail = Group()
program_execute = Group()
program["Build"] = program_build
program["Build"]["Fail"] = program_build_fail
program["Execute"] = program_execute
#   Build
add_plain_program_tester_test(program_build, 'Scalar data types', 'build/scalar-data-types.cl')
add_plain_program_tester_test(program_build, 'Scalar data type half', 'build/scalar-data-type-half.cl')
add_plain_program_tester_test(program_build, 'Vector data types', 'build/vector-data-types.cl')
add_plain_program_tester_test(program_build, 'Other data types',  'build/other-data-types.cl')
add_plain_program_tester_test(program_build, 'Scalar operators',  'build/scalar-operators.cl')
add_plain_program_tester_test(program_build, 'Vector operators',  'build/vector-operators.cl')
add_plain_program_tester_test(program_build, 'Scalar and vector operators',  'build/scalar-and-vector-operators.cl')
add_plain_program_tester_test(program_build, 'Macro Definitions', 'build/macro-definitions.cl')
add_plain_program_tester_test(program_build, 'Macro definitions with values', 'build/macro-definitions-with-values.cl')
add_plain_program_tester_test(program_build, 'Mixed macro definitions', 'build/mixed-macro-definitions.cl')
add_plain_program_tester_test(program_build, 'Include Directories', 'build/include-directories.cl')
add_plain_program_tester_test(program_build, 'Math Intrinsics', 'build/math-intrinsics.cl')
add_plain_program_tester_test(program_build, 'Optimization Options', 'build/optimization-options.cl')
add_plain_program_tester_test(program_build, 'Disable Warnings', 'build/disable-warnings.cl')
add_plain_program_tester_test(program_build, 'CL Version Declaration', 'build/version-declaration.cl')
add_plain_program_tester_test(program_build_fail, 'Treat warnings as errors', 'build/fail/warnings-as-errors.cl')
add_plain_program_tester_test(program_build_fail, 'Invalid CL Version Declaration', 'build/fail/invalid-version-declaration.cl')
add_plain_program_tester_test(program_build_fail, 'Increment operator on float',  'build/fail/increment-float.cl')
add_plain_program_tester_test(program_build_fail, 'Add different size vector',  'build/fail/add-different-size-vector.cl')
#   Execute
add_plain_program_tester_test(program_execute, 'Scalar arithmetic char', 'execute/scalar-arithmetic-char.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic float', 'execute/scalar-arithmetic-float.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic int', 'execute/scalar-arithmetic-int.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic long', 'execute/scalar-arithmetic-long.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic short', 'execute/scalar-arithmetic-short.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic uchar', 'execute/scalar-arithmetic-uchar.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic uint', 'execute/scalar-arithmetic-uint.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic ulong', 'execute/scalar-arithmetic-ulong.cl')
add_plain_program_tester_test(program_execute, 'Scalar arithmetic ushort', 'execute/scalar-arithmetic-ushort.cl')
add_plain_program_tester_test(program_execute, 'Vector arithmetic int4', 'execute/vector-arithmetic-int4.program_test')
add_plain_program_tester_test(program_execute, 'Vector arithmetic float4', 'execute/vector-arithmetic-float4.program_test')
add_plain_program_tester_test(program_execute, 'Vector load int4', 'execute/vector-load-int4.cl')
add_plain_program_tester_test(program_execute, 'Vector store int4', 'execute/vector-store-int4.cl')
add_plain_program_tester_test(program_execute, 'Scalar bitwise op int', 'execute/scalar-bitwise-int.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison char', 'execute/scalar-comparison-char.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison float', 'execute/scalar-comparison-float.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison int', 'execute/scalar-comparison-int.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison long', 'execute/scalar-comparison-long.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison short', 'execute/scalar-comparison-short.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison uchar', 'execute/scalar-comparison-uchar.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison uint', 'execute/scalar-comparison-uint.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison ulong', 'execute/scalar-comparison-ulong.cl')
add_plain_program_tester_test(program_execute, 'Scalar comparison ushort', 'execute/scalar-comparison-ushort.cl')
add_plain_program_tester_test(program_execute, 'Scalar load uchar', 'execute/scalar-load-uchar.cl')
add_plain_program_tester_test(program_execute, 'Scalar load float', 'execute/scalar-load-float.cl')
add_plain_program_tester_test(program_execute, 'Scalar logical op float', 'execute/scalar-logical-float.cl')
add_plain_program_tester_test(program_execute, 'Scalar logical op int', 'execute/scalar-logical-int.cl')
add_plain_program_tester_test(program_execute, 'Sizeof operator', 'execute/sizeof.cl')
add_plain_program_tester_test(program_execute, 'Comma operator', 'execute/comma.cl')
add_plain_program_tester_test(program_execute, 'Reference and dereference operators', 'execute/reference.cl')
add_plain_program_tester_test(program_execute, 'get_global_id', 'execute/get-global-id.cl')
add_plain_program_tester_test(program_execute, 'For loop', 'execute/for-loop.cl')
add_plain_program_tester_test(program_execute, 'GEGL gamma-2-2-to-linear', 'execute/gegl-gamma-2-2-to-linear.cl')
add_plain_program_tester_test(program_execute, 'GEGL rgb-gamma-u8-to-ragabaf', 'execute/gegl-rgb-gamma-u8-to-ragabaf.cl')
add_plain_program_tester_test(program_execute, 'GEGL fir-get-mean-component-1D-CL', 'execute/gegl-fir-get-mean-component-1D-CL.cl')