From 06b7fe59f2800b95571daf86e8031cfc857c1500 Mon Sep 17 00:00:00 2001 From: Jongsoo Park Date: Wed, 3 Apr 2019 07:55:02 -0700 Subject: [PATCH] use optimization in D14020675 (#16945) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16945 As title Reviewed By: jianyuh Differential Revision: D14020769 fbshipit-source-id: fc0f05fcc57bfe9b4aa0c5750060d7b2ba57dd7a --- caffe2/quantization/server/conv_dnnlowp_op.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/caffe2/quantization/server/conv_dnnlowp_op.cc b/caffe2/quantization/server/conv_dnnlowp_op.cc index d585af5..05c788e 100644 --- a/caffe2/quantization/server/conv_dnnlowp_op.cc +++ b/caffe2/quantization/server/conv_dnnlowp_op.cc @@ -1224,7 +1224,9 @@ void ConvDNNLowPOp::ConvNHWCCore_( out_qparams_.zero_point, in_qparams_[INPUT].zero_point, filter_zero_points_.data(), - row_offsets_.data() + tid * row_offset_size_per_thread, + filter_zero_points_[0] + ? row_offsets_.data() + tid * row_offset_size_per_thread + : nullptr, column_offsets_->data(), b_quantized_data_, conv_p.OC, @@ -1234,7 +1236,9 @@ void ConvDNNLowPOp::ConvNHWCCore_( conv_p, reinterpret_cast(Xdata), in_qparams_[INPUT].zero_point, - row_offsets_.data() + tid * row_offset_size_per_thread, + filter_zero_points_[0] + ? row_offsets_.data() + tid * row_offset_size_per_thread + : nullptr, *Wq_gconv_packed_, Y_uint8_data, Y_int32->data(), -- 2.7.4