From 1885460776b671c4f2b8b9794fc10fd74611e440 Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Tue, 25 Oct 2022 01:48:46 +0800 Subject: [PATCH] skip some models failed in dynamic shape infer (#13400) ### Description ### Motivation and Context Some models from model zoo failed in the Linux CPU workflow. https://github.com/onnx/models/issues/562 Skip them temporarily. ###Verfication Linux CPU CI passed with beta image https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=789772&view=results **2022-10-21T13:31:17.6740348Z Skip symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/Inception-1-int8/inception-v1-12-int8.onnx** 2022-10-21T13:31:17.6740998Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/DenseNet-121-12-int8/densenet-12-int8.onnx 2022-10-21T13:31:17.6741618Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/MNIST-12/mnist-12.onnx **2022-10-21T13:31:17.6742207Z Skip symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/SSD-int8/ssd-12-int8.onnx** 2022-10-21T13:31:17.6742898Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/ResNet50_fp32/resnet50-v1-12.onnx 2022-10-21T13:31:17.6743544Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/MobileNet v2-1.0-fp32/mobilenetv2-12.onnx 2022-10-21T13:31:17.6744259Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/ResNet101_DUC_HDC-12/ResNet101-DUC-12.onnx 2022-10-21T13:31:17.6744891Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/YOLOv3-12-int8/yolov3-12-int8.onnx 2022-10-21T13:31:17.6745501Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/AlexNet/bvlcalexnet-12.onnx 2022-10-21T13:31:17.6746114Z Running symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/ZFNet-512-int8/zfnet512-12-int8.onnx **2022-10-21T13:31:17.6746768Z Skip symbolic shape inference on : /mnt/vss/_work/1/b/Release/../models/zoo/opset12/SSD-MobilenetV1-12-int8/ssd_mobilenet_v1_12-int8.onnx** --- .../onnxruntime_test_python_symbolic_shape_infer.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/onnxruntime/test/python/onnxruntime_test_python_symbolic_shape_infer.py b/onnxruntime/test/python/onnxruntime_test_python_symbolic_shape_infer.py index 97ea2df3d5..fed6892f13 100644 --- a/onnxruntime/test/python/onnxruntime_test_python_symbolic_shape_infer.py +++ b/onnxruntime/test/python/onnxruntime_test_python_symbolic_shape_infer.py @@ -34,6 +34,9 @@ def unique_element(lst): return lst[0] +skipped_models = ["SSD-MobilenetV1", "SSD-int8", "Inception-1-int8"] + + class TestSymbolicShapeInference(unittest.TestCase): def test_symbolic_shape_infer(self): @@ -43,6 +46,11 @@ class TestSymbolicShapeInference(unittest.TestCase): if filename.name.startswith("."): continue # skip some bad model files + # https://github.com/onnx/models/issues/562 + if any(model_name in str(filename) for model_name in skipped_models): + print(f"Skip symbolic shape inference on : {str(filename)}") + continue + print("Running symbolic shape inference on : " + str(filename)) SymbolicShapeInference.infer_shapes( in_mp=onnx.load(str(filename)),