Description
Expected behavior
import tvm
mod = tvm.relax.frontend.onnx.from_onnx(onnx_model, shape_dict=shape_dict) # type: ignore
Should work
Actual behavior
AttributeError Traceback (most recent call last)
Cell In[2], line 11
5 # Properly define shape_dict using symbolic TVM variables
6 shape_dict = {
7 "input_ids": [batch, seq_len],
8 "attention_mask": [batch, seq_len],
9 }
---> 11 mod = tvm.relax.frontend.onnx.from_onnx(onnx_model, shape_dict=shape_dict) # type: ignore
12 mod
AttributeError: module 'tvm.relax.frontend' has no attribute 'onnx'
Operating System: Ubuntu, TVM version: 0.21 dev Python: 3.11.11
Steps to reproduce
Define symbolic variables with int64 dtype
batch = tvm.tir.Var("batch", "int64")
seq_len = tvm.tir.Var("seq_len", "int64")
Properly define shape_dict using symbolic TVM variables
shape_dict = {
"input_ids": [batch, seq_len],
"attention_mask": [batch, seq_len],
}
mod = tvm.relax.frontend.onnx.from_onnx(onnx_model, shape_dict=shape_dict) # type: ignore
mod