tvm
tvm copied to clipboard
[Bug] Can the virtual machine executor support inference on dynamic shape of OCR model?
Hi, I observe that tvm only support transform on Oneflow or Onnx dynamic shape model. I have tried to tranform so many OCR Onnx models to relay but all failed because the presence of this operator I guess. Fortunately, I succeed to tranform a Onnx model named “ch_PP-OCRv3_rec_infer”, which can be converted from the Paddle model via the paddle2onnx tool. (url: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.5/doc/doc_ch/ppocr_introduction.md)
Then, I load this model to create a virtual machine executor by using the relay.build_module.create_executor func. But, there still exists a problem called “RuntimeError : Invalid type of axis: <class ‘tvm.tir.expr.add’>”, as shown below.
Um … I search this problem on Google and TVM Discuss, and find a same problem without any solutions.
Is it the conv2d operator problem ? or the virtual machine executor are not friendly to the dynamic shape tensor?
I am also confused by the TVM dynamic Shape problem. Can anyone provide some information?
Can you post your reproducible script? An error message alone is not helpful for debugging.
Hi mashi @masahi , @cdljn2011 is one of my friends and we can provide the code and data for you, which can be downloaded from the Google Drive or Baidu Disk as follows. We build and run it in 0.10.0 TVM with clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04.
Google Drive —— https://drive.google.com/file/d/1L2_O7zZ4O7aicHHrksMG7d50HzvdoEao/view?usp=sharing Baidu Disk —— url:https://pan.baidu.com/s/1ua52_lB3vu180d9dxn6gOA password:FT12
Hi @tqchen @AndrewZhaoLuo , can you provide some valuable information?
Please use the forum for general usage questions. https://discuss.tvm.apache.org/
@JingliangGao Did you solve this question? I alse meet this problem, it seems the matrix dimensions is limited ? any one can help ?