replace "tensorflow/contrib/android => tensorflow/tools/android/inference_interface"
PiperOrigin-RevId: 269659438
This commit is contained in:
parent
e72f5dd506
commit
63f1dd2414
@ -1466,7 +1466,7 @@ See also [TensorBoard 0.1.4](https://github.com/tensorflow/tensorboard/releases/
|
|||||||
* TensorForest multi-regression bug fix.
|
* TensorForest multi-regression bug fix.
|
||||||
* Framework now supports armv7, cocoapods.org now displays correct page.
|
* Framework now supports armv7, cocoapods.org now displays correct page.
|
||||||
* Script to create iOS framework for CocoaPods.
|
* Script to create iOS framework for CocoaPods.
|
||||||
* Android releases of TensorFlow are now pushed to jcenter for easier integration into apps. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/android/README.md for more details.
|
* Android releases of TensorFlow are now pushed to jcenter for easier integration into apps. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/android/inference_interface/README.md for more details.
|
||||||
* TensorFlow Debugger (tfdbg):
|
* TensorFlow Debugger (tfdbg):
|
||||||
* Fixed a bug that prevented tfdbg from functioning with multi-GPU setups.
|
* Fixed a bug that prevented tfdbg from functioning with multi-GPU setups.
|
||||||
* Fixed a bug that prevented tfdbg from working with `tf.Session.make_callable`.
|
* Fixed a bug that prevented tfdbg from working with `tf.Session.make_callable`.
|
||||||
@ -1569,7 +1569,7 @@ answered questions, and were part of inspiring discussions.
|
|||||||
* [`SavedModel CLI`](https://www.tensorflow.org/versions/master/guide/saved_model_cli) tool available to inspect and execute MetaGraph in SavedModel
|
* [`SavedModel CLI`](https://www.tensorflow.org/versions/master/guide/saved_model_cli) tool available to inspect and execute MetaGraph in SavedModel
|
||||||
* Android releases of TensorFlow are now pushed to jcenter for easier
|
* Android releases of TensorFlow are now pushed to jcenter for easier
|
||||||
integration into apps. See
|
integration into apps. See
|
||||||
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/android/README.md
|
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/android/inference_interface/README.md
|
||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
## Deprecations
|
## Deprecations
|
||||||
|
@ -57,7 +57,7 @@ def nativeOutDir = 'libs/' + cpuType
|
|||||||
// Default to building with Bazel and override with make if requested.
|
// Default to building with Bazel and override with make if requested.
|
||||||
def nativeBuildRule = 'buildNativeBazel'
|
def nativeBuildRule = 'buildNativeBazel'
|
||||||
def demoLibPath = '../../../bazel-bin/tensorflow/examples/android/libtensorflow_demo.so'
|
def demoLibPath = '../../../bazel-bin/tensorflow/examples/android/libtensorflow_demo.so'
|
||||||
def inferenceLibPath = '../../../bazel-bin/tensorflow/contrib/android/libtensorflow_inference.so'
|
def inferenceLibPath = '../../../bazel-bin/tensorflow/tools/android/inference_interface/libtensorflow_inference.so'
|
||||||
|
|
||||||
// Override for Makefile builds.
|
// Override for Makefile builds.
|
||||||
if (nativeBuildSystem == 'makefile') {
|
if (nativeBuildSystem == 'makefile') {
|
||||||
|
@ -51,7 +51,8 @@ final class NativeLibrary {
|
|||||||
// (2) The required native code has been statically linked (through a custom launcher), OR
|
// (2) The required native code has been statically linked (through a custom launcher), OR
|
||||||
// (3) The native code is part of another library (such as an application-level library)
|
// (3) The native code is part of another library (such as an application-level library)
|
||||||
// that has already been loaded. For example, tensorflow/examples/android and
|
// that has already been loaded. For example, tensorflow/examples/android and
|
||||||
// tensorflow/contrib/android include the required native code in differently named libraries.
|
// tensorflow/tools/android/inference_interface include the required native code in
|
||||||
|
// differently named libraries.
|
||||||
//
|
//
|
||||||
// Doesn't matter how, but it seems the native code is loaded, so nothing else to do.
|
// Doesn't matter how, but it seems the native code is loaded, so nothing else to do.
|
||||||
return;
|
return;
|
||||||
|
@ -26,7 +26,7 @@ path and pass -DSELECTIVE_REGISTRATION and -DSUPPORT_SELECTIVE_REGISTRATION
|
|||||||
When compiling for Android:
|
When compiling for Android:
|
||||||
bazel build -c opt --copt="-DSELECTIVE_REGISTRATION" \
|
bazel build -c opt --copt="-DSELECTIVE_REGISTRATION" \
|
||||||
--copt="-DSUPPORT_SELECTIVE_REGISTRATION" \
|
--copt="-DSUPPORT_SELECTIVE_REGISTRATION" \
|
||||||
//tensorflow/contrib/android:libtensorflow_inference.so \
|
//tensorflow/tools/android/inference_interface:libtensorflow_inference.so \
|
||||||
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
|
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
|
||||||
--crosstool_top=//external:android/crosstool --cpu=armeabi-v7a
|
--crosstool_top=//external:android/crosstool --cpu=armeabi-v7a
|
||||||
"""
|
"""
|
||||||
|
@ -45,17 +45,17 @@ do
|
|||||||
--crosstool_top=//external:android/crosstool \
|
--crosstool_top=//external:android/crosstool \
|
||||||
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
|
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
|
||||||
//tensorflow/core:android_tensorflow_lib \
|
//tensorflow/core:android_tensorflow_lib \
|
||||||
//tensorflow/contrib/android:libtensorflow_inference.so \
|
//tensorflow/tools/android/inference_interface:libtensorflow_inference.so \
|
||||||
//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/core/libandroid_tensorflow_lib.lo
|
||||||
copy_lib bazel-bin/tensorflow/contrib/android/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
|
||||||
|
|
||||||
mkdir -p ${AAR_LIB_TMP}/jni/${CPU}
|
mkdir -p ${AAR_LIB_TMP}/jni/${CPU}
|
||||||
cp bazel-bin/tensorflow/contrib/android/libtensorflow_inference.so ${AAR_LIB_TMP}/jni/${CPU}
|
cp bazel-bin/tensorflow/tools/android/inference_interface/libtensorflow_inference.so ${AAR_LIB_TMP}/jni/${CPU}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Build Jar and also demo containing native libs for all architectures.
|
# Build Jar and also demo containing native libs for all architectures.
|
||||||
@ -66,15 +66,15 @@ echo "========== Building TensorFlow Android Jar and Demo =========="
|
|||||||
bazel --bazelrc=/dev/null build --config=monolithic --fat_apk_cpu=${CPUS} \
|
bazel --bazelrc=/dev/null build --config=monolithic --fat_apk_cpu=${CPUS} \
|
||||||
--compilation_mode=opt --cxxopt=-std=c++11 \
|
--compilation_mode=opt --cxxopt=-std=c++11 \
|
||||||
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
|
--spawn_strategy=sandboxed --genrule_strategy=sandboxed \
|
||||||
//tensorflow/contrib/android:android_tensorflow_inference_java \
|
//tensorflow/tools/android/inference_interface:android_tensorflow_inference_java \
|
||||||
//tensorflow/contrib/android:android_tensorflow_inference_java.aar \
|
//tensorflow/tools/android/inference_interface:android_tensorflow_inference_java.aar \
|
||||||
//tensorflow/examples/android:tensorflow_demo
|
//tensorflow/examples/android:tensorflow_demo
|
||||||
|
|
||||||
echo "Copying demo, AAR and Jar to ${OUT_DIR}"
|
echo "Copying demo, AAR and Jar to ${OUT_DIR}"
|
||||||
cp bazel-bin/tensorflow/examples/android/tensorflow_demo.apk \
|
cp bazel-bin/tensorflow/examples/android/tensorflow_demo.apk \
|
||||||
bazel-bin/tensorflow/contrib/android/libandroid_tensorflow_inference_java.jar ${OUT_DIR}
|
bazel-bin/tensorflow/tools/android/inference_interface/libandroid_tensorflow_inference_java.jar ${OUT_DIR}
|
||||||
|
|
||||||
cp bazel-bin/tensorflow/contrib/android/android_tensorflow_inference_java.aar \
|
cp bazel-bin/tensorflow/tools/android/inference_interface/android_tensorflow_inference_java.aar \
|
||||||
${OUT_DIR}/tensorflow.aar
|
${OUT_DIR}/tensorflow.aar
|
||||||
|
|
||||||
# TODO(andrewharp): build native libs into AAR directly once
|
# TODO(andrewharp): build native libs into AAR directly once
|
||||||
|
Loading…
Reference in New Issue
Block a user