ibsidorenko commented on code in PR #13469:
URL: https://github.com/apache/tvm/pull/13469#discussion_r1029324848
##########
src/relay/qnn/op/batch_matmul.cc:
##########
@@ -96,20 +96,42 @@ Expr BatchMatmulFirstTerm(const Expr& quantized_x, const
Expr& quantized_y,
}
Expr BatchMatmulSecondTerm(const Expr& x_quantized_data, const Expr&
y_zero_point) {
- Array<Integer> axes = {2};
- return Multiply(y_zero_point, Sum(Cast(x_quantized_data, DataType::Int(32)),
axes, true, false));
+ if (IsScalar(y_zero_point)) {
Review Comment:
```suggestion
ICHECK(IsScalar(y_zero_point)) << "Tensor ZP is not supported"
```
Do you think return empty Expr() is better choice? I am afraid it will be
not clear the reason of fail when not scalar ZP will be provided.
--
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]