blackkker opened a new issue, #12882:
URL: https://github.com/apache/tvm/issues/12882

   When importing a quantized model, i found that the qnn op has not registered 
the **TOpPattern** attribute.
   Can I set them all to kOpaque first? Then, more discussion are needed to 
decide the **TOpPattern** attr of the qnn op.
   ### Expected behavior
   
   Build normally.
   
   ### Actual behavior
   
   `Check failed: (idx < data_.size() && data_[idx].second != 0) is false: 
Attribute TOpPattern has not been registered for qnn.concatenate`
   `Check failed: (idx < data_.size() && data_[idx].second != 0) is false: 
Attribute TOpPattern has not been registered for qnn.dense`
   `Check failed: (idx < data_.size() && data_[idx].second != 0) is false: 
Attribute TOpPattern has not been registered for qnn.requantize`
   ### Environment
   
   Any environment details, such as: Operating System, TVM version, etc
   pytorch(1.12.0)
   tvm version: 
[9ce95a9](https://github.com/apache/tvm/tree/9ce95a9abe3db43b4a4187111c9e2ad0d6bf3dbd)
   
   ### Steps to reproduce
   Download
   [bug.zip](https://github.com/apache/tvm/files/9631099/bug.zip)
   
   
   Run python check.py
   ```
   import tvm
   from tvm import relay
   
   import torch
   
   model_name = "googlenet_quant_torchscript.pt"
   pytorch_model = torch.jit.load(model_name).float().eval()
   input_name = "x"
   shape_list = [(input_name, (1, 3, 224, 224))]
   mod, params = relay.frontend.from_pytorch(pytorch_model, shape_list)
   
   target = tvm.target.Target("llvm", host="llvm")
   dev = tvm.cpu(0)
   with tvm.transform.PassContext(opt_level=0):
       lib = relay.build(mod, target=target, params=params)
   ```
   Preferably a minimal script to cause the issue to occur.
   


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