masahi commented on code in PR #13578:
URL: https://github.com/apache/tvm/pull/13578#discussion_r1043860122
##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -1391,7 +1391,7 @@ def _impl_v1(cls, inputs, attr, params):
dtype = input0_state.checked_type.dtype
# Y = alpha * A * B + beta * C
alpha = float(attr.get("alpha", 1.0))
- beta = float(attr.get("beta", 1.0))
+ beta = float(attr.get("beta"))
Review Comment:
Actually the whole purpose of this change was to avoid multiplying by 1.0,
since `multiply(1f, dequantize(bias)` would be converted to
`qnn.mul(quantize(1), bias)` by FQ2I. So I restored the original code cc
@Icemist
An alternative would be to add algebraic simplification to the
`SimpliyfyExpr` pass.
--
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]