Skip to content

Commit

Permalink
Merge pull request tensorflow#70600 from tensorflow/r2.17-2d72742d40f
Browse files Browse the repository at this point in the history
r2.17 cherry-pick: 2d72742 "Add tensorflow support for 16k page sizes on arm64"
  • Loading branch information
learning-to-play authored Jun 28, 2024
2 parents 8581151 + 742ccbb commit b3dcff9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tensorflow/lite/build_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,22 @@ def tflite_linkopts_no_undefined():
}),
)

def tflite_pagesize_linkopts():
"""Defines linker flags for setting the page size."""
return select({
clean_dep("//tensorflow:android_arm64"): [
"-Wl,-z,max-page-size=16384",
],
"//conditions:default": [],
})

def tflite_linkopts():
"""Defines linker flags for linking TFLite binary."""
return tflite_linkopts_unstripped() + tflite_symbol_opts()
return tflite_linkopts_unstripped() + tflite_symbol_opts() + tflite_pagesize_linkopts()

def tflite_jni_linkopts():
"""Defines linker flags for linking TFLite binary with JNI."""
return tflite_jni_linkopts_unstripped() + tflite_symbol_opts()
return tflite_jni_linkopts_unstripped() + tflite_symbol_opts() + tflite_pagesize_linkopts()

def tflite_jni_binary(
name,
Expand Down

0 comments on commit b3dcff9

Please sign in to comment.