Skip to content

chore(deps): bump onnx-weekly from 1.16.0.dev20231106 to 1.16.0.dev20231120 in /requirements/ci #4595

chore(deps): bump onnx-weekly from 1.16.0.dev20231106 to 1.16.0.dev20231120 in /requirements/ci

chore(deps): bump onnx-weekly from 1.16.0.dev20231106 to 1.16.0.dev20231120 in /requirements/ci #4595

GitHub Actions / Test Results failed Nov 20, 2023 in 0s

212 fail, 2 845 skipped, 8 159 pass in 1h 0m 56s

         18 files         18 suites   1h 0m 56s ⏱️
  11 216 tests   8 159 ✔️     2 845 💤    212
160 173 runs  35 714 ✔️ 121 462 💤 2 997

Results for commit bfe6d21.

Annotations

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__any_dim_cpu_float16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16 input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_any_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (any_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16 input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_any_dim, node name: aten_any_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (any_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__all_dim_cpu_int32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 1s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32 input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int32[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32 input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int32[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__all_dim_cpu_float16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 1s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16 input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float16[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16 input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float16[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__all_dim_cpu_int64 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 1s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64 input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (int64[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64 input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (int64[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__all_dim_cpu_bool (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 1s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (bool[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (bool[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 9 runs failed: test_output_match_opinfo__all_dim_cpu_float32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 1s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 1s]
Raw output
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[3,5] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[3,5] input_0) => (bool[1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[3,2,1,2] input_0) => (bool _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
AssertionError: ONNX model is invalid. Model:
<
   ir_version: 8,
   opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
   producer_name: "pytorch",
   producer_version: "2.2.0"
>
main_graph (float[3,2,1,2] input_0) => (bool[3,1] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
>
aten_all_dim <dim>(self) => (result_1)
{
   cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
   result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_5 () => ( result_0) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_0 = Cast <to: int = 9> (all_true)
   }>
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
Rank (input) => (return_val)
{
   tmp = Shape (input)
   return_val = Size (tmp)
}
<
  domain: "pkg.onnxscript.torch_lib.common",
  opset_import: ["" : 18]
>
IsScalar (input) => (return_val)
{
   tmp = Shape (input)
   tmp_0 = Size (tmp)
   tmp_1 = Constant <value_int: int = 0> ()
   return_val = Equal (tmp_0, tmp_1)
}
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[3,5] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[3,5] input_0) => (bool[1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[3,2,1,2] input_0) => (bool _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[3,2,1,2] input_0) => (bool[1,2,1,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:522: in _capture_graph_and_evaluate_torch_script_evaluator
    onnx.checker.check_model(onnx_model, full_check=True)
.nox/test_torch_nightly/lib/python3.10/site-packages/onnx/checker.py:162: in check_model
    C.check_model(protobuf_string, full_check, skip_opset_compatibility_check)
E   onnx.onnx_cpp2py_export.shape_inference.InferenceError: [ShapeInferenceError] Inference error(s): (op_type:aten_all_dim, node name: aten_all_dim_0): [ShapeInferenceError] Inference error(s): (op_type:If, node name: n1): [ShapeInferenceError] Inference error(s): (op_type:Constant, node name: n2): [ShapeInferenceError] Attribute 'value_int' expect an integer.
E   (op_type:Reshape, node name: n4): [TypeInferenceError] Input 0 expected to have type but instead is null

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:229: in run_test_output_match
    function_output = function_executor(test_name, reference_torch_outputs)(
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:524: in _capture_graph_and_evaluate_torch_script_evaluator
    raise AssertionError(
E   AssertionError: ONNX model is invalid. Model:
E   <
E      ir_version: 8,
E      opset_import: ["pkg.onnxscript.torch_lib" : 1, "" : 18, "pkg.onnxscript.torch_lib.common" : 1],
E      producer_name: "pytorch",
E      producer_version: "2.2.0"
E   >
E   main_graph (float[3,2,1,2] input_0) => (bool[3,1] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib.aten_all_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["pkg.onnxscript.torch_lib.common" : 1,"" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_1)
E   {
E      cond = pkg.onnxscript.torch_lib.common.IsScalar (self)
E      result_1 = If (cond) <then_branch: graph = thenGraph_5 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_5 () => ( result_0) {
E         self_bool = Cast <to: int = 9> (self)
E         self_int = Cast <to: int = 7> (self_bool)
E         dim = Constant <value_int: int = @dim> ()
E         tmp = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_0 = Cast <to: int = 9> (all_true)
E      }>
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   Rank (input) => (return_val)
E   {
E      tmp = Shape (input)
E      return_val = Size (tmp)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib.common",
E     opset_import: ["" : 18]
E   >
E   IsScalar (input) => (return_val)
E   {
E      tmp = Shape (input)
E      tmp_0 = Size (tmp)
E      tmp_1 = Constant <value_int: int = 0> ()
E      return_val = Equal (tmp_0, tmp_1)
E   }

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_092_aten_isclose (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_071_aten_expand (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_103_aten_log10 (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_082_aten_full_like_dtype (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_202_aten_softmax (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_235_aten_argmax_dim (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_084_aten_gather (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_180_aten_randint_like_low_dtype (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_064_aten_div_complex (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_098_aten_lift_fresh_copy (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Identityis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Identityis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_187_aten_repeat (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Sizeis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Sizeis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_229_aten_view_copy (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_036_aten_bitwise_left_shift_int16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Castis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_104_aten_log1p (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_019_aten_any_dim (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_111_aten_logsumexp (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Ifis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_228_aten_view_as_real_copy (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Identityis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Identityis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_196_aten_select (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21

Check warning on line 0 in onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity

See this annotation in the file changed.

@github-actions github-actions / Test Results

6 out of 9 runs failed: test_script_function_passes_checker_108_aten_logaddexp2 (onnxscript.tests.function_libs.torch_lib.ops_test.TestFunctionValidity)

artifacts/Test Results (py310-onnx-weekly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-onnx-weekly-windows-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21
.nox\test_onnx_weekly\lib\site-packages\parameterized\parameterized.py:620: in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
onnxscript\tests\function_libs\torch_lib\ops_test.py:129: in test_script_function_passes_checker
    onnx.checker.check_function(function_proto)  # type: ignore[attr-defined]
.nox\test_onnx_weekly\lib\site-packages\onnx\checker.py:108: in check_function
    C.check_function(function.SerializeToString(), ctx, lexical_scope_ctx)
E   onnx.onnx_cpp2py_export.checker.ValidationError: Opset import for domain  in function op Constantis not compatible with the version imported by model. FunctionOp imports version 18 whereas model imports version 21