@@ -48,6 +48,7 @@ if (CONFIG_IDF_TARGET)
4848 set (TF_ESP_DIR "${CMAKE_CURRENT_LIST_DIR} /../third_party/esp-tflite-micro" )
4949 set (TF_LITE_DIR "${TF_ESP_DIR} /tensorflow/lite" )
5050 set (TF_MICRO_DIR "${TF_LITE_DIR} /micro" )
51+ set (COMPILER_MLIR_DIR "${TF_ESP_DIR} /tensorflow/compiler/mlir" )
5152 set (TF_MICROLITE_LOG
5253 ${TF_MICRO_DIR} /debug_log.cc
5354 ${TF_MICRO_DIR} /micro_time.cc
@@ -136,6 +137,10 @@ file(GLOB TF_MICRO_TFLITE_BRIDGE_SRCS
136137 "${TF_MICRO_DIR} /tflite_bridge/*.cc"
137138 "${TF_MICRO_DIR} /tflite_bridge/*.c" )
138139
140+ file (GLOB TF_MLIR_API_SRCS
141+ "${CMAKE_CURRENT_LIST_DIR} /tflm/tensorflow/compiler/mlir/lite/core/api/error_reporter.cc"
142+ )
143+
139144set (BOARD_ADDITIONAL_SRCS "" )
140145
141146if (CONFIG_IDF_TARGET)
@@ -162,7 +167,6 @@ endif()
162167# microlite micropython module sources
163168set (MICROLITE_PYTHON_SRCS
164169 ${CMAKE_CURRENT_LIST_DIR} /microlite/tensorflow-microlite.c
165- ${CMAKE_CURRENT_LIST_DIR} /microlite/micropython-error-reporter.cpp
166170)
167171
168172if (CONFIG_IDF_TARGET)
@@ -195,6 +199,9 @@ target_sources(microlite INTERFACE
195199 ${TF_MICROLITE_LOG}
196200 ${ESP_NN_SRCS} # include esp-nn sources for Espressif chipsets
197201 ${ESP_NN_WRAPPERS} # add tflm wrappers for ESP_NN
202+
203+ ${TF_MLIR_API_SRCS}
204+
198205 )
199206
200207if (CONFIG_IDF_TARGET)
@@ -239,6 +246,7 @@ target_include_directories(microlite INTERFACE
239246 ${CMAKE_CURRENT_LIST_DIR} /tflm/third_party/flatbuffers/include
240247 ${CMAKE_CURRENT_LIST_DIR} /tflm/third_party/gemmlowp
241248 ${CMAKE_CURRENT_LIST_DIR} /tflm/third_party/ruy
249+ ${CMAKE_CURRENT_LIST_DIR} /tflm/tensorflow/compiler/mlir
242250)
243251endif ()
244252
0 commit comments