ZhennanQin commented on a change in pull request #12530: Implement mkldnn convolution fusion and quantization. URL: https://github.com/apache/incubator-mxnet/pull/12530#discussion_r220032850
########## File path: src/operator/quantization/mkldnn/mkldnn_quantize-inl.h ########## @@ -75,6 +75,11 @@ static void MKLDNNQuantizeComputeKer(const std::vector<NDArray>& inputs, auto i_mpd = i_mem->get_primitive_desc(); auto i_desc = i_mpd.desc(); mkldnn::memory::format i_fmt = static_cast<mkldnn::memory::format>(i_desc.data.format); + if (i_fmt == mkldnn::memory::format::nchw || + i_fmt == mkldnn::memory::format::nChw8c || + i_fmt == mkldnn_nChw16c) { + i_fmt = mkldnn::memory::format::nhwc; + } Review comment: For mkldnn, yes. nhwc should be the default int8 layout, just like nchw for fp32. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services