diff options
author | mwasilew <milosz.wasilewski@linaro.org> | 2020-11-27 09:48:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-27 09:48:02 +0000 |
commit | 43867dda7f20a8d13430588e87d528f859864188 (patch) | |
tree | 4201bdfe524bc48dd93b543b8c7648d999eabf55 | |
parent | f6f39d325b6231032ff706aebfc712e0cc7cc337 (diff) | |
parent | 3d2613ab7574ce4fb3dc56af28a23f171628d0f9 (diff) |
Merge pull request #249 from K1504296/ML
ml-bench creation
-rw-r--r-- | automated/linux/ml-bench/tvm-bench.sh | 41 | ||||
-rw-r--r-- | automated/linux/ml-bench/tvm-bench.yaml | 23 |
2 files changed, 64 insertions, 0 deletions
diff --git a/automated/linux/ml-bench/tvm-bench.sh b/automated/linux/ml-bench/tvm-bench.sh new file mode 100644 index 0000000..c63228f --- /dev/null +++ b/automated/linux/ml-bench/tvm-bench.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# shellcheck disable=SC1091 + +. ../../lib/sh-test-lib +OUTPUT="$(pwd)/output" + +usage() { + echo "Usage: $0 [-s <true|false>]" 1>&2 + exit 1 +} + +#default values +TVM_WHEEL='https://github.com/tlc-pack/tlcpack/releases/download/v0.7.dev1/tlcpack-0.7.dev1-cp38-cp38-manylinux2010_x86_64.whl' +TVM_BENCH='https://github.com/tom-gall/tvm-bench.git' +SKIP_INSTALL=false + +while getopts "s:a:t:" o; do + case "$o" in + a) TVM_WHEEL="${OPTARG}" ;; + t) TVM_BENCH="${OPTARG}" ;; + s) SKIP_INSTALL="{$OPTARG}" ;; + *) usage ;; + esac +done +# f) TF_BENCH="${OPTARG}" ;; +# d) TVM_INSTALL="${OPTARG}" ;; +! check_root && error_msg "You need to be root to run this script." +create_out_dir "${OUTPUT}" + +pkgs="wget ntp python3 python3-pip git" +install_deps "${pkgs}" "${SKIP_INSTALL}" +if [ -n "${TVM_BENCH}" ]; then + git clone "${TVM_BENCH}" + if [ -n "${TVM_WHEEL}" ]; then + wget "${TVM_WHEEL}" + pip3 install "tlcpack*.whl" + fi + cd tvm-bench || exit + python3 mobilenet-v1.0.5-acl-float.py +fi diff --git a/automated/linux/ml-bench/tvm-bench.yaml b/automated/linux/ml-bench/tvm-bench.yaml new file mode 100644 index 0000000..17cd023 --- /dev/null +++ b/automated/linux/ml-bench/tvm-bench.yaml @@ -0,0 +1,23 @@ +metadata: + format: Lava-Test Test Definition 1.0 + name: tvm-benchmark + description: "Part of ml-bench, tvm-bench tests various ml benchmarks using tvm." + maintainer: + - theodore.grey@linaro.org + os: + - debian + scope: + - functional + devices: + - synquacer + - dragonboard-845c + - hi960-hikey + - stm32mp1 +params: + TVM_WHEEL: 'https://github.com/tlc-pack/tlcpack/releases/download/v0.7.dev1/tlcpack-0.7.dev1-cp38-cp38-manylinux2010_x86_64.whl' + TVM_BENCH: 'https://github.com/tom-gall/tvm-bench.git' + SKIP_INSTALL: false +run: + steps: + - cd ./automated/linux/ml-bench/ + - ./tvm-bench.sh -s "${SKIP_INSTALL}" -a "${TVM_WHEEL}" -t "${TVM_BENCH}" |