Skip to content

[Bug][ONNX] CumSum crashed when call infer_value for axis #14652

@jikechao

Description

@jikechao

For the simple ONNX model, It will crash when executed at this line, It seems that ONNXConverter can't parse the axis value.

image

model structure

image

Trackback

  File "/workplace/software/tvm/tvm_/python/tvm/driver/tvmc/frontends.py", line 169, in load
    return relay.frontend.from_onnx(model, shape=shape_dict, **kwargs)
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/onnx.py", line 7346, in from_onnx
    mod, params = g.from_onnx(graph, opset)
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/onnx.py", line 6963, in from_onnx
    self._construct_nodes(graph)
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/onnx.py", line 7078, in _construct_nodes
    op = self._convert_operator(op_name, inputs, attr, self.opset)
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/onnx.py", line 7204, in _convert_operator
    sym = convert_map[op_name](inputs, attrs, self._params)
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/onnx.py", line 2486, in _impl_v1
    dim = int(infer_value(dim, params).numpy())
  File "/workplace/software/tvm/tvm_/python/tvm/relay/frontend/common.py", line 547, in infer_value
    ), "All inputs to infer must be available in params."
AssertionError: All inputs to infer must be available in params.

Steps to reproduce

  1. download the model cum_sum.onnx
  2. compile the model: tvmc compile --target 'llvm' cum_sum.onnx

Triage

  • frontend:onnx

cc @KJlaccHoeUM9l

@vvchernov @tqchen Could you take a look? is it an ONNXConverter bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions