Commit 8cfbc66f authored by Michael Crouse's avatar Michael Crouse Committed by Chromium LUCI CQ

Reland "Reland "[TFLite] Enable tflite in build for android and desktop.""

This is a reland of 3f534050

This resolves the builder issue for neon performance warnings.

Original change's description:
> Reland "[TFLite] Enable tflite in build for android and desktop."
>
> This is a reland of a4df03d0
>
> This addresses the revert by removing neon from the TFLite build
> for chromeos.
>
>
> Original change's description:
> > [TFLite] Enable tflite in build for android and desktop.
> >
> > Bug: 1165517
> > Binary-Size: Expected increase due to inclusion of TFLite in binary.
> > Change-Id: I1c4c7b26f257c152d9477855ad32a77c0d30b85f
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616241
> > Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> > Reviewed-by: Tarun Bansal <tbansal@chromium.org>
> > Reviewed-by: Sophie Chang <sophiechang@chromium.org>
> > Commit-Queue: Michael Crouse <mcrouse@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#845026}
>
> Cq-Include-Trybots: luci.chrome.try:chromeos-eve-chrome
> Bug: 1165517
> Binary-Size: Expected increase due to inclusion of TFLite in binary.
> TBR: Andrew Grieve <agrieve@chromium.org>
> TBR: Tarun Bansal <tbansal@chromium.org>
> Change-Id: I4b6b21b4a23a0c6978bfbb57150e9bf81300059f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2639648
> Commit-Queue: Michael Crouse <mcrouse@chromium.org>
> Reviewed-by: Tarun Bansal <tbansal@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#845478}

Bug: 1165517
Binary-Size: Expected increase due to inclusion of TFLite in binary.
Change-Id: I6f3b3a4a8b4bfda89eae49f9c24b684ff8ec8dab
Cq-Include-Trybots: luci.chrome.try:chromeos-eve-chrome
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2642742
Commit-Queue: Michael Crouse <mcrouse@chromium.org>
Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845770}
parent 6e4fa080
...@@ -4,5 +4,7 @@ ...@@ -4,5 +4,7 @@
declare_args() { declare_args() {
# This enables build with TFLite library. # This enables build with TFLite library.
build_with_tflite_lib = false # Currently only available for Desktop and Android.
build_with_tflite_lib =
is_android || is_win || is_linux || is_mac || is_chromeos
} }
...@@ -16,11 +16,13 @@ config("tflite_flags") { ...@@ -16,11 +16,13 @@ config("tflite_flags") {
# TODO(crbug.com/1147556): Try to clean/remove no-sign-compare if possible. # TODO(crbug.com/1147556): Try to clean/remove no-sign-compare if possible.
"-Wno-sign-compare", "-Wno-sign-compare",
"-Wno-gnu-inline-cpp-without-extern",
] ]
defines = [ defines = [
"TFLITE_WITHOUT_XNNPACK", "TFLITE_WITHOUT_XNNPACK",
"FARMHASH_NO_CXX_STRING", "FARMHASH_NO_CXX_STRING",
"NEON2SSE_DISABLE_PERFORMANCE_WARNING",
] ]
if (is_win) { if (is_win) {
...@@ -37,6 +39,12 @@ config("tflite_flags") { ...@@ -37,6 +39,12 @@ config("tflite_flags") {
if (is_linux || is_chromeos_lacros) { if (is_linux || is_chromeos_lacros) {
defines += [ "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK" ] defines += [ "GEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK" ]
} }
if (is_chromeos) {
# TODO(crbug.com/1168787): Determine if neon can be supported
# on chromeos builds.
defines += [ "TF_LITE_DISABLE_X86_NEON" ]
}
} }
source_set("tflite_public_headers") { source_set("tflite_public_headers") {
...@@ -53,7 +61,7 @@ source_set("tflite_public_headers") { ...@@ -53,7 +61,7 @@ source_set("tflite_public_headers") {
"src/tensorflow/lite/graph_info.h", "src/tensorflow/lite/graph_info.h",
"src/tensorflow/lite/interpreter.h", "src/tensorflow/lite/interpreter.h",
"src/tensorflow/lite/interpreter_builder.h", "src/tensorflow/lite/interpreter_builder.h",
"src/tensorflow/lite/kernls/builtin_op_kernels.h", "src/tensorflow/lite/kernels/builtin_op_kernels.h",
"src/tensorflow/lite/model.h", "src/tensorflow/lite/model.h",
"src/tensorflow/lite/model_builder.h", "src/tensorflow/lite/model_builder.h",
"src/tensorflow/lite/mutable_op_resolver.h", "src/tensorflow/lite/mutable_op_resolver.h",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment