Remove the depthwise conv 3x3 output shift > 0 restriction for per-channel. (it's a obsolete restriction), we're using sqrshl, so it's fine to handle output_shift <= 0 case.
PiperOrigin-RevId: 295873865 Change-Id: I20ef4ea4c70fd00c2a2d1fc75730ac0fbd807faf
This commit is contained in:
parent
399a62bc64
commit
ea13922cf1
@ -453,7 +453,6 @@ inline bool Fast3x3FilterKernelSupported(
|
|||||||
const int32 filter_width = filter_shape.Dims(2);
|
const int32 filter_width = filter_shape.Dims(2);
|
||||||
const int32 output_height = output_shape.Dims(1);
|
const int32 output_height = output_shape.Dims(1);
|
||||||
const int32 output_width = output_shape.Dims(2);
|
const int32 output_width = output_shape.Dims(2);
|
||||||
const int32 output_depth = output_shape.Dims(3);
|
|
||||||
|
|
||||||
bool supported =
|
bool supported =
|
||||||
filter_width == 3 && filter_height == 3 && depth_multiplier == 1 &&
|
filter_width == 3 && filter_height == 3 && depth_multiplier == 1 &&
|
||||||
@ -468,14 +467,6 @@ inline bool Fast3x3FilterKernelSupported(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (quantization_type == QuantizationType::kPerChannelInt8) {
|
|
||||||
for (int i = 0; i < output_depth; ++i) {
|
|
||||||
if (output_shift_ptr[i] > 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Handle case where padding is zero but padding type is not kValid.
|
// Handle case where padding is zero but padding type is not kValid.
|
||||||
// This would require special boundary case handling that is not supported.
|
// This would require special boundary case handling that is not supported.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user