Skip to content

[Bug] bug in convert "onnx.squeeze" to "qnn.reshape" when squeeze having a negative axis #4

@yangxin0926

Description

@yangxin0926

Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first 😸

Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.

Expected behavior

Squeeze operator in ONNX supports negative axis. When converting it to qnn.reshape, it should take negative axis into consideration.

Actual behavior

When negative axis shows up in onnx.squeeze, the reshape it's converted to will do nothing on the tensor. In other words, squeeze with negative axis will not change the shape of input tensor.

Environment

TVM 2.8

Source code position

tvm/python/tvm/relay/quantize/_convert_to_csi.py:1073

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions