Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 7481427

Browse files
author
DEKHTIARJonathan
committed
[Benchmarking-Py] Huggingface Scripts run_all.sh cleanup and chmod +x executed on all scripts
1 parent a95239f commit 7481427

File tree

10 files changed

+7
-36
lines changed

10 files changed

+7
-36
lines changed

tftrt/benchmarking-python/huggingface/gpt2/download_all_models.sh

100644100755
File mode changed.

tftrt/benchmarking-python/tf_hub/electra/download_models.sh

100644100755
File mode changed.

tftrt/benchmarking-python/tf_hub/electra/run_all.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ ELECTRA_MODELS=(
1212
"electra_large"
1313
)
1414

15-
MODEL_DIR="/models/tf_hub/electra"
16-
DATA_DIR="/workspace/tensorflow_tensorrt/tftrt/benchmarking-python/tf_hub/electra/data"
17-
TOKENIZER_DIR="/models/tf_hub/electra/tokenizer"
18-
19-
RUN_ARGS="--input_saved_model_dir=${MODEL_DIR} --data_dir=${DATA_DIR} --tokenizer_dir=${TOKENIZER_DIR} --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
15+
RUN_ARGS="--input_saved_model_dir=/models/tf_hub/electra --data_dir=${BASE_DIR}/data --tokenizer_dir=/models/tf_hub/electra/tokenizer --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
2016
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2117
TF_XLA_ARGS="--use_xla_auto_jit"
2218

tftrt/benchmarking-python/tf_hub/movinet/base_run_inference.sh

100644100755
File mode changed.

tftrt/benchmarking-python/tf_hub/movinet/run_all.sh

100644100755
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ MOVINET_MODELS=(
1717
"a5"
1818
)
1919

20-
DATA_DIR="/tmp"
21-
INPUT_SAVED_MODEL_DIR="/models/tf_hub/movinet"
22-
BATCH_SIZE=32
23-
24-
RUN_ARGS="--data_dir=${DATA_DIR} --batch_size=${BATCH_SIZE} --display_every=50"
20+
BASE_RUN_ARGS="--input_saved_model_dir=/models/tf_hub/movinet --data_dir=/tmp --batch_size=32 --display_every=50"
2521
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2622
TF_XLA_ARGS="--use_xla_auto_jit"
2723

@@ -30,8 +26,6 @@ export TF_TRT_SHOW_DETAILED_REPORT=1
3026
for model_name in "${MOVINET_MODELS[@]}"; do
3127
echo "Processing Model: ${model_name} ..."
3228

33-
RUN_ARGS="${RUN_ARGS} --input_saved_model_dir=${INPUT_SAVED_MODEL_DIR}"
34-
3529
MODEL_DATA_EXPORT_DIR="${BASE_BENCHMARK_DATA_EXPORT_DIR}/movinet_${model_name}"
3630
mkdir -p ${MODEL_DATA_EXPORT_DIR}
3731
echo "Running "${BASE_DIR}/models/${model_name}/run_inference.sh" for the set of following benchmarks. "

tftrt/benchmarking-python/tf_hub/spice/run_all.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,12 @@ BASE_BENCHMARK_DATA_EXPORT_DIR="${BASE_DIR}/benchmark_data"
66
rm -rf ${BASE_BENCHMARK_DATA_EXPORT_DIR}
77
mkdir -p ${BASE_BENCHMARK_DATA_EXPORT_DIR}
88

9-
# Default Argument Values
10-
SAMPLES_PER_INPUT="128"
11-
BYPASS_ARGUMENTS=""
12-
MODEL_DIR="/models/tf_hub/spice"
13-
DATA_DIR="/tmp/"
14-
NUM_ITERATIONS="1000"
15-
169
# List of models. spice is a single implementation
1710
MODELS=(
1811
"spice"
1912
)
2013

21-
RUN_ARGS="--data_dir=${DATA_DIR} --input_saved_model_dir=${MODEL_DIR} --display_every=50 --samples_per_input=${SAMPLES_PER_INPUT} --num_iterations=${NUM_ITERATIONS}"
14+
RUN_ARGS="--data_dir=/tmp/ --input_saved_model_dir=/models/tf_hub/spice --display_every=50 --samples_per_input=128 --num_iterations=1000"
2215
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2316
TF_XLA_ARGS="--use_xla_auto_jit"
2417

@@ -32,7 +25,7 @@ for model_name in "${MODELS[@]}"; do
3225

3326
# ============================ TF NATIVE ============================ #
3427
# TF Native - FP32
35-
echo "Running ${BASE_DIR}/run_inference.sh"
28+
echo "Running ${BASE_DIR}/run_inference.sh"
3629
script -q -c "${BASE_DIR}/run_inference.sh ${RUN_ARGS} --precision=FP32" /dev/null | tee ${MODEL_DATA_EXPORT_DIR}/inference_tf_native_fp32.log
3730

3831
# TF Native - FP16

tftrt/benchmarking-python/tf_hub/swin_transformers/run_all.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ SWIN_MODELS=(
1818
"swin_large_patch4_window12_384"
1919
)
2020

21-
MODEL_DIR="/models/tf_hub/swin_transformers"
22-
DATA_DIR="/data/imagenet"
23-
24-
RUN_ARGS="--input_saved_model_dir=${MODEL_DIR} --data_dir=${DATA_DIR} --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
21+
RUN_ARGS="--input_saved_model_dir=/models/tf_hub/swin_transformers --data_dir=/data/imagenet --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
2522
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2623
TF_XLA_ARGS="--use_xla_auto_jit"
2724

tftrt/benchmarking-python/tf_hub/vision_transformer/run_all.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ vit_MODELS=(
1717
"vit_r50_l32_classification"
1818
)
1919

20-
MODEL_DIR="/models/tf_hub/vision_transformers"
21-
DATA_DIR="/data/imagenet"
22-
23-
RUN_ARGS="--input_saved_model_dir=${MODEL_DIR} --data_dir=${DATA_DIR} --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
20+
RUN_ARGS="--input_saved_model_dir=/models/tf_hub/vision_transformers --data_dir=/data/imagenet --debug --batch_size=32 --display_every=1 --use_synthetic_data --num_iterations=1000"
2421
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2522
TF_XLA_ARGS="--use_xla_auto_jit"
2623

tftrt/benchmarking-python/tf_hub/yamnet/run_all.sh

100644100755
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@ BASE_BENCHMARK_DATA_EXPORT_DIR="${BASE_DIR}/benchmark_data"
66
rm -rf ${BASE_BENCHMARK_DATA_EXPORT_DIR}
77
mkdir -p ${BASE_BENCHMARK_DATA_EXPORT_DIR}
88

9-
# Default Argument Values
10-
BYPASS_ARGUMENTS=""
11-
MODEL_DIR="/models/tf_hub/YAMNet"
12-
DATA_DIR="/tmp/"
13-
FRAME_LENGTH="1"
14-
159
# List of models. YAMNet is a single implementation
1610
MODELS=(
1711
"YAMNet"
1812
)
1913

20-
RUN_ARGS="--data_dir=${DATA_DIR} --input_saved_model_dir=${MODEL_DIR} --display_every=50 --frame_length=${FRAME_LENGTH}"
14+
RUN_ARGS="--data_dir=/tmp/ --input_saved_model_dir=/models/tf_hub/YAMNet --display_every=50 --frame_length=1"
2115
TF_TRT_ARGS="--use_tftrt --use_dynamic_shape --num_calib_batches=10"
2216
TF_XLA_ARGS="--use_xla_auto_jit"
2317

tftrt/benchmarking-python/tf_hub/yamnet/run_inference.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)