mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[benchmark] Remove ONNX (#146325)
ONNX exporter experiments in benchmark is obsolete and unmaintained. This PR removes it to unblock https://github.com/pytorch/pytorch/pull/146003 Pull Request resolved: https://github.com/pytorch/pytorch/pull/146325 Approved by: https://github.com/titaiwangms
This commit is contained in:
committed by
PyTorch MergeBot
parent
a79d8f8ba4
commit
9756c7d788
File diff suppressed because it is too large
Load Diff
@ -90,8 +90,6 @@ TABLE = {
|
|||||||
"inductor_max_autotune_no_cudagraphs": (
|
"inductor_max_autotune_no_cudagraphs": (
|
||||||
"--inference -n50 --inductor --inductor-compile-mode max-autotune-no-cudagraphs --disable-cudagraphs "
|
"--inference -n50 --inductor --inductor-compile-mode max-autotune-no-cudagraphs --disable-cudagraphs "
|
||||||
),
|
),
|
||||||
"torchscript-onnx": "--inference -n5 --torchscript-onnx",
|
|
||||||
"dynamo-onnx": "--inference -n5 --dynamo-onnx",
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ UNKNOWN=()
|
|||||||
|
|
||||||
# defaults
|
# defaults
|
||||||
PARALLEL=1
|
PARALLEL=1
|
||||||
export TORCH_ONNX_EXPERIMENTAL_RUNTIME_TYPE_CHECK=ERRORS
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]
|
while [[ $# -gt 0 ]]
|
||||||
do
|
do
|
||||||
@ -48,44 +47,6 @@ if [[ "$SHARD_NUMBER" == "2" ]]; then
|
|||||||
xdoctest torch.onnx --style=google --options="+IGNORE_WHITESPACE"
|
xdoctest torch.onnx --style=google --options="+IGNORE_WHITESPACE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$SHARD_NUMBER" == "2" ]]; then
|
|
||||||
# Sanity check on torchbench w/ onnx
|
|
||||||
pip install pandas
|
|
||||||
log_folder="test/.torchbench_logs"
|
|
||||||
device="cpu"
|
|
||||||
modes=("accuracy" "performance")
|
|
||||||
compilers=("dynamo-onnx" "torchscript-onnx")
|
|
||||||
suites=("huggingface" "timm_models")
|
|
||||||
|
|
||||||
mkdir -p "${log_folder}"
|
|
||||||
for mode in "${modes[@]}"; do
|
|
||||||
for compiler in "${compilers[@]}"; do
|
|
||||||
for suite in "${suites[@]}"; do
|
|
||||||
output_file="${log_folder}/${compiler}_${suite}_float32_inference_${device}_${mode}.csv"
|
|
||||||
bench_file="benchmarks/dynamo/${suite}.py"
|
|
||||||
bench_args=("--${mode}" --float32 "-d${device}" "--output=${output_file}" "--output-directory=${top_dir}" --inference -n5 "--${compiler}" --no-skip --dashboard --batch-size 1)
|
|
||||||
# Run only selected model for each suite to quickly validate the benchmark suite works as expected.
|
|
||||||
case "$suite" in
|
|
||||||
"torchbench")
|
|
||||||
bench_args+=(-k resnet18)
|
|
||||||
;;
|
|
||||||
"huggingface")
|
|
||||||
bench_args+=(-k ElectraForQuestionAnswering)
|
|
||||||
;;
|
|
||||||
"timm_models")
|
|
||||||
bench_args+=(-k lcnet_050)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown suite: ${suite}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
python "${top_dir}/${bench_file}" "${bench_args[@]}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Our CI expects both coverage.xml and .coverage to be within test/
|
# Our CI expects both coverage.xml and .coverage to be within test/
|
||||||
if [ -d .coverage ]; then
|
if [ -d .coverage ]; then
|
||||||
mv .coverage test/.coverage
|
mv .coverage test/.coverage
|
||||||
|
Reference in New Issue
Block a user