tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Bug] Unsupported tensor type of Reshape op's shape param?

Open erdayang opened this issue 8 months ago • 1 comments

My graph is shown in the screenshot. The shape that the Reshape operator needs to receive is actually a tensor. However, at this point, TVM throws an error.

Image

tvm version: 0.20.0

import sys

import tvm
from tvm import relax
from tvm.relax.frontend.onnx import from_onnx
import onnx
onnx_model_path = sys.argv[1]
onnx_model = onnx.load(onnx_model_path)
mod, params = from_onnx(onnx_model)

error

TVMError: Reshape requires the input new shape to be Shape. However, the given one is relax.TensorStructInfo

Is it because I am using it incorrectly, or is it that TVM does not support this? Or how can I solve this problem?

erdayang avatar Apr 25 '25 05:04 erdayang

Hi @erdayang ,

Can post the onnx file here ? I could look and fix this with a small reproducer (preffering a real one).

cbalint13 avatar Aug 21 '25 11:08 cbalint13