Skip to content

Commit

Permalink
Sync from tflite-micro at d777295.
Browse files Browse the repository at this point in the history
Signed-off-by: CFU-Playground-Bot <cfu-playground-bot@google.com>
  • Loading branch information
cfu-playground-bot committed Aug 17, 2022
1 parent fcc61af commit 6309a23
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion conf/tflite-micro.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b4b0891
d777295
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,12 @@ TfLiteStatus AllocationInfoBuilder::GetOfflinePlannedOffsets(
if (model_->metadata()) {
for (size_t i = 0; i < model_->metadata()->size(); ++i) {
auto metadata = model_->metadata()->Get(i);
if (strncmp(metadata->name()->c_str(), kOfflineMemAllocMetadata,
std::min((size_t)metadata->name()->size(),
strlen(kOfflineMemAllocMetadata))) == 0) {
const size_t metadata_name_size = (size_t)metadata->name()->size();

if ((strncmp(metadata->name()->c_str(), kOfflineMemAllocMetadata,
std::min(metadata_name_size,
strlen(kOfflineMemAllocMetadata))) == 0) &&
metadata_name_size == strlen(kOfflineMemAllocMetadata)) {
const flatbuffers::Vector<flatbuffers::Offset<Buffer>>* buffers =
model_->buffers();
auto* buffer = (*buffers)[metadata->buffer()];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ CXXFLAGS += -D$(ARM_CPU)$(CMSIS_ARM_FEATURES)
CCFLAGS += -D$(ARM_CPU)$(CMSIS_ARM_FEATURES)

# For Ethos-U Core Driver. Header file name is depending on target architecture.
CXXFLAGS += -DCMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE=\"$(ARM_CPU).h\"
CXXFLAGS += -DCMSIS_DEVICE_ARM_CORTEX_M_XX_HEADER_FILE=\"$(ARM_CPU)$(CMSIS_ARM_FEATURES).h\"

THIRD_PARTY_CC_SRCS += \
$(ETHOS_U_CORE_PLATFORM)/retarget.c \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -86,6 +86,7 @@ else ifeq ($(TARGET_ARCH), cortex-m7+fp)
ARM_LDFLAGS := -Wl,--cpu=Cortex-M7
FLOAT=hard
GCC_TARGET_ARCH := cortex-m7
CMSIS_ARM_FEATURES := _DP

else ifeq ($(TARGET_ARCH), cortex-m85)
CORE=M85
Expand Down

0 comments on commit 6309a23

Please sign in to comment.