Add batch size script argument for standalone tests (#13841)

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
Adrian Wälchli 2022-07-27 14:36:22 +02:00 committed by GitHub
parent 25de48802f
commit 2a24b906ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 1 deletions

View File

@ -15,6 +15,20 @@
set -e
# THIS FILE ASSUMES IT IS RUN INSIDE THE tests/tests_pytorch DIRECTORY
# Batch size for testing: Determines how many standalone test invocations run in parallel
test_batch_size=6
while getopts "b:" opt; do
case $opt in
b)
test_batch_size=$OPTARG;;
*)
echo "Usage: $(basename $0) [-b batch_size]"
exit 1;;
esac
done
shift $((OPTIND-1))
# this environment variable allows special tests to run
export PL_RUN_STANDALONE_TESTS=1
# python arguments
@ -40,7 +54,6 @@ parametrizations_arr=($parametrizations)
# tests to skip - space separated
blocklist='profilers/test_profiler.py::test_pytorch_profiler_nested_emit_nvtx utilities/test_warnings.py'
report=''
test_batch_size=6
rm -f standalone_test_output.txt # in case it exists, remove it
function show_batched_output {