d-smirnov opened a new pull request #6513:
URL: https://github.com/apache/incubator-tvm/pull/6513


   An attempt to fix an issue which appeared when ConverLayout pass
   runs on quantized binary operations like qnn.add:
   def before():
       x = relay.var("x", shape=(2, 2))
       y = relay.var("y", shape=(1, 2))
       return relay.Function(
           [x, y],
           relay.qnn.op.add(
               x,
               y,
               lhs_scale=relay.const(0.0156863, "float32"),
               lhs_zero_point=relay.const(127, "int32"),
               rhs_scale=relay.const(0.0117647, "float32"),
               rhs_zero_point=relay.const(85, "int32"),
               output_scale=relay.const(0.0235294, "float32"),
               output_zero_point=relay.const(128, "int32"),
           ),
       )
   
   The issue manifested itself as
     [bt] (2) 
./src/tvm/build/libtvm.so(tvm::relay::qnn::QnnBinaryBroadcastLayout(tvm::Attrs 
const&, tvm::runtime::Array<tvm::tir::Layout, void> const&, 
tvm::runtime::Array<tvm::tir::Layout, void> const&, 
tvm::runtime::Array<tvm::Type, void> const&)+0xa9) [0x7fadc080d949]
     [bt] (1) ./src/tvm/build/libtvm.so(tvm::runtime::Array<tvm::tir::Layout, 
void>::operator[](long) const+0xb6) [0x7fadc0382996]
     [bt] (0) ./src/tvm/build/libtvm.so(+0xb50c12) [0x7fadc037cc12]
     File "/workspace/include/tvm/runtime/container.h", line 681
   IndexError: Check failed: 0 <= i && i < p->size_: indexing 1 on an array of 
size 1
   
   Thanks for contributing to TVM!   Please refer to guideline 
https://tvm.apache.org/docs/contribute/ for useful information and tips. After 
the pull request is submitted, please request code reviews from 
[Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers)
 by @ them in the pull request thread.
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to