summaryrefslogtreecommitdiff
path: root/caffe2
diff options
context:
space:
mode:
authorJongsoo Park <jongsoo@fb.com>2019-04-03 07:55:02 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-04-03 08:05:10 -0700
commit06b7fe59f2800b95571daf86e8031cfc857c1500 (patch)
tree4e046768d3e0689a3ce98cbf33c4ff9f9cef2ae4 /caffe2
parent2113ea6fbf20cb820ea6a504b1dfe30297ce4d7c (diff)
downloadpytorch-06b7fe59f2800b95571daf86e8031cfc857c1500.tar.gz
pytorch-06b7fe59f2800b95571daf86e8031cfc857c1500.tar.bz2
pytorch-06b7fe59f2800b95571daf86e8031cfc857c1500.zip
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
Diffstat (limited to 'caffe2')
-rw-r--r--caffe2/quantization/server/conv_dnnlowp_op.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/caffe2/quantization/server/conv_dnnlowp_op.cc b/caffe2/quantization/server/conv_dnnlowp_op.cc
index d585af57d4..05c788eb31 100644
--- a/caffe2/quantization/server/conv_dnnlowp_op.cc
+++ b/caffe2/quantization/server/conv_dnnlowp_op.cc
@@ -1224,7 +1224,9 @@ void ConvDNNLowPOp<T, ReluFused>::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<T, ReluFused>::ConvNHWCCore_(
conv_p,
reinterpret_cast<const uint8_t*>(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(),