jianzhangru opened a new issue, #11264: URL: https://github.com/apache/tvm/issues/11264
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 :smile_cat: 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 I have a simple onnx model with an 'expand' operator (with shape input set to [70]) followed by 'reshape' operator (with shape input set to [1, 1, 70]). The input dimension is [1, 1]. So, the expected dimension of the 'expand' output is [1, 70]. And it should be reshaped to [1, 1, 70] by 'reshape' operator. I tested with onnx runtime interpreter and got the expected output. I expected 'tvmc compile' can work successfully on this simple onnx model.  ### Actual behavior The 'tvmc compile' command returns the following error: Check failed: oshape_sum == data_shape_sum (70 vs. 4900) : Input tensor shape(1,1,70) and reshaped shape((int64)70,(int64)70) are not compatible! Looks like it got [70, 70] as the shape of the 'expand' output instead of [1, 70]. ### Environment Operating System: Ubuntu Linux TVM version: 0.9.dev0 ### Steps to reproduce Run the following script to create the example onnx model file: from onnx import helper, numpy_helper from onnx import TensorProto as tp import onnx import numpy as np initializers = [] initializers.append(numpy_helper.from_array(np.array([70], dtype=np.int), name='c1')) initializers.append(numpy_helper.from_array(np.array([1, 1, 70], dtype=np.int), name='c2')) n1 = helper.make_node('Expand', inputs=['x', 'c1'], outputs=['y1'], name='n1') n2 = helper.make_node('Reshape', inputs=['y1', 'c2'], outputs=['y'], name='n2') g1 = helper.make_graph([n1, n2], 'preprocessing', [helper.make_tensor_value_info('x', tp.FLOAT, [1, 1])], [helper.make_tensor_value_info('y', tp.FLOAT, [1, 1, 70])], initializers) m1 = helper.make_model(g1, producer_name='demo') onnx.checker.check_model(m1) onnx.save(m1, '/tmp/test.onnx') After creating the file, run: tvmc compile --target "llvm" --output /tmp/model.tar /tmp/test.onnx -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
