cbalint13 commented on a change in pull request #6675:
URL: https://github.com/apache/incubator-tvm/pull/6675#discussion_r509002152



##########
File path: src/relay/qnn/op/requantize.cc
##########
@@ -155,17 +155,20 @@ Expr RequantizeLower(const Expr& input_tensor, const 
Expr& input_scale,
     if (!IsEqualScalar(input_scale, output_scale)) {
       int32_t fixed_point_multiplier, shift;
       std::tie(fixed_point_multiplier, shift) = 
GetFixedPointMultiplierShift(double_multiplier);
-
       const bool is_upward_rounding = (param->rounding == "UPWARD");
 
-      // When using upward rounding (i.e., x.5 rounded to x+1), leverage
-      // the FixedPointMultiply operator
-      scaled_int32_t =
-          (is_upward_rounding
-               ? FixedPointMultiply(scaled_int32_t, fixed_point_multiplier, 
shift)
-               : FixedPointMultiplyToNearest(scaled_int32_t, 
double_multiplier, input_shape));
+      if (is_upward_rounding && fixed_point_multiplier == (1 << 30)) {

Review comment:
       @anijain2305 , Thank you !




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to