Skip to content

Commit

Permalink
Import onnx tests with new iree-import-onnx on onnx 1.16.1. (#240)
Browse files Browse the repository at this point in the history
This pulls in iree-org/iree#17476 which now runs
shape inference: `onnx.shape_inference.infer_shapes(model,
data_prop=True)`.

Generated from an already configured venv with:
```
python -m pip install --upgrade --find-links https://iree.dev/pip-release-links.html iree-compiler
python -m pip install --upgrade onnx
python .\onnx\import_tests.py
```
  • Loading branch information
ScottTodd authored May 28, 2024
1 parent 5d3ad0f commit 06c26d7
Show file tree
Hide file tree
Showing 68 changed files with 213 additions and 213 deletions.
55 changes: 15 additions & 40 deletions iree_tests/configs/config_onnx_cpu_llvm_sync.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
],
"skip_run_tests": [],
"expected_compile_failures": [
"test_acosh",
"test_acosh_example",
"test_adagrad",
"test_adagrad_multiple",
"test_adam",
Expand All @@ -31,10 +29,6 @@
"test_ai_onnx_ml_label_encoder_string_int",
"test_ai_onnx_ml_label_encoder_string_int_no_default",
"test_ai_onnx_ml_label_encoder_tensor_value_only_mapping",
"test_asinh",
"test_asinh_example",
"test_atanh",
"test_atanh_example",
"test_averagepool_2d_dilations",
"test_averagepool_2d_pads",
"test_averagepool_2d_precomputed_pads",
Expand Down Expand Up @@ -127,8 +121,6 @@
"test_convtranspose_autopad_same",
"test_convtranspose_kernel_shape",
"test_convtranspose_output_shape",
"test_cosh",
"test_cosh_example",
"test_cumsum_1d",
"test_cumsum_1d_exclusive",
"test_cumsum_1d_reverse",
Expand All @@ -141,6 +133,7 @@
"test_dequantizelinear_axis",
"test_dequantizelinear_blocked",
"test_dequantizelinear_e4m3fn",
"test_dequantizelinear_e4m3fn_float16",
"test_dequantizelinear_e4m3fn_zero_point",
"test_dequantizelinear_e5m2",
"test_dequantizelinear_int16",
Expand All @@ -161,15 +154,10 @@
"test_equal_string",
"test_equal_string_broadcast",
"test_gathernd_example_int32_batch_dim1",
"test_globalmaxpool",
"test_globalmaxpool_precomputed",
"test_gridsample_bicubic",
"test_gridsample_bicubic_align_corners_0_additional_1",
"test_gridsample_bicubic_align_corners_1_additional_1",
"test_gridsample_border_padding",
"test_gridsample_nearest",
"test_gridsample_nearest_align_corners_0_additional_1",
"test_gridsample_nearest_align_corners_1_additional_1",
"test_gridsample_reflection_padding",
"test_gridsample_volumetric_bilinear_align_corners_0",
"test_gridsample_volumetric_bilinear_align_corners_1",
Expand Down Expand Up @@ -215,18 +203,15 @@
"test_lstm_defaults",
"test_lstm_with_initial_bias",
"test_lstm_with_peepholes",
"test_max_one_input",
"test_maxpool_1d_default",
"test_maxpool_2d_precomputed_same_upper",
"test_maxpool_2d_same_lower",
"test_maxpool_2d_same_upper",
"test_maxpool_2d_uint8",
"test_maxpool_with_argmax_2d_precomputed_pads",
"test_maxpool_with_argmax_2d_precomputed_strides",
"test_maxunpool_export_with_output_shape",
"test_maxunpool_export_without_output_shape",
"test_melweightmatrix",
"test_min_one_input",
"test_mod_mixed_sign_float16",
"test_mod_mixed_sign_float32",
"test_mod_mixed_sign_float64",
Expand Down Expand Up @@ -262,10 +247,8 @@
"test_nonmaxsuppression_two_batches",
"test_nonmaxsuppression_two_classes",
"test_nonzero_example",
"test_onehot_negative_indices",
"test_onehot_with_axis",
"test_onehot_with_negative_axis",
"test_onehot_without_axis",
"test_optional_get_element_tensor",
"test_optional_has_element_empty_no_input_name_optional_input",
"test_optional_has_element_empty_no_input_name_tensor_input",
Expand Down Expand Up @@ -318,9 +301,7 @@
"test_reduce_log_sum_desc_axes_expanded",
"test_reduce_log_sum_empty_set",
"test_reduce_log_sum_empty_set_expanded",
"test_reduce_log_sum_exp_default_axes_keepdims_example",
"test_reduce_log_sum_exp_default_axes_keepdims_example_expanded",
"test_reduce_log_sum_exp_default_axes_keepdims_random",
"test_reduce_log_sum_exp_default_axes_keepdims_random_expanded",
"test_reduce_log_sum_exp_do_not_keepdims_example",
"test_reduce_log_sum_exp_do_not_keepdims_example_expanded",
Expand Down Expand Up @@ -393,15 +374,11 @@
"test_resize_downsample_scales_cubic_A_n0p5_exclude_outside",
"test_resize_downsample_scales_cubic_align_corners",
"test_resize_downsample_scales_cubic_antialias",
"test_resize_downsample_scales_linear",
"test_resize_downsample_scales_linear_align_corners",
"test_resize_downsample_scales_linear_antialias",
"test_resize_downsample_scales_linear_half_pixel_symmetric",
"test_resize_downsample_scales_nearest",
"test_resize_downsample_sizes_cubic",
"test_resize_downsample_sizes_cubic_antialias",
"test_resize_downsample_sizes_linear_antialias",
"test_resize_downsample_sizes_linear_pytorch_half_pixel",
"test_resize_downsample_sizes_nearest",
"test_resize_downsample_sizes_nearest_not_larger",
"test_resize_downsample_sizes_nearest_not_smaller",
Expand All @@ -412,9 +389,6 @@
"test_resize_upsample_scales_cubic_A_n0p5_exclude_outside",
"test_resize_upsample_scales_cubic_align_corners",
"test_resize_upsample_scales_cubic_asymmetric",
"test_resize_upsample_scales_linear",
"test_resize_upsample_scales_linear_align_corners",
"test_resize_upsample_scales_linear_half_pixel_symmetric",
"test_resize_upsample_scales_nearest",
"test_resize_upsample_scales_nearest_axes_2_3",
"test_resize_upsample_scales_nearest_axes_3_2",
Expand All @@ -423,7 +397,6 @@
"test_resize_upsample_sizes_nearest_axes_2_3",
"test_resize_upsample_sizes_nearest_axes_3_2",
"test_resize_upsample_sizes_nearest_ceil_half_pixel",
"test_resize_upsample_sizes_nearest_floor_align_corners",
"test_resize_upsample_sizes_nearest_not_larger",
"test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric",
"test_reversesequence_batch",
Expand Down Expand Up @@ -507,8 +480,6 @@
"test_simple_rnn_batchwise",
"test_simple_rnn_defaults",
"test_simple_rnn_with_initial_bias",
"test_sinh",
"test_sinh_example",
"test_slice",
"test_slice_default_steps",
"test_slice_end_out_of_bounds",
Expand Down Expand Up @@ -563,15 +534,6 @@
"test_training_dropout_mask",
"test_training_dropout_zero_ratio",
"test_training_dropout_zero_ratio_mask",
"test_triu",
"test_triu_neg",
"test_triu_one_row",
"test_triu_out_neg_out",
"test_triu_out_pos",
"test_triu_pos",
"test_triu_square",
"test_triu_square_neg",
"test_triu_zero",
"test_unique_not_sorted_without_axis",
"test_unique_sorted_with_axis",
"test_unique_sorted_with_axis_3d",
Expand Down Expand Up @@ -615,11 +577,15 @@
"test_elu_default",
"test_eyelike_with_dtype",
"test_gather_elements_negative_indices",
"test_gridsample_nearest",
"test_gridsample_nearest_align_corners_0_additional_1",
"test_gridsample_nearest_align_corners_1_additional_1",
"test_hardsigmoid",
"test_hardsigmoid_default",
"test_hardsigmoid_example",
"test_hardswish_expanded",
"test_max_float64",
"test_maxpool_2d_ceil_output_size_reduce_by_one",
"test_min_float64",
"test_mod_mixed_sign_int16",
"test_mod_mixed_sign_int32",
Expand All @@ -638,8 +604,16 @@
"test_qlinearmatmul_3D_int8_float32",
"test_qlinearmatmul_3D_uint8_float16",
"test_qlinearmatmul_3D_uint8_float32",
"test_reduce_log_sum_exp_default_axes_keepdims_example",
"test_reduce_log_sum_exp_default_axes_keepdims_random",
"test_reduce_min_empty_set",
"test_reduce_sum_empty_set_non_reduced_axis_zero",
"test_resize_downsample_scales_linear",
"test_resize_downsample_scales_linear_half_pixel_symmetric",
"test_resize_downsample_sizes_linear_pytorch_half_pixel",
"test_resize_upsample_scales_linear",
"test_resize_upsample_scales_linear_half_pixel_symmetric",
"test_resize_upsample_sizes_nearest_floor_align_corners",
"test_scatter_elements_with_negative_indices",
"test_sce_mean_no_weight_ii",
"test_sce_mean_no_weight_ii_log_prob",
Expand All @@ -652,6 +626,7 @@
"test_size_example",
"test_split_zero_size_splits_opset13",
"test_split_zero_size_splits_opset18",
"test_tril_zero"
"test_tril_zero",
"test_triu_zero"
]
}
4 changes: 3 additions & 1 deletion iree_tests/configs/config_pytorch_models_cpu_llvm_task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
"opt-125M", // TODO(#17344): need to regenerate .mlirbc
"resnet50", // TODO(#17344): need to regenerate .mlirbc
],
"expected_run_failures": []
"expected_run_failures": [
"sdxl-vae-decode-tank",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
"skip_compile_tests": [],
"skip_run_tests": [],
"expected_compile_failures": [],
"expected_run_failures": []
"expected_run_failures": [
"sdxl-scheduled-unet-3-tank",
]
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module {
func.func @test_dequantizelinear_e4m3fn_float16(%arg0: !torch.vtensor<[5],f8E4M3FN>, %arg1: !torch.vtensor<[],f16>) -> !torch.vtensor<[5],f16> attributes {torch.onnx_meta.ir_version = 10 : si64, torch.onnx_meta.opset_version = 21 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} {
%none = torch.constant.none
%0 = torch.operator "onnx.DequantizeLinear"(%arg0, %arg1) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[5],f8E4M3FN>, !torch.vtensor<[],f16>) -> !torch.vtensor<[5],f16>
return %0 : !torch.vtensor<[5],f16>
}
}

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--input=5xf32=@input_0.bin
--input=xf16=@input_1.bin
--expected_output=5xf16=@output_0.bin
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ module {
%20 = torch.operator "onnx.Sqrt"(%19) : (!torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,1],f32>
%21 = torch.operator "onnx.Sub"(%12, %14) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,?],f32>
%22 = torch.operator "onnx.Div"(%21, %20) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,?],f32>
%23 = torch.operator "onnx.Reshape"(%22, %3) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[?,?,?,?],f32>
%24 = torch.operator "onnx.Reshape"(%23, %11) : (!torch.vtensor<[?,?,?,?],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[?,?,?],f32>
%25 = torch.operator "onnx.Cast"(%24) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[?,?,?],f32>) -> !torch.vtensor<[?,?,?],f32>
%23 = torch.operator "onnx.Reshape"(%22, %3) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
%24 = torch.operator "onnx.Reshape"(%23, %11) : (!torch.vtensor<[3,4,2,2],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[3,4,4],f32>
%25 = torch.operator "onnx.Cast"(%24) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[3,4,4],f32>) -> !torch.vtensor<[3,4,4],f32>
%26 = torch.operator "onnx.Constant"() {torch.onnx.value_ints = [1 : si64, -1 : si64, 1 : si64]} : () -> !torch.vtensor<[3],si64>
%27 = torch.operator "onnx.Cast"(%arg1) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[4],f32>) -> !torch.vtensor<[4],f32>
%28 = torch.operator "onnx.Cast"(%arg2) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[4],f32>) -> !torch.vtensor<[4],f32>
%29 = torch.operator "onnx.Reshape"(%27, %26) : (!torch.vtensor<[4],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[1,4,1],f32>
%30 = torch.operator "onnx.Reshape"(%28, %26) : (!torch.vtensor<[4],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[1,4,1],f32>
%31 = torch.operator "onnx.Mul"(%29, %25) : (!torch.vtensor<[1,4,1],f32>, !torch.vtensor<[?,?,?],f32>) -> !torch.vtensor<[?,4,?],f32>
%32 = torch.operator "onnx.Add"(%31, %30) : (!torch.vtensor<[?,4,?],f32>, !torch.vtensor<[1,4,1],f32>) -> !torch.vtensor<[?,4,?],f32>
%33 = torch.operator "onnx.Reshape"(%32, %3) : (!torch.vtensor<[?,4,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
%31 = torch.operator "onnx.Mul"(%29, %25) : (!torch.vtensor<[1,4,1],f32>, !torch.vtensor<[3,4,4],f32>) -> !torch.vtensor<[3,4,4],f32>
%32 = torch.operator "onnx.Add"(%31, %30) : (!torch.vtensor<[3,4,4],f32>, !torch.vtensor<[1,4,1],f32>) -> !torch.vtensor<[3,4,4],f32>
%33 = torch.operator "onnx.Reshape"(%32, %3) : (!torch.vtensor<[3,4,4],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
return %33 : !torch.vtensor<[3,4,2,2],f32>
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ module {
%20 = torch.operator "onnx.Sqrt"(%19) : (!torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,1],f32>
%21 = torch.operator "onnx.Sub"(%12, %14) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,?],f32>
%22 = torch.operator "onnx.Div"(%21, %20) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[?,?,1],f32>) -> !torch.vtensor<[?,?,?],f32>
%23 = torch.operator "onnx.Reshape"(%22, %3) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[?,?,?,?],f32>
%24 = torch.operator "onnx.Reshape"(%23, %11) : (!torch.vtensor<[?,?,?,?],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[?,?,?],f32>
%25 = torch.operator "onnx.Cast"(%24) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[?,?,?],f32>) -> !torch.vtensor<[?,?,?],f32>
%23 = torch.operator "onnx.Reshape"(%22, %3) : (!torch.vtensor<[?,?,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
%24 = torch.operator "onnx.Reshape"(%23, %11) : (!torch.vtensor<[3,4,2,2],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[3,4,4],f32>
%25 = torch.operator "onnx.Cast"(%24) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[3,4,4],f32>) -> !torch.vtensor<[3,4,4],f32>
%26 = torch.operator "onnx.Constant"() {torch.onnx.value_ints = [1 : si64, -1 : si64, 1 : si64]} : () -> !torch.vtensor<[3],si64>
%27 = torch.operator "onnx.Cast"(%arg1) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[4],f32>) -> !torch.vtensor<[4],f32>
%28 = torch.operator "onnx.Cast"(%arg2) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[4],f32>) -> !torch.vtensor<[4],f32>
%29 = torch.operator "onnx.Reshape"(%27, %26) : (!torch.vtensor<[4],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[1,4,1],f32>
%30 = torch.operator "onnx.Reshape"(%28, %26) : (!torch.vtensor<[4],f32>, !torch.vtensor<[3],si64>) -> !torch.vtensor<[1,4,1],f32>
%31 = torch.operator "onnx.Mul"(%29, %25) : (!torch.vtensor<[1,4,1],f32>, !torch.vtensor<[?,?,?],f32>) -> !torch.vtensor<[?,4,?],f32>
%32 = torch.operator "onnx.Add"(%31, %30) : (!torch.vtensor<[?,4,?],f32>, !torch.vtensor<[1,4,1],f32>) -> !torch.vtensor<[?,4,?],f32>
%33 = torch.operator "onnx.Reshape"(%32, %3) : (!torch.vtensor<[?,4,?],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
%31 = torch.operator "onnx.Mul"(%29, %25) : (!torch.vtensor<[1,4,1],f32>, !torch.vtensor<[3,4,4],f32>) -> !torch.vtensor<[3,4,4],f32>
%32 = torch.operator "onnx.Add"(%31, %30) : (!torch.vtensor<[3,4,4],f32>, !torch.vtensor<[1,4,1],f32>) -> !torch.vtensor<[3,4,4],f32>
%33 = torch.operator "onnx.Reshape"(%32, %3) : (!torch.vtensor<[3,4,4],f32>, !torch.vtensor<[4],si64>) -> !torch.vtensor<[3,4,2,2],f32>
return %33 : !torch.vtensor<[3,4,2,2],f32>
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module {
%5 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<1xsi64>} : () -> !torch.vtensor<[1],si64>
%6 = torch.operator "onnx.Slice"(%2, %4, %5) : (!torch.vtensor<[2],si64>, !torch.vtensor<[1],si64>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[0],si64>
%7 = torch.operator "onnx.Sub"(%3, %5) : (!torch.vtensor<[],si64>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[1],si64>
%8 = torch.operator "onnx.ConstantOfShape"(%7) {torch.onnx.value = dense<1> : tensor<1xsi64>} : (!torch.vtensor<[1],si64>) -> !torch.vtensor<[?],si64>
%9 = torch.operator "onnx.Concat"(%6, %8) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[0],si64>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[?],si64>
%8 = torch.operator "onnx.ConstantOfShape"(%7) {torch.onnx.value = dense<1> : tensor<1xsi64>} : (!torch.vtensor<[1],si64>) -> !torch.vtensor<[2],si64>
%9 = torch.operator "onnx.Concat"(%6, %8) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[0],si64>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[2],si64>
%10 = torch.operator "onnx.Flatten"(%arg0) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[3,4],f32>) -> !torch.vtensor<[1,12],f32>
%11 = torch.operator "onnx.Cast"(%10) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[1,12],f32>) -> !torch.vtensor<[1,12],f32>
%12 = torch.operator "onnx.ReduceMean"(%11) {torch.onnx.axes = [1 : si64]} : (!torch.vtensor<[1,12],f32>) -> !torch.vtensor<[1,1],f32>
Expand All @@ -29,8 +29,8 @@ module {
%25 = torch.operator "onnx.Add"(%23, %24) : (!torch.vtensor<[1,12],f32>, !torch.vtensor<[1,12],f32>) -> !torch.vtensor<[1,12],f32>
%26 = torch.operator "onnx.Reshape"(%25, %2) : (!torch.vtensor<[1,12],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[3,4],f32>
%27 = torch.operator "onnx.Reciprocal"(%18) : (!torch.vtensor<[1,1],f32>) -> !torch.vtensor<[1,1],f32>
%28 = torch.operator "onnx.Reshape"(%12, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[1,1],f32>
%29 = torch.operator "onnx.Reshape"(%27, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[1,1],f32>
%28 = torch.operator "onnx.Reshape"(%12, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[1,1],f32>
%29 = torch.operator "onnx.Reshape"(%27, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[1,1],f32>
return %26, %28, %29 : !torch.vtensor<[3,4],f32>, !torch.vtensor<[1,1],f32>, !torch.vtensor<[1,1],f32>
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module {
%5 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<0> : tensor<1xsi64>} : () -> !torch.vtensor<[1],si64>
%6 = torch.operator "onnx.Slice"(%2, %4, %5) : (!torch.vtensor<[2],si64>, !torch.vtensor<[1],si64>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[0],si64>
%7 = torch.operator "onnx.Sub"(%3, %5) : (!torch.vtensor<[],si64>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[1],si64>
%8 = torch.operator "onnx.ConstantOfShape"(%7) {torch.onnx.value = dense<1> : tensor<1xsi64>} : (!torch.vtensor<[1],si64>) -> !torch.vtensor<[?],si64>
%9 = torch.operator "onnx.Concat"(%6, %8) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[0],si64>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[?],si64>
%8 = torch.operator "onnx.ConstantOfShape"(%7) {torch.onnx.value = dense<1> : tensor<1xsi64>} : (!torch.vtensor<[1],si64>) -> !torch.vtensor<[2],si64>
%9 = torch.operator "onnx.Concat"(%6, %8) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[0],si64>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[2],si64>
%10 = torch.operator "onnx.Flatten"(%arg0) {torch.onnx.axis = 0 : si64} : (!torch.vtensor<[3,4],f32>) -> !torch.vtensor<[1,12],f32>
%11 = torch.operator "onnx.Cast"(%10) {torch.onnx.to = 1 : si64} : (!torch.vtensor<[1,12],f32>) -> !torch.vtensor<[1,12],f32>
%12 = torch.operator "onnx.Constant"() {torch.onnx.value = dense<1> : tensor<1xsi64>} : () -> !torch.vtensor<[1],si64>
Expand All @@ -30,8 +30,8 @@ module {
%26 = torch.operator "onnx.Add"(%24, %25) : (!torch.vtensor<[1,12],f32>, !torch.vtensor<[1,12],f32>) -> !torch.vtensor<[1,12],f32>
%27 = torch.operator "onnx.Reshape"(%26, %2) : (!torch.vtensor<[1,12],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[3,4],f32>
%28 = torch.operator "onnx.Reciprocal"(%19) : (!torch.vtensor<[1,1],f32>) -> !torch.vtensor<[1,1],f32>
%29 = torch.operator "onnx.Reshape"(%13, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[1,1],f32>
%30 = torch.operator "onnx.Reshape"(%28, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[?],si64>) -> !torch.vtensor<[1,1],f32>
%29 = torch.operator "onnx.Reshape"(%13, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[1,1],f32>
%30 = torch.operator "onnx.Reshape"(%28, %9) : (!torch.vtensor<[1,1],f32>, !torch.vtensor<[2],si64>) -> !torch.vtensor<[1,1],f32>
return %27, %29, %30 : !torch.vtensor<[3,4],f32>, !torch.vtensor<[1,1],f32>, !torch.vtensor<[1,1],f32>
}
}
Expand Down
Loading

0 comments on commit 06c26d7

Please sign in to comment.