# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
import("//chromeos/components/libsegmentation/buildflags.gni")
declare_args() {
# This enables building TFLite with XNNPACK. Currently only available for
# Linux, macOS and Windows arm64/x64/x86 targets and ChromeOS non-ARM targets.
build_tflite_with_xnnpack =
(is_win || is_mac || is_linux || (is_chromeos && overlay_include_cbx)) &&
(current_cpu == "arm64" || current_cpu == "x64" || current_cpu == "x86")
# Turns on TFLITE_WITH_RUY, using ruy as the gemm backend instead of gemmlowp.
build_tflite_with_ruy = true
# This enables building TFLite's NNAPI delegate, currently experimental.
build_tflite_with_nnapi = false
}