tflite-micro icon indicating copy to clipboard operation
tflite-micro copied to clipboard

GreedyMemoryPlanner::operator delete(void *) is private

Open longhoangth opened this issue 1 year ago • 3 comments

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

longhoangth avatar May 17 '24 15:05 longhoangth

build with tflite-micro-arduino-examples

longhoangth avatar May 17 '24 15:05 longhoangth

@longhoangth

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

ddavis-2015 avatar May 18 '24 00:05 ddavis-2015

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

longhoangth avatar May 18 '24 06:05 longhoangth

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.

rascani avatar May 20 '24 17:05 rascani