TFLM: Speed up Arduino build by ignoring TFLITE_DCHECK

It's hard to enforce compiler flags on Arduino platforms so NDEBUG is not set which means that TFLITE_DCHECK is executed when it should have been ignored and wasted a lot of cycles.

More context: https://github.com/tensorflow/tensorflow/pull/44863 Thanks  bitbank2@ for investigating this issue.

PiperOrigin-RevId: 343220669
Change-Id: I965425b2b599a0edbfe13652c32ca7f42920f470
This commit is contained in:
Tiezhen WANG 2020-11-18 21:50:26 -08:00 committed by TensorFlower Gardener
parent 2bd43147d0
commit 6d5f02b47a

View File

@ -57,7 +57,7 @@ inline void InfiniteLoop() {
#endif // TF_LITE_MCU_DEBUG_LOG
#ifdef NDEBUG
#if defined(NDEBUG) || defined(ARDUINO)
#define TFLITE_ASSERT_FALSE (static_cast<void>(0))
#else
#define TFLITE_ASSERT_FALSE TFLITE_ABORT