You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/01/28 00:45:02 UTC

[GitHub] [tvm] alnah005 opened a new issue #10088: [Bug] [ONNX] quantized grouped convolution shape mismatch

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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] AndrewZhaoLuo commented on issue #10088: [Bug] [ONNX] quantized grouped convolution shape mismatch

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on issue #10088:
URL: https://github.com/apache/tvm/issues/10088#issuecomment-1026261180


   I'll take a look later in the week


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] AndrewZhaoLuo commented on issue #10088: [Bug] [ONNX] quantized grouped convolution shape mismatch

Posted by GitBox <gi...@apache.org>.
AndrewZhaoLuo commented on issue #10088:
URL: https://github.com/apache/tvm/issues/10088#issuecomment-1028516588


   Seems similar to https://github.com/apache/tvm/issues/10046 (in the discussion thread linked in issue)


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi edited a comment on issue #10088: [Bug] [ONNX] quantized grouped convolution shape mismatch

Posted by GitBox <gi...@apache.org>.
masahi edited a comment on issue #10088:
URL: https://github.com/apache/tvm/issues/10088#issuecomment-1023832961


   Is it the same issue as https://github.com/apache/tvm/issues/7878 and https://github.com/apache/tvm/issues/8299?
   
   Hopefully @AndrewZhaoLuo can take a look...


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi commented on issue #10088: [Bug] [ONNX] quantized grouped convolution shape mismatch

Posted by GitBox <gi...@apache.org>.
masahi commented on issue #10088:
URL: https://github.com/apache/tvm/issues/10088#issuecomment-1023832961


   Is it the same issue as https://github.com/apache/tvm/issues/7878?
   
   Hopefully @AndrewZhaoLuo can take a look...


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org