diff options
author | Suharsh Sivakumar <suharshs@google.com> | 2018-09-17 20:25:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-17 20:28:57 -0700 |
commit | 0b7125d3c5e7128470a7a74cf8a3543eab39c2d8 (patch) | |
tree | 8a6e117399a7b7125fb0e43821452259642a5134 /tensorflow/contrib/lite/kernels | |
parent | bb9958ab69a38cbe57d119947b635a257fa6b802 (diff) |
Fix unused variable error on powerpc.
PiperOrigin-RevId: 213386145
Diffstat (limited to 'tensorflow/contrib/lite/kernels')
3 files changed, 13 insertions, 15 deletions
diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_float.h b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_float.h index f0bea7fa1d..114575a96a 100644 --- a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_float.h +++ b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_float.h @@ -932,9 +932,6 @@ inline void DepthwiseConv( TFLITE_DCHECK_EQ(filter_shape.DimensionsCount(), 4); TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); - const bool has_dilation = (params.dilation_width_factor != 1) || - (params.dilation_height_factor != 1); - const int batches = MatchingDim(input_shape, 0, output_shape, 0); const int output_depth = MatchingDim(filter_shape, 3, output_shape, 3); const int input_height = input_shape.Dims(1); @@ -966,7 +963,8 @@ inline void DepthwiseConv( FIXED_DEPTH_MULTIPLIER) \ if (!row_accum_func && (stride_width == 1 || ALLOW_STRIDED) && \ (input_depth == FIXED_INPUT_DEPTH || FIXED_INPUT_DEPTH == 0) && \ - depth_multiplier == FIXED_DEPTH_MULTIPLIER && !has_dilation) { \ + depth_multiplier == FIXED_DEPTH_MULTIPLIER && \ + dilation_height_factor == 1 && dilation_width_factor == 1) { \ row_accum_func = \ FloatDepthwiseConvAccumRow<ALLOW_STRIDED, FIXED_INPUT_DEPTH, \ FIXED_DEPTH_MULTIPLIER>; \ diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h index 494cf70504..ee3fe78a10 100644 --- a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h +++ b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8.h @@ -1718,18 +1718,15 @@ inline void DepthwiseConv( TFLITE_DCHECK_EQ(output_depth, input_depth * depth_multiplier); TFLITE_DCHECK_EQ(bias_shape.FlatSize(), output_depth); - const bool has_dilation = - (dilation_width_factor != 1) || (dilation_height_factor != 1); - // Enable for arm64 except for the Nvidia Linux 4 Tegra (L4T) running on // Jetson TX-2. This compiler does not support the offsetof() macro. #if defined(__aarch64__) && !defined(GOOGLE_L4T) // Call kernel optimized for depthwise convolutions using 3x3 filters if // parameters are supported. - if (Fast3x3FilterKernelSupported(input_shape, filter_shape, stride_width, - stride_height, has_dilation, pad_width, - pad_height, depth_multiplier, output_shape, - output_shift)) { + if (Fast3x3FilterKernelSupported( + input_shape, filter_shape, stride_width, stride_height, + dilation_width_factor, dilation_height_factor, pad_width, pad_height, + depth_multiplier, output_shape, output_shift)) { DepthwiseConv3x3Filter(params, input_shape, input_data, filter_shape, filter_data, bias_shape, bias_data, output_shape, output_data); @@ -1756,7 +1753,8 @@ inline void DepthwiseConv( FIXED_DEPTH_MULTIPLIER) \ if (!row_accum_func && (stride_width == 1 || ALLOW_STRIDED) && \ (input_depth == FIXED_INPUT_DEPTH || FIXED_INPUT_DEPTH == 0) && \ - depth_multiplier == FIXED_DEPTH_MULTIPLIER && !has_dilation) { \ + depth_multiplier == FIXED_DEPTH_MULTIPLIER && \ + dilation_width_factor == 1 && dilation_height_factor == 1) { \ row_accum_func = \ QuantizedDepthwiseConvAccumRow<ALLOW_STRIDED, FIXED_INPUT_DEPTH, \ FIXED_DEPTH_MULTIPLIER>; \ diff --git a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8_3x3_filter.h b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8_3x3_filter.h index 5087227182..e14d04ad02 100644 --- a/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8_3x3_filter.h +++ b/tensorflow/contrib/lite/kernels/internal/optimized/depthwiseconv_uint8_3x3_filter.h @@ -3176,8 +3176,9 @@ inline void DepthwiseConvHandlePadding(const uint8* input_data, inline bool Fast3x3FilterKernelSupported( const RuntimeShape& input_shape, const RuntimeShape& filter_shape, - int32 stride_width, int32 stride_height, bool has_dilation, int32 pad_width, - int32 pad_height, int32 depth_multiplier, const RuntimeShape& output_shape, + int32 stride_width, int32 stride_height, int32 dilation_width_factor, + int32 dilation_height_factor, int32 pad_width, int32 pad_height, + int32 depth_multiplier, const RuntimeShape& output_shape, int32 output_shift) { const int32 input_height = input_shape.Dims(1); const int32 input_width = input_shape.Dims(2); @@ -3193,7 +3194,8 @@ inline bool Fast3x3FilterKernelSupported( (stride_height == 1 || stride_height == 2) && (stride_width == stride_height) && (pad_width == 0 || pad_width == 1) && (pad_height == 0 || pad_height == 1) && (pad_width == pad_height) && - (input_depth % 8) == 0 && (output_shift > 0) && !has_dilation; + (input_depth % 8) == 0 && (output_shift > 0) && + dilation_width_factor == 1 && dilation_height_factor == 1; if (!supported) { return false; |