TFLM compression changes (2nd) (#2653) @tensorflow/micro Preparatory changes for upcomming PRs related to TFLM compression changes. Add unit testing failure check macro. bug=#2652
diff --git a/tensorflow/lite/micro/examples/micro_speech/micro_speech_test.cc b/tensorflow/lite/micro/examples/micro_speech/micro_speech_test.cc index f31728c..0191958 100644 --- a/tensorflow/lite/micro/examples/micro_speech/micro_speech_test.cc +++ b/tensorflow/lite/micro/examples/micro_speech/micro_speech_test.cc
@@ -1,4 +1,4 @@ -/* Copyright 2023 The TensorFlow Authors. All Rights Reserved. +/* Copyright 2024 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,13 +32,6 @@ #include "tensorflow/lite/micro/micro_mutable_op_resolver.h" #include "tensorflow/lite/micro/testing/micro_test.h" -#define TF_LITE_MICRO_CHECK_FAIL() \ - do { \ - if (micro_test::did_test_fail) { \ - return kTfLiteError; \ - } \ - } while (false) - namespace { // Arena size is a guesstimate, followed by use of
diff --git a/tensorflow/lite/micro/testing/micro_test.h b/tensorflow/lite/micro/testing/micro_test.h index a28f4b6..1e17531 100644 --- a/tensorflow/lite/micro/testing/micro_test.h +++ b/tensorflow/lite/micro/testing/micro_test.h
@@ -1,4 +1,4 @@ -/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. +/* Copyright 2024 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -264,4 +264,11 @@ } \ } while (false) +#define TF_LITE_MICRO_CHECK_FAIL() \ + do { \ + if (micro_test::did_test_fail) { \ + return kTfLiteError; \ + } \ + } while (false) + #endif // TENSORFLOW_LITE_MICRO_TESTING_MICRO_TEST_H_