Streamline basic TF Android Kokoro builds
PiperOrigin-RevId: 295244896 Change-Id: Id3b67f3b768149d8e0f7f0d4c4f4b9bb830fdf6b
This commit is contained in:
parent
4911ca4a01
commit
0d1db12677
@ -20,23 +20,23 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||||||
source "${SCRIPT_DIR}/builds_common.sh"
|
source "${SCRIPT_DIR}/builds_common.sh"
|
||||||
configure_android_workspace
|
configure_android_workspace
|
||||||
|
|
||||||
# The Bazel Android demo and Makefile builds are intentionally built for x86_64
|
# The Bazel builds are intentionally built for x86 and arm64 to maximize build
|
||||||
# and armeabi-v7a respectively to maximize build coverage while minimizing
|
# coverage while minimizing compilation time. For full build coverage and
|
||||||
# compilation time. For full build coverage and exposed binaries, see
|
# exposed binaries, see android_full.sh
|
||||||
# android_full.sh
|
|
||||||
|
|
||||||
echo "========== TensorFlow Demo Build Test =========="
|
echo "========== TensorFlow Basic Build Test =========="
|
||||||
TARGETS=
|
TARGETS=
|
||||||
TARGETS+=" //tensorflow/examples/android:tensorflow_demo"
|
# Building the Eager Runtime ensures compatibility with Android for the
|
||||||
# Also build the Eager Runtime so it remains compatible with Android for the
|
|
||||||
# benefits of clients like TensorFlow Lite. For now it is enough to build only
|
# benefits of clients like TensorFlow Lite. For now it is enough to build only
|
||||||
# :execute, which what TF Lite needs.
|
# :execute, which what TF Lite needs. Note that this does *not* build the
|
||||||
|
# full set of mobile ops/kernels, as that can be prohibitively expensive.
|
||||||
TARGETS+=" //tensorflow/core/common_runtime/eager:execute"
|
TARGETS+=" //tensorflow/core/common_runtime/eager:execute"
|
||||||
# Enable sandboxing so that zip archives don't get incorrectly packaged
|
# Enable sandboxing so that zip archives don't get incorrectly packaged
|
||||||
# in assets/ dir (see https://github.com/bazelbuild/bazel/issues/2334)
|
# in assets/ dir (see https://github.com/bazelbuild/bazel/issues/2334)
|
||||||
# TODO(gunan): remove extra flags once sandboxing is enabled for all builds.
|
# TODO(gunan): remove extra flags once sandboxing is enabled for all builds.
|
||||||
bazel --bazelrc=/dev/null build \
|
bazel --bazelrc=/dev/null build \
|
||||||
--compilation_mode=opt --cxxopt=-std=c++1y --fat_apk_cpu=x86_64 \
|
--compilation_mode=opt --cxxopt=-std=c++14 \
|
||||||
|
--config=android_arm64 --fat_apk_cpu=x86,arm64-v8a \
|
||||||
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
|
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
|
||||||
--define=grpc_no_ares=true \
|
--define=grpc_no_ares=true \
|
||||||
${TARGETS}
|
${TARGETS}
|
||||||
|
@ -49,7 +49,6 @@ do
|
|||||||
//tensorflow/examples/android:libtensorflow_demo.so \
|
//tensorflow/examples/android:libtensorflow_demo.so \
|
||||||
//tensorflow/tools/benchmark:benchmark_model
|
//tensorflow/tools/benchmark:benchmark_model
|
||||||
|
|
||||||
copy_lib bazel-bin/tensorflow/core/libandroid_tensorflow_lib.lo
|
|
||||||
copy_lib bazel-bin/tensorflow/tools/android/inference_interface/libtensorflow_inference.so
|
copy_lib bazel-bin/tensorflow/tools/android/inference_interface/libtensorflow_inference.so
|
||||||
copy_lib bazel-bin/tensorflow/examples/android/libtensorflow_demo.so
|
copy_lib bazel-bin/tensorflow/examples/android/libtensorflow_demo.so
|
||||||
copy_lib bazel-bin/tensorflow/tools/benchmark/benchmark_model
|
copy_lib bazel-bin/tensorflow/tools/benchmark/benchmark_model
|
||||||
|
Loading…
Reference in New Issue
Block a user