blob: 31f445e86d5f500966cb0270cd8220afcd15f072 (
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
|
#!/bin/sh
set -u
set -e
tests="\
xamax \
xasum \
xaxpy \
xaxpybatched \
xcol2im \
xconvgemm \
xcopy \
xdot \
xdotc \
xdotu \
xgbmv \
xgemm \
xgemmbatched \
xgemmstridedbatched \
xgemv \
xger \
xgerc \
xgeru \
xhad \
xhbmv \
xhemm \
xhemv \
xher \
xher2 \
xher2k \
xherk \
xhpmv \
xhpr \
xhpr2 \
xim2col \
xnrm2 \
xomatcopy \
xsbmv \
xscal \
xspmv \
xspr \
xspr2 \
xswap \
xsymm \
xsymv \
xsyr \
xsyr2 \
xsyr2k \
xsyrk \
xtbmv \
xtpmv \
xtrmm \
xtrmv \
xtrsm \
xtrsv"
gcc -std=c11 -Wall -pedantic -o ${AUTOPKGTEST_TMP}/find_pocl debian/tests/find_pocl.c -lOpenCL
pocl_platform_and_device=$(${AUTOPKGTEST_TMP}/find_pocl)
pocl_platform=$(echo $pocl_platform_and_device | awk '{ print $1 }')
pocl_device=$(echo $pocl_platform_and_device | awk '{ print $2 }')
echo "POCL is platform ${pocl_platform}, device ${pocl_device}."
set +e
errors=0
for test in $tests
do
echo "--------------------------------------------------"
echo "Running test set ${test}."
echo "--------------------------------------------------"
output=$(/usr/bin/clblast_test_${test} -platform $pocl_platform -device $pocl_device)
if [ $? -ne 0 ]
then
errors=$(($errors+1))
fi
printf "%s\n" "$output" | ansi2txt
done
echo "--------------------------------------------------"
echo "$errors errors encounted."
echo "--------------------------------------------------"
if [ $errors -ne 0 ]
then
exit 1
fi
|