Skip to content

Commit

Permalink
Merge branch 'main' into feat-compression
Browse files Browse the repository at this point in the history
  • Loading branch information
suleshahid authored Dec 5, 2024
2 parents 463272f + 25334d1 commit 46f0a99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(
"//tensorflow/lite/micro:build_def.bzl",
"tflm_cc_binary",
"tflm_cc_library",
"tflm_cc_test",
"tflm_copts",
Expand Down Expand Up @@ -414,6 +413,7 @@ tflm_cc_library(
"hexdump.h",
],
deps = [
":debug_log",
":span",
":static_vector",
],
Expand Down
12 changes: 3 additions & 9 deletions tensorflow/lite/micro/build_def.bzl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""TfLite Micro BUILD options."""

def tflm_copts():
"""Returns the default copts for targets in TFLM.
Expand All @@ -7,7 +9,6 @@ def tflm_copts():
"""
return [
"-fno-asynchronous-unwind-tables",
"-fno-exceptions",
"-Wall",
"-Wno-unused-parameter",
"-Wnon-virtual-dtor",
Expand All @@ -30,21 +31,14 @@ def tflm_defines():
this function directly; however, it may be useful when additively
overriding the defaults for a particular target.
"""
defines = [
# Exclude dynamic memory use in shared TFLite code.
"TF_LITE_STATIC_MEMORY=1",
]

defines += select({
return select({
# Include code for the compression feature.
"//:with_compression_enabled": ["USE_TFLM_COMPRESSION=1"],

# By default, don't include code for the compression feature.
"//conditions:default": [],
})

return defines

def tflm_cc_binary(copts = tflm_copts(), defines = tflm_defines(), **kwargs):
native.cc_binary(
copts = copts,
Expand Down

0 comments on commit 46f0a99

Please sign in to comment.