mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[caffe2/server quant] use new depthwise conv fbgemm interface (#71166)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71166 Remove the use of deprecated old interface Test Plan: CI Reviewed By: jiyuanzFB Differential Revision: D33533494 fbshipit-source-id: 930eb93cd67c7a9bb77708cc48914aa0c9f1c841
This commit is contained in:
committed by
Facebook GitHub Bot
parent
de62bcac66
commit
cc55da8a9b
@ -1289,11 +1289,12 @@ void ConvDNNLowPOp<T, ReluFused>::ConvNHWCCore_(
|
||||
#endif
|
||||
{
|
||||
if (quantize_groupwise_) {
|
||||
depthwise_2d_per_channel_quantization_same_pad(
|
||||
depthwise_2d_same_pad<QuantizationGranularity::OUT_CHANNEL>(
|
||||
N,
|
||||
H,
|
||||
W,
|
||||
C,
|
||||
C,
|
||||
stride_h(),
|
||||
stride_w(),
|
||||
// Shouldn't pass 0 if column_offsets_ is empty here because we
|
||||
@ -1313,27 +1314,28 @@ void ConvDNNLowPOp<T, ReluFused>::ConvNHWCCore_(
|
||||
dnnlowp_get_thread_num(),
|
||||
dnnlowp_get_num_threads());
|
||||
} else {
|
||||
depthwise_2d_same_pad(
|
||||
depthwise_2d_same_pad<QuantizationGranularity::TENSOR>(
|
||||
N,
|
||||
H,
|
||||
W,
|
||||
C,
|
||||
C,
|
||||
stride_h(),
|
||||
stride_w(),
|
||||
// Shouldn't pass 0 if column_offsets_ is empty here because we
|
||||
// need zero_point for padding
|
||||
in_qparams_[INPUT].zero_point,
|
||||
reinterpret_cast<const uint8_t*>(Xdata),
|
||||
FilterQuantizationParams(0).zero_point,
|
||||
&FilterQuantizationParams(0).zero_point,
|
||||
*Wq_depthwise_packed_,
|
||||
requantization_params_[0].real_multiplier,
|
||||
&requantization_params_[0].real_multiplier,
|
||||
out_qparams_.zero_point,
|
||||
Y_uint8_data,
|
||||
// column_offsets_ empty means column_offsets_ are folded into bias
|
||||
column_offsets_->empty() ? nullptr : column_offsets_->data(),
|
||||
b_quantized_data_,
|
||||
ReluFused,
|
||||
1.0f, /*act_times_w_scale*/
|
||||
nullptr, /*act_times_w_scale*/
|
||||
dnnlowp_get_thread_num(),
|
||||
dnnlowp_get_num_threads());
|
||||
}
|
||||
|
Reference in New Issue
Block a user