PawelGlomski-Intel commented on code in PR #20983:
URL: https://github.com/apache/incubator-mxnet/pull/20983#discussion_r856150747
##########
src/operator/quantization/quantize_v2-inl.h:
##########
@@ -151,8 +151,20 @@ static inline bool QuantizeV2Type(const nnvm::NodeAttrs&
attrs,
CHECK_EQ(in_attrs->size(), 1U);
CHECK_EQ(out_attrs->size(), 3U);
const QuantizeV2Param& param = nnvm::get<QuantizeV2Param>(attrs.parsed);
+
+#if MXNET_USE_ONEDNN == 1
+ if (param.min_calib_range.has_value() && param.max_calib_range.has_value()) {
+ CHECK(in_attrs->at(0) == mshadow::kFloat32 || in_attrs->at(0) ==
mshadow::kBfloat16 ||
Review Comment:
It was easier this way - no further changes are required to make this work.
If we were to enable `bfloat16` during calibration as well, this wouldn't be as
easy. Since we decided that AMP conversion should always happen after
quantization, this limitation shouldn't be a problem.
--
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]