Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ddavis-2015 committed Oct 19, 2024
1 parent 3d765e6 commit 4a02b22
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ void ShowOutputCRC32(tflite::MicroInterpreter* interpreter) {

int Benchmark(const uint8_t* model_data, tflite::PrettyPrintType print_type) {
static Profiler profiler;
#ifdef USE_TFLM_COMPRESSION
static Profiler profiler2;
#endif // USE_TFLM_COMPRESSION

alignas(16) static uint8_t tensor_arena[kTensorArenaSize];

uint32_t event_handle = profiler.BeginEvent("TfliteGetModel");
Expand All @@ -193,7 +196,9 @@ int Benchmark(const uint8_t* model_data, tflite::PrettyPrintType print_type) {
profiler.Log();
profiler.ClearEvents();

#ifdef USE_TFLM_COMPRESSION
TF_LITE_ENSURE_STATUS(interpreter.SetMicroExternalContext(&profiler2));
#endif // USE_TFLM_COMPRESSION

MicroPrintf(""); // null MicroPrintf serves as a newline.

Expand Down

0 comments on commit 4a02b22

Please sign in to comment.