diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-21 10:04:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-21 22:31:16 +0100 |
commit | 532160a802c0e6d6edd8083d38b3575e1528ae3b (patch) | |
tree | 014b9cd7bb9483e971fe9559ee826b22469d095b | |
parent | 3abc138d749d2c7c4d5eb9405a6de245d3dcd5ce (diff) |
tests: Add some more OpenCL benchmarks
Found some OpenCL tests courtesy of
https://github.com/cavazos-lab/PolyBench-ACC
-rw-r--r-- | test_options.sh.sample | 4 | ||||
-rw-r--r-- | tests.d/beignet/polybench.test | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/test_options.sh.sample b/test_options.sh.sample index 28d8f94..155258b 100644 --- a/test_options.sh.sample +++ b/test_options.sh.sample @@ -64,6 +64,10 @@ GLBENCHMARK27_FOLDER=/opt/benchmarks/glbenchmark2.7.0 # LuxMark settings LUXMARK_FOLDER=/opt/benchmarks/luxmark-v3.0 +# PolyBench-ACC settings +# https://github.com/cavazos-lab/PolyBench-ACC +POLYBENCH_ACC_FOLDER=/opt/benchmarks/PolyBench-ACC + # intel-gpu-tools settings IGT_BENCHMARKS=/opt/intel-gpu-tools/benchmarks IGT_TRACES=/opt/intel-gpu-tools/traces diff --git a/tests.d/beignet/polybench.test b/tests.d/beignet/polybench.test new file mode 100644 index 0000000..bcd545a --- /dev/null +++ b/tests.d/beignet/polybench.test @@ -0,0 +1,27 @@ +# 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 $2) + for (( c=0; c<$1; c++ )); do + ./$(basename $2) | tail -n 1 || return 1 + done +} + +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__ \$1 $exe; }" +done +test_exec_time=20 +test_invert=1 # output is duration in seconds |