Android compiles tensorflowlite.so

Compile tensorflowlite.so for Android

https://www.tensorflow.org/lite

This article records the update time 2019-06-29 tensorflow installation time. Go to GitHub to download the latest at that time... It should be 2. X. after reading many blogs, it is said that it is best to compile with bazel... If you cmake (if you can, there is no problem...)

1. The time of installing tensorflow for the first time should be March 1, 2019 or earlier. (I don't remember the specific date). There are pits here, I can't say

2. I found this blog, A. modify workspace, B. add content in LITE / build

url

3. When using the previous version of tensorflow, the compilation is always wrong... I don't know the reason.. there is no in-depth study... There are several points to be clear: A. what file is downloaded in the first 13 lines of the workspace under the root directory of tensorflow... B. bazel version I compiled at that time: 0.26.1 C. post the compiled so script:

bazel build --cxxopt='--std=c++11' //tensorflow/lite:libtensorflowlite.so \
--crosstool_top=//external:android/crosstool \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
--cpu=arm64-v8a --verbose_failures \
--incompatible_bzl_disallow_load_after_statement=false

4. --- attach bazel --- A. what is bazel

https://docs.bazel.build/versions/0.26.0/bazel-overview.html

B. Address

https://github.com/bazelbuild/bazel/releases

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>