Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(Make): include compression when USE_TFLM_COMPRESSION is set #2985

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tensorflow/lite/micro/tools/make/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,17 @@ endif
# runtime that can be linked in to other programs.
MICROLITE_LIB_NAME := libtensorflow-microlite.a

# TFLM optional compression support (default disabled)
ENABLE_COMPRESSION := no
ifneq ($(USE_TFLM_COMPRESSION),)
# currently only Linux (x86), Xtensa targets supported
ifeq ($(TARGET), $(filter $(TARGET), linux xtensa))
CXXFLAGS += -DUSE_TFLM_COMPRESSION
CCFLAGS += -DUSE_TFLM_COMPRESSION
ENABLE_COMPRESSION := yes
endif
endif

# Where compiled objects are stored.
BASE_GENDIR := gen
GENDIR := $(BASE_GENDIR)/$(TARGET)_$(TARGET_ARCH)_$(BUILD_TYPE)
Expand All @@ -273,6 +284,9 @@ endif
ifneq ($(CO_PROCESSOR),)
GENDIR := $(GENDIR)_$(CO_PROCESSOR)
endif
ifeq ($(ENABLE_COMPRESSION), yes)
GENDIR := $(GENDIR)_compression
endif
GENDIR := $(GENDIR)_$(TOOLCHAIN)/

CORE_OBJDIR := $(GENDIR)obj/core/
Expand Down
Loading