Merge pull request #46182 from advaitjain:update-formatting-and-license-checks

PiperOrigin-RevId: 350196945
Change-Id: I9b446567053f85f1019ce98ba90dc9d9f2348479
This commit is contained in:
TensorFlower Gardener 2021-01-05 12:40:15 -08:00
commit 6f1dee7d6c
2 changed files with 15 additions and 12 deletions

View File

@ -15,16 +15,13 @@ limitations under the License.
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_CONV_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_CONV_H_
#include "tensorflow/lite/kernels/internal/types.h"
#include "tensorflow/lite/kernels/internal/common.h"
#include "tensorflow/lite/kernels/internal/types.h"
namespace tflite {
namespace reference_ops {
inline void Conv(const ConvParams& params, const RuntimeShape& input_shape,
const float* input_data, const RuntimeShape& filter_shape,
const float* filter_data, const RuntimeShape& bias_shape,
@ -108,8 +105,8 @@ inline void Conv(const ConvParams& params, const RuntimeShape& input_shape,
uint8_t* output_data, const RuntimeShape& im2col_shape,
uint8_t* im2col_data, void* cpu_backend_context) {
(void)cpu_backend_context; // only used in optimized code.
(void)im2col_data; // only used in optimized code.
(void)im2col_shape; // only used in optimized code.
(void)im2col_data; // only used in optimized code.
(void)im2col_shape; // only used in optimized code.
const int stride_width = params.stride_width;
const int stride_height = params.stride_height;
const int dilation_width_factor = params.dilation_width_factor;

View File

@ -33,7 +33,7 @@ set +e
# The pigweed scripts only work from a git repository and the Tensorflow CI
# infrastructure does not always guarantee that. As an ugly workaround, we
# create our own git repo when running on the CI servers.
pushd tensorflow/lite/micro/
pushd tensorflow/lite/
if [[ ${1} == "PRESUBMIT" ]]; then
git init .
git config user.email "tflm@google.com"
@ -43,9 +43,12 @@ if [[ ${1} == "PRESUBMIT" ]]; then
fi
# Check for license with the necessary exclusions.
tools/make/downloads/pigweed/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py \
. \
micro/tools/make/downloads/pigweed/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py \
kernels/internal/reference/ \
micro/ \
-p copyright_notice \
-e kernels/internal/reference/integer_ops/ \
-e kernels/internal/reference/reference_ops.h \
-e tools/make/downloads \
-e tools/make/targets/ecm3531 \
-e BUILD\
@ -66,8 +69,11 @@ LICENSE_CHECK_RESULT=$?
# Python files (with yapf as the formatter) because that needs additional setup.
# We are also ignoring the markdown files to allow for a more gradual rollout of
# this presubmit check.
tools/make/downloads/pigweed/pw_presubmit/py/pw_presubmit/format_code.py \
. \
micro/tools/make/downloads/pigweed/pw_presubmit/py/pw_presubmit/format_code.py \
kernels/internal/reference/ \
micro/ \
-e kernels/internal/reference/integer_ops/ \
-e kernels/internal/reference/reference_ops.h \
-e "\.inc" \
-e "\.md" \
-e "\.py"
@ -76,7 +82,7 @@ CLANG_FORMAT_RESULT=$?
popd
if [[ ${1} == "PRESUBMIT" ]]; then
rm -rf tensorflow/lite/micro/.git
rm -rf tensorflow/lite/.git
fi
# Re-enable exit on error now that we are done with the temporary git repo.