You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2022/06/23 09:56:29 UTC

[GitHub] [incubator-mxnet] bartekkuncer commented on a diff in pull request #21079: [BUGFIX] Fix DNNL requantize operator overflow error

bartekkuncer commented on code in PR #21079:
URL: https://github.com/apache/incubator-mxnet/pull/21079#discussion_r904822769


##########
src/operator/quantization/dnnl/dnnl_requantize-inl.h:
##########
@@ -132,7 +132,8 @@ static void DNNLRequantizeForward(const nnvm::NodeAttrs& attrs,
         data_min = data_mins[i];
     }
     float src_range     = MinAbs(MinValue<SrcDType>(), MaxValue<SrcDType>());
-    SrcDType data_range = MaxAbs(data_min, data_max);
+    // It doesn't use MaxAbs as it convert data to float which could cause overflow errors

Review Comment:
   ```suggestion
       // MaxAbs is not used here as it converts data to float which could cause overflow errors.
   ```



-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org