You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for providing such a repository, definitively a must have for c++ developer wanting to play with IA!
I'm trying to have tensorflow C++ api build from source with latest v2.13.0 Tensorflow inspiring from your docker file and could successfully compile tensorflow but I'm facing some issues at runtime executing hello-tensorflow
To build v2.13.0 with gpu support I've made a docker container using the official build images FROM tensorflow/build:2.13-python3.11
Then inside the container run: git clone --branch v2.13.0 --depth=1 https://github.com/tensorflow/tensorflow.git
Export all the env vars PYTHON_BIN_PATH, PYTHON_LIB_PATH ... CC_OPT_FLAGS, TF_SET_ANDROID_WORKSPACE as it is done in your docker file (line 43-52) and run the ./configure and finally run bazel build --jobs 8 --config=cuda --config=opt --config=monolithic --verbose_failures tensorflow:libtensorflow_cc.so tensorflow:install_headers;
which allow to successfully build tensorflow
Then I compiled protobuf from source using https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip using same steps of your docker file (line 81-93)
I could then compile the hello-tensorflow with a g++ hello-flow.o -lprotobuf -L/my/path/lib/tensorflow -ltensorflow_cc -ltensorflow_framework
The issues I faced are:
I've got to link with -ltensorflow_framework whereas I used --config=monolithic
when running ./hello-tensorflow I got this error
[libprotobuf ERROR external/com_google_protobuf/src/google/protobuf/descriptor_database.cc:642] File already exists in database: google/protobuf/any.proto
[libprotobuf FATAL external/com_google_protobuf/src/google/protobuf/descriptor.cc:1986] CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: GeneratedDatabase()->Add(encoded_file_descriptor, size):
Aborted (core dumped)
I was wondering if you would have any suggestion to address those issues?
And if you would have any plan to support TensorFlow v2.13.0 I would be happy to help.
Regards.
The text was updated successfully, but these errors were encountered:
Thank you for your interest in our project and sorry for the delayed response!
We have now finally been able to also play around a bit with building 2.13.0. I have just created new PR #6 for supporting 2.13.0. It should get merged and the libraries should get released tomorrow, if all goes well.
Thank you also for your input as to what you have tried so far. As to why your trial might not have worked: I think you need to switch to a non-monolithic build due to tensorflow/tensorflow#59081.
Hello,
Thanks for your answer and no problem for the delay.
Then with your new PR all good!
I'll still check tensorflow/tensorflow#59081 just for curiosity.
Hello,
Thank you for providing such a repository, definitively a must have for c++ developer wanting to play with IA!
I'm trying to have tensorflow C++ api build from source with latest v2.13.0 Tensorflow inspiring from your docker file and could successfully compile tensorflow but I'm facing some issues at runtime executing hello-tensorflow
To build v2.13.0 with gpu support I've made a docker container using the official build images
FROM tensorflow/build:2.13-python3.11
Then inside the container run:
git clone --branch v2.13.0 --depth=1 https://github.com/tensorflow/tensorflow.git
Export all the env vars
PYTHON_BIN_PATH, PYTHON_LIB_PATH ... CC_OPT_FLAGS, TF_SET_ANDROID_WORKSPACE
as it is done in your docker file (line 43-52) and run the./configure
and finally runbazel build --jobs 8 --config=cuda --config=opt --config=monolithic --verbose_failures tensorflow:libtensorflow_cc.so tensorflow:install_headers;
which allow to successfully build tensorflow
Then I compiled protobuf from source using
https://github.com/protocolbuffers/protobuf/archive/v3.21.9.zip
using same steps of your docker file (line 81-93)I could then compile the hello-tensorflow with a
g++ hello-flow.o -lprotobuf -L/my/path/lib/tensorflow -ltensorflow_cc -ltensorflow_framework
The issues I faced are:
-ltensorflow_framework
whereas I used--config=monolithic
I was wondering if you would have any suggestion to address those issues?
And if you would have any plan to support TensorFlow v2.13.0 I would be happy to help.
Regards.
The text was updated successfully, but these errors were encountered: