Add benchmark_model tests
This commit is contained in:
parent
4a520e8b57
commit
740e8584bd
@ -21,3 +21,4 @@ build:
|
||||
args:
|
||||
tests_cmdline: ''
|
||||
convert_graphdef: ''
|
||||
benchmark_model_bin: ''
|
||||
|
@ -37,6 +37,7 @@ then:
|
||||
node_package: { $eval: as_slugid("node-package") }
|
||||
in:
|
||||
CONVERT_GRAPHDEF_MEMMAPPED: ${build.convert_graphdef}
|
||||
BENCHMARK_MODEL_BIN: ${build.benchmark_model_bin}
|
||||
DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_amd64_build}/artifacts/public
|
||||
DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public
|
||||
DEEPSPEECH_LIBCTC: https://queue.taskcluster.net/v1/task/${linux_amd64_ctc}/artifacts/public/decoder.tar.xz
|
||||
|
10
taskcluster/test-lite_benchmark_model-linux-amd64-opt.yml
Normal file
10
taskcluster/test-lite_benchmark_model-linux-amd64-opt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
build:
|
||||
template_file: test-linux-opt-base.tyml
|
||||
dependencies:
|
||||
- "test-training_upstream-linux-amd64-py27mu-opt"
|
||||
args:
|
||||
tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-lite_benchmark_model-ds-tests.sh"
|
||||
benchmark_model_bin: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.12.1c93ca24c99d7011ad639eea4cd96e4fe45e1a95.cpu/artifacts/public/lite_benchmark_model"
|
||||
metadata:
|
||||
name: "DeepSpeech Linux AMD64 CPU TF Lite benchmark_model"
|
||||
description: "Testing DeepSpeech TF Lite benchmark_model for Linux/AMD64, CPU only, optimized version"
|
20
tc-lite_benchmark_model-ds-tests.sh
Executable file
20
tc-lite_benchmark_model-ds-tests.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
source $(dirname "$0")/tc-tests-utils.sh
|
||||
|
||||
model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite}
|
||||
model_name=$(basename "${model_source}")
|
||||
|
||||
download_benchmark_model "${TASKCLUSTER_TMP_DIR}/ds"
|
||||
|
||||
export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH
|
||||
|
||||
lite_benchmark_model \
|
||||
--graph=${TASKCLUSTER_TMP_DIR}/ds/${model_name} \
|
||||
--show_flops \
|
||||
--input_layer=input_node,previous_state_c,previous_state_h \
|
||||
--input_layer_type=float,float,float \
|
||||
--input_layer_shape=1,16,19,26:1:1,494:1,494 \
|
||||
--output_layer=logits,new_state_c,new_state_h
|
@ -275,6 +275,16 @@ download_material()
|
||||
ls -hal ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/${model_name_mmap} ${TASKCLUSTER_TMP_DIR}/LDC93S1*.wav ${TASKCLUSTER_TMP_DIR}/alphabet.txt
|
||||
}
|
||||
|
||||
download_benchmark_model()
|
||||
{
|
||||
target_dir=$1
|
||||
|
||||
mkdir -p ${target_dir} || true
|
||||
|
||||
wget -P "${target_dir}" "${model_source}"
|
||||
wget -P "${target_dir}" "${BENCHMARK_MODEL_BIN}" && chmod +x ${target_dir}/*benchmark_model
|
||||
}
|
||||
|
||||
install_pyenv()
|
||||
{
|
||||
if [ -z "${PYENV_ROOT}" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user