alnah005 opened a new issue #10088:
URL: https://github.com/apache/tvm/issues/10088


   I'm using 
[`from_onnx`](https://github.com/apache/tvm/blob/44fe7ef816565f43380c50e0b43fd626fad9d029/python/tvm/relay/frontend/onnx.py#L5063)
 to run my model 
   
[dw_conv2d_h6_w10_c8_cm5_k3_s1_l1_fp32_onnxqt.pt_quant.onnx.zip](https://github.com/apache/tvm/files/7954735/dw_conv2d_h6_w10_c8_cm5_k3_s1_l1_fp32_onnxqt.pt_quant.onnx.zip)
    into tvm relay. The thing that's not trivial in the model is that `groups` 
is set to `2`.
   
   Info about the model:
   1. Input: (batch, channel, height, width) -> (1, 8, 6, 10)
   2. Conv Layer: (batch, channel, height, width) -> (1, 40, 4, 8) with the 
following params:
         dilations: 1, 1
         group: 2
         kernel_shape: 3, 3
         pads: 0, 0, 0, 0
         strides: 1, 1
   
   ### Expected behavior
   
   No errors running my model 
[dw_conv2d_h6_w10_c8_cm5_k3_s1_l1_fp32_onnxqt.pt_quant.onnx.zip](https://github.com/apache/tvm/files/7954735/dw_conv2d_h6_w10_c8_cm5_k3_s1_l1_fp32_onnxqt.pt_quant.onnx.zip)
 into tvm relay using  
[`from_onnx`](https://github.com/apache/tvm/blob/44fe7ef816565f43380c50e0b43fd626fad9d029/python/tvm/relay/frontend/onnx.py#L5063).
   
   ### Actual behavior
   
   ```
   The Relay type checker is unable to show the following types match.
   In particular dimension 0 conflicts: 160 does not match 40.
   The Relay type checker is unable to show the following types match.
   In particular `Tensor[(40), float32]` does not match `Tensor[(160), float32]`
   note: run with `TVM_BACKTRACE=1` environment variable to display a backtrace.
   ```
   
   Code to reproduce:
   ```[python]
   import onnx
   import tvm
   def build_tvm_model(mod):
     with tvm.transform.PassContext(opt_level=3):
        lib = relay.build(mod, target="llvm")
     return 
tvm.contrib.graph_executor.GraphModule(lib["default"](tvm.device('llvm', 0)))
   
   model = 
onnx.load("dw_conv2d_h6_w10_c8_cm5_k3_s1_l1_fp32_onnxqt.pt_quant.onnx")
   mod, params = relay.frontend.from_onnx(model)
   build_tvm_model(mod)
   ```
   Error:
   ```
   The Relay type checker is unable to show the following types match.
   In particular dimension 0 conflicts: 160 does not match 40.
   The Relay type checker is unable to show the following types match.
   In particular `Tensor[(40), float32]` does not match `Tensor[(160), float32]`
   note: run with `TVM_BACKTRACE=1` environment variable to display a backtrace.
   ```


-- 
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]


Reply via email to