Goose-Bomb opened a new issue, #13545:
URL: https://github.com/apache/tvm/issues/13545

   ### Actual behavior
   
   When I try to apply `FakeQuantizationToInteger` pass on a Relay IRModule 
imported from an ONNX model with QDQ quantization representation, it failed 
with this error message:
   
   ```
     ......
           at .../tvm/include/tvm/runtime/packed_func.h:1646
     1: tvm::relay::qnn::QnnBroadcastRel(tvm::runtime::Array<tvm::Type, void> 
const&, int, tvm::Attrs const&, tvm::TypeReporter const&)
           at .../tvm/src/relay/qnn/op/op_common.h:310
     0: tvm::relay::qnn::IsScalarType(tvm::Type const&, tvm::runtime::DataType 
const&)
           at .../tvm/src/relay/qnn/op/../utils.h:225
     File ".../tvm/src/relay/analysis/type_solver.cc", line 624
   TVMError: 
   ---------------------------------------------------------------
   An error occurred during the execution of TVM.
   For more information, please see: https://tvm.apache.org/docs/errors.html
   ---------------------------------------------------------------
     Check failed: (false) is false: [16:42:40] 
.../tvm/src/relay/qnn/op/../utils.h:225: 
   ---------------------------------------------------------------
   An error occurred during the execution of TVM.
   For more information, please see: https://tvm.apache.org/docs/errors.html
   ---------------------------------------------------------------
   
     Check failed: tensor_type->shape.size() == 0 (1 vs. 0) : 
   ```
   
   ### Environment
   
   TVM v0.10.0 
   
   ### Steps to reproduce
   
   Here is the code to reproduce the BUG:
   
   ```python3
   model_onnx = onnx.load(onnx_path)
   ir_mod, _ = relay.frontend.from_onnx(
       model_onnx,
       shape={"input": (1, 3, 224, 224)},
       freeze_params=True
   )
   
   passes = tvm.transform.Sequential([
       relay.transform.InferType(),
       relay.transform.FakeQuantizationToInteger(),
   ])
   ir_mod = passes(ir_mod)
   ```
   
   Here is the quantized ONNX model with QDQ representation.
   
[regnet_x_400mf_qint8.onnx.tar.gz](https://github.com/apache/tvm/files/10146005/regnet_x_400mf_qint8.onnx.tar.gz)
   
   ### Triage
   
   Please refer to the list of label tags 
[here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the 
relevant tags and add them below in a bullet format (example below).
   
   - relay:qnn
   - frontend: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]

Reply via email to