apache / apache/tvm

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

Open
#17,892 1 comment 0 reactions 1 assignee Claimed by @cbalint13 View on GitHub
needs-triage type: bug
Dominant language
Python
Stars
13.7k
Forks
4k
Avg merge
2d 19h
Merged PRs (30d)
111

Description

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](https://github.com/user-attachments/assets/0d988e03-136f-4da6-b2e9-568b9ef7c7d0)

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.