From 60140d936905b99eaef566973ca767bf8f7862c2 Mon Sep 17 00:00:00 2001 From: Robert David Date: Tue, 14 Apr 2020 12:36:54 -0700 Subject: [PATCH] Do not use TfLitePtrUnion.uint8, it's deprecated; use .data instead. PiperOrigin-RevId: 306493152 Change-Id: I1805afc68e4ffb37a076bec79e0e51eac9110336 --- tensorflow/lite/micro/micro_allocator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/lite/micro/micro_allocator.cc b/tensorflow/lite/micro/micro_allocator.cc index 8c774aec4b1..9cb6cecba44 100644 --- a/tensorflow/lite/micro/micro_allocator.cc +++ b/tensorflow/lite/micro/micro_allocator.cc @@ -83,10 +83,10 @@ TfLiteStatus AllocateVariables( TfLiteTensor* runtime_tensors, SimpleMemoryAllocator* allocator) { for (size_t i = 0; i < flatbuffer_tensors->size(); ++i) { if (flatbuffer_tensors->Get(i)->is_variable()) { - runtime_tensors[i].data.uint8 = allocator->AllocateFromTail( + runtime_tensors[i].data.data = allocator->AllocateFromTail( runtime_tensors[i].bytes, kBufferAlignment); // Allocation failure. - if (runtime_tensors[i].data.uint8 == nullptr) { + if (runtime_tensors[i].data.data == nullptr) { return kTfLiteError; } }