diff --git a/test/py/onnx_backend_test.py b/test/py/onnx_backend_test.py index 4ae7203b6da..8d44249ad80 100644 --- a/test/py/onnx_backend_test.py +++ b/test/py/onnx_backend_test.py @@ -104,9 +104,168 @@ def disabled_tests_onnx_1_10_0(backend_test): backend_test.exclude(r'test_shape_start_negative_1_cpu') -def disabled_tests_onnx_1_12_0(backend_test): +def disabled_tests_onnx_1_11_0(backend_test): + # crash backend_test.exclude(r'test_scatter_elements_with_duplicate_indices_cpu') + # fails + backend_test.exclude(r'test_roialign_aligned_false_cpu') + backend_test.exclude(r'test_roialign_aligned_true_cpu') + backend_test.exclude(r'test_scatternd_add_cpu') + backend_test.exclude(r'test_scatternd_multiply_cpu') + + # errors + backend_test.exclude(r'test_identity_opt_cpu') + backend_test.exclude(r'test_if_opt_cpu') + + +def disabled_tests_onnx_1_12_0(backend_test): + pass + + +def disabled_tests_onnx_1_13_0(backend_test): + # fails + backend_test.exclude(r'test_reduce_l1_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_l1_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_l1_keep_dims_example_cpu') + backend_test.exclude(r'test_reduce_l1_keep_dims_random_cpu') + backend_test.exclude(r'test_reduce_l1_negative_axes_keep_dims_example_cpu') + backend_test.exclude(r'test_reduce_l1_negative_axes_keep_dims_random_cpu') + backend_test.exclude(r'test_reduce_l2_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_l2_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_l2_keep_dims_example_cpu') + backend_test.exclude(r'test_reduce_l2_keep_dims_random_cpu') + backend_test.exclude(r'test_reduce_l2_negative_axes_keep_dims_example_cpu') + backend_test.exclude(r'test_reduce_l2_negative_axes_keep_dims_random_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_sum_square_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_sum_square_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_sum_square_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_sum_square_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_sum_square_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_sum_square_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_scatternd_max_cpu') + backend_test.exclude(r'test_scatternd_min_cpu') + + # errors + backend_test.exclude(r'test_constant_pad_axes_cpu') + backend_test.exclude(r'test_elu_default_expanded_ver18_cpu') + backend_test.exclude(r'test_elu_example_expanded_ver18_cpu') + backend_test.exclude(r'test_elu_expanded_ver18_cpu') + backend_test.exclude(r'test_hardsigmoid_default_expanded_ver18_cpu') + backend_test.exclude(r'test_hardsigmoid_example_expanded_ver18_cpu') + backend_test.exclude(r'test_hardsigmoid_expanded_ver18_cpu') + backend_test.exclude(r'test_leakyrelu_default_expanded_cpu') + backend_test.exclude(r'test_leakyrelu_example_expanded_cpu') + backend_test.exclude(r'test_leakyrelu_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_default_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_l1_default_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_default_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_l1_default_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_do_not_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_do_not_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_keep_dims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_keep_dims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_negative_axes_keep_dims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l1_negative_axes_keep_dims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_default_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_l2_default_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_default_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_l2_default_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_do_not_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_do_not_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_keep_dims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_keep_dims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_negative_axes_keep_dims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_l2_negative_axes_keep_dims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_asc_axes_cpu') + backend_test.exclude(r'test_reduce_log_sum_asc_axes_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_default_cpu') + backend_test.exclude(r'test_reduce_log_sum_default_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_desc_axes_cpu') + backend_test.exclude(r'test_reduce_log_sum_desc_axes_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_default_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_default_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_default_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_default_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_do_not_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_do_not_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_negative_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_exp_negative_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_log_sum_negative_axes_cpu') + backend_test.exclude(r'test_reduce_log_sum_negative_axes_expanded_cpu') + backend_test.exclude(r'test_reduce_max_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_max_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_max_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_max_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_max_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_max_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_mean_default_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_mean_default_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_mean_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_mean_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_mean_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_mean_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_mean_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_mean_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_min_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_min_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_min_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_min_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_min_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_min_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_prod_do_not_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_prod_do_not_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_prod_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_prod_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_prod_negative_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_prod_negative_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_sum_square_default_axes_keepdims_example_cpu') + backend_test.exclude(r'test_reduce_sum_square_default_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_default_axes_keepdims_random_cpu') + backend_test.exclude(r'test_reduce_sum_square_default_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_do_not_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_do_not_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_negative_axes_keepdims_example_expanded_cpu') + backend_test.exclude(r'test_reduce_sum_square_negative_axes_keepdims_random_expanded_cpu') + backend_test.exclude(r'test_relu_expanded_ver18_cpu') + backend_test.exclude(r'test_scatter_elements_with_reduction_max_cpu') + backend_test.exclude(r'test_scatter_elements_with_reduction_min_cpu') + backend_test.exclude(r'test_selu_default_expanded_ver18_cpu') + backend_test.exclude(r'test_selu_example_expanded_ver18_cpu') + backend_test.exclude(r'test_selu_expanded_ver18_cpu') + backend_test.exclude(r'test_softsign_example_expanded_ver18_cpu') + backend_test.exclude(r'test_softsign_expanded_ver18_cpu') + backend_test.exclude(r'test_thresholdedrelu_default_expanded_ver18_cpu') + backend_test.exclude(r'test_thresholdedrelu_example_expanded_ver18_cpu') + backend_test.exclude(r'test_thresholdedrelu_expanded_ver18_cpu') + + +def disabled_tests_onnx_1_14_0(backend_test): + # fails + backend_test.exclude(r'test_averagepool_2d_dilations_cpu') + backend_test.exclude(r'test_roialign_mode_max_cpu') + + # errors + backend_test.exclude(r'test_constant_pad_negative_axes_cpu') + backend_test.exclude(r'test_dequantizelinear_e4m3fn_cpu') + backend_test.exclude(r'test_dequantizelinear_e5m2_cpu') + backend_test.exclude(r'test_equal_string_broadcast_cpu') + backend_test.exclude(r'test_equal_string_cpu') + backend_test.exclude(r'test_quantizelinear_e4m3fn_cpu') + backend_test.exclude(r'test_quantizelinear_e5m2_cpu') + backend_test.exclude(r'test_softplus_example_expanded_ver18_cpu') + backend_test.exclude(r'test_softplus_expanded_ver18_cpu') + def create_backend_test(testname=None, target_device=None): if target_device is not None: @@ -331,9 +490,17 @@ def create_backend_test(testname=None, target_device=None): if version.parse(onnx.__version__) >= version.parse("1.10.0"): disabled_tests_onnx_1_10_0(backend_test) + if version.parse(onnx.__version__) >= version.parse("1.11.0"): + disabled_tests_onnx_1_11_0(backend_test) + if version.parse(onnx.__version__) >= version.parse("1.12.0"): disabled_tests_onnx_1_12_0(backend_test) + if version.parse(onnx.__version__) >= version.parse("1.13.0"): + disabled_tests_onnx_1_13_0(backend_test) + + if version.parse(onnx.__version__) >= version.parse("1.14.0"): + disabled_tests_onnx_1_14_0(backend_test) # import all test cases at global scope to make # them visible to python.unittest. diff --git a/tools/install_prereqs.sh b/tools/install_prereqs.sh index 152ccb3527d..3714e737a74 100755 --- a/tools/install_prereqs.sh +++ b/tools/install_prereqs.sh @@ -80,8 +80,8 @@ rbuild prepare -d $PREFIX -s develop if [[ ("${ID}" != "sles") ]]; then export CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=ON" -pip3 install onnx==1.10.2 numpy==1.21.6 typing==3.7.4 pytest==6.0.1 packaging==23.0 +pip3 install onnx==1.14.0 numpy==1.21.6 typing==3.7.4 pytest==6.0.1 packaging==23.0 # pin version of protobuf in Python for onnx runtime unit tests between dist versions -pip3 install protobuf==3.20.0 +pip3 install protobuf==3.20.2 fi