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 6, 2024
2 parents 9b5cc0c + 2f1f185 commit dc028a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tensorflow/lite/micro/build_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def tflm_copts():
"""
return [
"-fno-asynchronous-unwind-tables",
"-fno-exceptions",
"-Wall",
"-Wno-unused-parameter",
"-Wnon-virtual-dtor",
Expand All @@ -31,14 +32,21 @@ def tflm_defines():
this function directly; however, it may be useful when additively
overriding the defaults for a particular target.
"""
return select({
defines = [
# Exclude dynamic memory use in shared TFLite code.
"TF_LITE_STATIC_MEMORY=1",
]

defines += 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 dc028a5

Please sign in to comment.