-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build libtensorflowlite.so with TensorFlow ops supported for armdf? #48401
Comments
@thaink could you take a look? |
Actually, what I need is a C++ library that support interpreting TF ops as libtensorflowlite_flex_jni.so did on Android. |
@zhangguanqun if you use the jni how about building tensorflow-lite.aar and tensorflow-lite-select-tf-ops.aar? |
@thaink I did build tensorflow-lite.aar, and it works fine on my Android app. |
You can add "tensorflow/lite/delegates/flex:delegate" to the deps field of the rule "tensorflowlite" in tensorflow/lite/BUILD |
@thaink Thank u, I will try it. |
@thaink @abattery Here is my building command: From errors above, it means that directory "local_cuda" is referenced by target "cub", but it is not found.
But the dependency dir "local_cuda" dose not exist in bazel-tensorflow-src/external/, that's why the error occurs. |
After change deps from
Tensorflow source version: 2.5.0-dev20210210 |
@zhangguanqun What platform are you building on? I am not sure about this error, too. |
@thaink |
Did you run ./configure? |
@thaink |
Or, can I build libtensorflowlite.so without CUDA? |
Right. cub_archive is only pulled in if if_cuda is true. |
does adding --config=monolithic help? |
@thaink
Should I configure CUDA = false? |
Adding --config=monolithic does not help. |
@thaink
Than I try to rebuild libtensorflowlite.so with the same command, but got some errors with OPEN-SSL :(
My OpenSSL version is: 1.1.1 11 Sep 2018 |
right. cuda should be config to no. |
@thaink 🙏 |
I hope this is helpful.
|
@terryheo Thanks, advice 1st did help, errors about openssl did not exist, but, at the end of building, linking error reported:
|
How about increase the value of --experimental_ui_max_stdouterr_bytes? |
@thaink |
Finally made it ! Cmd that successfully build libtensorflowlite.so: |
@zhangguanqun how did you solve the problem below? |
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
Describe the problem
I need Tensorflow OPS to run tflite model inference in C++.
But how to build libtensorflowlite.so (for armdf) with TensorFlow ops ?
In document, it mentioned:
Add the TensorFlow ops delegate library dependency to the build dependencies: tensorflow/lite/delegates/flex:delegate
So how to do this?
Modify BUILD file in directory tensorflow_src/tensorflow/lite/ ?
Provide the exact sequence of commands / steps that you executed before running into the problem
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: