summaryrefslogtreecommitdiff
path: root/tests.d/beignet/polybench.test
blob: 81da100a3022be8725800cf9879d0a117428ff38 (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
# https://github.com/cavazos-lab/PolyBench-ACC

test -d ${POLYBENCH_ACC_FOLDER}/OpenCL || return 1

# Typical output (adi):
#    number of platforms is 1
#    platform name is Intel Gen OCL Driver
#    platform version is OpenCL 1.2 beignet 1.2 (git-7b151ad)
#    device id is 1354742880
#    device name is Intel(R) HD Graphics Haswell GT2 Desktop
#    GPU Time in seconds:
#    0.153892

__polybench__() {
    cd $(dirname $1)
    run_bench 0 ./$(basename $1) | tail -n 1 || return 1
}

for exe in $(find ${POLYBENCH_ACC_FOLDER}/OpenCL -name '*.exe'); do
   name="polybench:$(basename $exe .exe)"
   test_name="$test_name $name"
   eval "${name}_run() { __polybench__ $exe; }"
done
test_exec_time=20
test_invert=1 # output is duration in seconds
test_unit="s"