tensorflow / tflite-micro

Infrastructure to enable deployment of ML models to low-power resource-constrained embedded targets (including microcontrollers and digital signal processors).
Apache License 2.0
1.74k stars 769 forks source link

GreedyMemoryPlanner::operator delete(void *) is private #2576

Closed longhoangth closed 1 month ago

longhoangth commented 1 month ago

src/tensorflow/lite/micro/micro_allocator.cpp:390:55: error: 'static void tflite::GreedyMemoryPlanner::operator delete(void*)' is private within this context

longhoangth commented 1 month ago

build with tflite-micro-arduino-examples

ddavis-2015 commented 1 month ago

@longhoangth

Can you provide a much more detailed description of your issue?

longhoangth commented 1 month ago

When I modify the arduino tensorflow lite library to work with esp32s3 on platformio, the build log error is in image below. Screenshot 2024-05-18 133011

rascani commented 1 month ago

This is by design. The GreedyMemoryPlanner, like several other TFLM objects, is designed to be allocated from the arena provided to the MicroInterpreter. It is typically allocated here: https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/micro_allocator.cc#L88-L90. Notice how it is constructed with placement new.