Skip to content

Add Ops(_native_batch_norm_legit_functional) | feat(torchlib) (#1143) #477

Add Ops(_native_batch_norm_legit_functional) | feat(torchlib) (#1143)

Add Ops(_native_batch_norm_legit_functional) | feat(torchlib) (#1143) #477

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

55 fail, 2 730 skipped, 8 359 pass in 1h 44m 5s

         18 files  ±         0         18 suites  ±0   1h 44m 5s ⏱️ + 41m 11s
  11 144 tests +       11    8 359 ✔️ +     10      2 730 💤  -          1       55 +  2 
175 790 runs  +16 250  40 900 ✔️ +4 160  132 844 💤 +12 111  2 046  - 21 

Results for commit 88ee668. ± Comparison against earlier commit fdef96c.

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__any_dim_cpu_int64 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 7s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 2s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 3s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__all_dim_cpu_bool (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 7s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__all_dim_cpu_int64 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__all_dim_cpu_float16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__all_dim_cpu_int32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 9s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__any_dim_cpu_float16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 2s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 3s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__any_dim_cpu_int32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 3s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__any_dim_cpu_float32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 2s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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 10 runs failed: test_output_match_opinfo__any_dim_cpu_int64 (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 0s]
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 (int64 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int64[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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 10 runs failed: test_output_match_opinfo__any_dim_cpu_float32 (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 (float 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (float[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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 10 runs failed: test_output_match_opinfo__any_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 0s]
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 (bool 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (bool[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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 10 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 2s]
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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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.TestOutputConsistencyEagerCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__all_dim_cpu_float32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 8s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 3s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 4s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:347: in aten_all_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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 10 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 3s]
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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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 10 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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.TestOutputConsistencyEagerCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__ops_aten__softmax_half_cpu_float16 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

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
Failed: Unexpected success
Unexpected success

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 10 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 2s]
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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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 10 runs failed: test_output_match_opinfo__any_dim_cpu_int32 (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 0s]
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 (int32 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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 (int32[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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, 1, 2, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [0, -1], keepdim: int = 1> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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_any_dim <dim: ints = [1, 3], keepdim: int = 0> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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

1 out of 10 runs failed: test_output_match_opinfo__constant_pad_nd_cpu_bool (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py310-ort-nightly-ubuntu-latest)/pytest.xml [took 36s]
Raw output
EOFError
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:534: in _capture_graph_and_evaluate_torch_script_evaluator
    return _safe_ort_session_run(onnx_model.SerializeToString(), ort_inputs)
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:338: in _safe_ort_session_run
    manager = multiprocessing.Manager()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/multiprocessing/context.py:57: in Manager
    m.start()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/multiprocessing/managers.py:566: in start
    self._address = reader.recv()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/multiprocessing/connection.py:250: in recv
    buf = self._recv_bytes()
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/multiprocessing/connection.py:414: in _recv_bytes
    buf = self._recv(4)
/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/multiprocessing/connection.py:383: in _recv
    raise EOFError
E   EOFError

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 10 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 3s]
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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_all_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_all_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         all_true = ReduceMin <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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.TestOutputConsistencyEagerCPU

See this annotation in the file changed.

@github-actions github-actions / Test Results

3 out of 10 runs failed: test_output_match_opinfo__any_dim_cpu_bool (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyEagerCPU)

artifacts/Test Results (py310-torch-nightly-macos-latest)/pytest.xml [took 9s]
artifacts/Test Results (py310-torch-nightly-ubuntu-latest)/pytest.xml [took 2s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 3s]
Raw output
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'
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:584: in executor
    return function(*args, **kwargs)
onnxscript/values.py:519: in __call__
    return evaluator.default().eval_function(self, args, kwargs)
onnxscript/evaluator.py:309: in eval_function
    result = function.function(*adapted_args, **adapted_kwargs)
onnxscript/function_libs/torch_lib/ops/core.py:473: in aten_any_dim
    dims = op.Reshape(dim, op.Constant(value_ints=[-1]))
onnxscript/onnx_opset/_impl/opset14.py:909: in Reshape
    return op(*self._prepare_inputs(schema, data, shape), allowzero=allowzero)
onnxscript/values.py:297: in __call__
    return evaluator.default().eval(schema, args, kwargs)
onnxscript/evaluator.py:196: in eval
    outputs = self._eval(schema, inputs, attributes, closure)
onnxscript/evaluator.py:510: in _eval
    return _call_ort(schema, inputs, attributes, closure)
onnxscript/evaluator.py:471: in _call_ort
    model, session_run_input, inputs = _prepare_model_and_inputs_for_eager(
onnxscript/evaluator.py:411: in _prepare_model_and_inputs_for_eager
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:411: in <listcomp>
    args = [_onnxscript_to_numpy_value(x) for x in args]
onnxscript/evaluator.py:377: in _onnxscript_to_numpy_value
    raise TypeError(
E   TypeError: Unexpected onnxscript value type '<class 'tuple'>'.Valid value types are 'Tensor | list[Tensor] | None | np.ndarray | list[np.ndarray]'

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

1 out of 10 runs failed: test_output_match_opinfo__arange_start_step_cpu_float32 (onnxscript.tests.function_libs.torch_lib.ops_test.TestOutputConsistencyFullGraphCPU)

artifacts/Test Results (py38-ubuntu-latest)/pytest.xml [took 33s]
Raw output
EOFError
EOFError
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:534: in _capture_graph_and_evaluate_torch_script_evaluator
    return _safe_ort_session_run(onnx_model.SerializeToString(), ort_inputs)
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:339: in _safe_ort_session_run
    return_dict = manager.dict()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/managers.py:741: in temp
    proxy = proxytype(
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/managers.py:809: in __init__
    self._incref()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/managers.py:863: in _incref
    conn = self._Client(self._token.address, authkey=self._authkey)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:508: in Client
    answer_challenge(c, authkey)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:752: in answer_challenge
    message = connection.recv_bytes(256)         # reject large message
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:216: in recv_bytes
    buf = self._recv_bytes(maxlength)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:414: in _recv_bytes
    buf = self._recv(4)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:383: in _recv
    raise EOFError
E   EOFError
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:534: in _capture_graph_and_evaluate_torch_script_evaluator
    return _safe_ort_session_run(onnx_model.SerializeToString(), ort_inputs)
onnxscript/tests/function_libs/torch_lib/ops_test_common.py:338: in _safe_ort_session_run
    manager = multiprocessing.Manager()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/context.py:57: in Manager
    m.start()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/managers.py:583: in start
    self._address = reader.recv()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:250: in recv
    buf = self._recv_bytes()
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:414: in _recv_bytes
    buf = self._recv(4)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/multiprocessing/connection.py:383: in _recv
    raise EOFError
E   EOFError

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 10 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 1s]
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
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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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: ["" : 18]
>
aten_any_dim <dim>(self) => (result_2)
{
   tmp = Shape (self)
   self_rank = Size (tmp)
   int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
   int64_0_cast = CastLike (int64_0, self_rank)
   cond = Equal (self_rank, int64_0_cast)
   result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
      result = Cast <to: int = 9> (self)
   }, else_branch: graph = elseGraph_6 () => ( result_1) {
      self_bool = Cast <to: int = 9> (self)
      self_int = Cast <to: int = 7> (self_bool)
      dim = Constant <value_int: int = @dim> ()
      tmp_0 = Constant <value_ints: ints = [-1]> ()
      dims = Reshape (dim, tmp_0)
      any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
      result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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:157: 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: n5): [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: ["" : 18]
E   >
E   aten_any_dim <dim>(self) => (result_2)
E   {
E      tmp = Shape (self)
E      self_rank = Size (tmp)
E      int64_0 = Constant <value: tensor = int64 int64_0 {0}> ()
E      int64_0_cast = CastLike (int64_0, self_rank)
E      cond = Equal (self_rank, int64_0_cast)
E      result_2 = If (cond) <then_branch: graph = thenGraph_6 () => ( result) {
E         result = Cast <to: int = 9> (self)
E      }, else_branch: graph = elseGraph_6 () => ( result_1) {
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_0 = Constant <value_ints: ints = [-1]> ()
E         dims = Reshape (dim, tmp_0)
E         any_true = ReduceMax <keepdims: int = @keepdim> (self_int, dims)
E         result_1 = 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

All 3 runs failed: test_output_match_opinfo__logit_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 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
AssertionError: Tensor-likes are not close!

Mismatched elements: 16 / 125 (12.8%)
Greatest absolute difference: 0.000732421875 at index (1, 2, 2) (up to 1e-05 allowed)
Greatest relative difference: 0.10821533203125 at index (3, 3, 3) (up to 0.001 allowed)
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[5,5,5] input_0) => (float16[5,5,5] _val_1) {
   _val_1 = pkg.onnxscript.torch_lib._aten_logit_clamp_onnx <eps: float = 0.2> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["" : 18]
>
_aten_logit_clamp_onnx <eps>(self) => (return_val)
{
   const = Constant <value: tensor = float const {1}> ()
   eps = Constant <value_float: float = @eps> ()
   tmp = Sub (const, eps)
   tmp_0 = LessOrEqual (self, tmp)
   const_1 = Constant <value: tensor = float const_1 {1}> ()
   eps_2 = Constant <value_float: float = @eps> ()
   tmp_3 = Sub (const_1, eps_2)
   temporary_self = Where (tmp_0, self, tmp_3)
   eps_4 = Constant <value_float: float = @eps> ()
   eps_4_cast = CastLike (eps_4, temporary_self)
   tmp_5 = Less (temporary_self, eps_4_cast)
   eps_6 = Constant <value_float: float = @eps> ()
   eps_6_cast = CastLike (eps_6, temporary_self)
   z = Where (tmp_5, eps_6_cast, temporary_self)
   const_7 = Constant <value: tensor = float const_7 {1}> ()
   const_7_cast = CastLike (const_7, z)
   tmp_8 = Sub (const_7_cast, z)
   tmp_9 = Div (z, tmp_8)
   return_val = Log (tmp_9)
}
<
  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 input_0) => (float16 _val_1) {
   _val_1 = pkg.onnxscript.torch_lib._aten_logit_clamp_onnx <eps: float = 0.2> (input_0)
}
<
  domain: "pkg.onnxscript.torch_lib",
  opset_import: ["" : 18]
>
_aten_logit_clamp_onnx <eps>(self) => (return_val)
{
   const = Constant <value: tensor = float const {1}> ()
   eps = Constant <value_float: float = @eps> ()
   tmp = Sub (const, eps)
   tmp_0 = LessOrEqual (self, tmp)
   const_1 = Constant <value: tensor = float const_1 {1}> ()
   eps_2 = Constant <value_float: float = @eps> ()
   tmp_3 = Sub (const_1, eps_2)
   temporary_self = Where (tmp_0, self, tmp_3)
   eps_4 = Constant <value_float: float = @eps> ()
   eps_4_cast = CastLike (eps_4, temporary_self)
   tmp_5 = Less (temporary_self, eps_4_cast)
   eps_6 = Constant <value_float: float = @eps> ()
   eps_6_cast = CastLike (eps_6, temporary_self)
   z = Where (tmp_5, eps_6_cast, temporary_self)
   const_7 = Constant <value: tensor = float const_7 {1}> ()
   const_7_cast = CastLike (const_7, z)
   tmp_8 = Sub (const_7_cast, z)
   tmp_9 = Div (z, tmp_8)
   return_val = Log (tmp_9)
}
<
  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.py:266: in run_test_output_match
    torch.testing.assert_close(
E   AssertionError: Tensor-likes are not close!
E   
E   Mismatched elements: 16 / 125 (12.8%)
E   Greatest absolute difference: 0.000732421875 at index (1, 2, 2) (up to 1e-05 allowed)
E   Greatest relative difference: 0.10821533203125 at index (3, 3, 3) (up to 0.001 allowed)
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:157: 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_logit_clamp_onnx, node name: _aten_logit_clamp_onnx_0): [ShapeInferenceError] (op_type:Where, node name: n7): Y has inconsistent type tensor(float)

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[5,5,5] input_0) => (float16[5,5,5] _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib._aten_logit_clamp_onnx <eps: float = 0.2> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   _aten_logit_clamp_onnx <eps>(self) => (return_val)
E   {
E      const = Constant <value: tensor = float const {1}> ()
E      eps = Constant <value_float: float = @eps> ()
E      tmp = Sub (const, eps)
E      tmp_0 = LessOrEqual (self, tmp)
E      const_1 = Constant <value: tensor = float const_1 {1}> ()
E      eps_2 = Constant <value_float: float = @eps> ()
E      tmp_3 = Sub (const_1, eps_2)
E      temporary_self = Where (tmp_0, self, tmp_3)
E      eps_4 = Constant <value_float: float = @eps> ()
E      eps_4_cast = CastLike (eps_4, temporary_self)
E      tmp_5 = Less (temporary_self, eps_4_cast)
E      eps_6 = Constant <value_float: float = @eps> ()
E      eps_6_cast = CastLike (eps_6, temporary_self)
E      z = Where (tmp_5, eps_6_cast, temporary_self)
E      const_7 = Constant <value: tensor = float const_7 {1}> ()
E      const_7_cast = CastLike (const_7, z)
E      tmp_8 = Sub (const_7_cast, z)
E      tmp_9 = Div (z, tmp_8)
E      return_val = Log (tmp_9)
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:157: 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_logit_clamp_onnx, node name: _aten_logit_clamp_onnx_0): [ShapeInferenceError] (op_type:Where, node name: n7): Y has inconsistent type tensor(float)

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) => (float16 _val_1) {
E      _val_1 = pkg.onnxscript.torch_lib._aten_logit_clamp_onnx <eps: float = 0.2> (input_0)
E   }
E   <
E     domain: "pkg.onnxscript.torch_lib",
E     opset_import: ["" : 18]
E   >
E   _aten_logit_clamp_onnx <eps>(self) => (return_val)
E   {
E      const = Constant <value: tensor = float const {1}> ()
E      eps = Constant <value_float: float = @eps> ()
E      tmp = Sub (const, eps)
E      tmp_0 = LessOrEqual (self, tmp)
E      const_1 = Constant <value: tensor = float const_1 {1}> ()
E      eps_2 = Constant <value_float: float = @eps> ()
E      tmp_3 = Sub (const_1, eps_2)
E      temporary_self = Where (tmp_0, self, tmp_3)
E      eps_4 = Constant <value_float: float = @eps> ()
E      eps_4_cast = CastLike (eps_4, temporary_self)
E      tmp_5 = Less (temporary_self, eps_4_cast)
E      eps_6 = Constant <value_float: float = @eps> ()
E      eps_6_cast = CastLike (eps_6, temporary_self)
E      z = Where (tmp_5, eps_6_cast, temporary_self)
E      const_7 = Constant <value: tensor = float const_7 {1}> ()
E      const_7_cast = CastLike (const_7, z)
E      tmp_8 = Sub (const_7_cast, z)
E      tmp_9 = Div (z, tmp_8)
E      return_val = Log (tmp_9)
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

All 3 runs failed: test_output_match_opinfo__native_batch_norm_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 0s]
artifacts/Test Results (py310-torch-nightly-windows-latest)/pytest.xml [took 0s]
Raw output
AssertionError: Output 0 mismatch
AssertionError: Output 0 mismatch
AssertionError: Output 0 mismatch
onnxscript/tests/function_libs/torch_lib/ops_test.py:266: in run_test_output_match
    torch.testing.assert_close(
E   AssertionError: Tensor-likes are not close!
E   
E   Mismatched elements: 10 / 125 (8.0%)
E   Greatest absolute difference: 0.002197265625 at index (2, 1, 2) (up to 1e-05 allowed)
E   Greatest relative difference: 0.01470947265625 at index (1, 0, 0) (up to 0.001 allowed)

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:280: in run_test_output_match
    raise AssertionError(f"Output {j} mismatch") from e
E   AssertionError: Output 0 mismatch
onnxscript/tests/function_libs/torch_lib/ops_test.py:266: in run_test_output_match
    torch.testing.assert_close(
E   AssertionError: Tensor-likes are not close!
E   
E   Mismatched elements: 1 / 3 (33.3%)
E   Greatest absolute difference: 0.000732421875 at index (1, 0) (up to 1e-05 allowed)
E   Greatest relative difference: 0.0014848709106445312 at index (1, 0) (up to 0.001 allowed)

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:280: in run_test_output_match
    raise AssertionError(f"Output {j} mismatch") from e
E   AssertionError: Output 0 mismatch
onnxscript/tests/function_libs/torch_lib/ops_test.py:266: in run_test_output_match
    torch.testing.assert_close(
E   AssertionError: Tensor-likes are not close!
E   
E   Mismatched elements: 2 / 72 (2.8%)
E   Greatest absolute difference: 0.000732421875 at index (0, 0, 0, 2) (up to 1e-05 allowed)
E   Greatest relative difference: 0.0090484619140625 at index (1, 0, 0, 0) (up to 0.001 allowed)

The above exception was the direct cause of the following exception:
onnxscript/tests/function_libs/torch_lib/ops_test.py:280: in run_test_output_match
    raise AssertionError(f"Output {j} mismatch") from e
E   AssertionError: Output 0 mismatch