Comments (7)
Hi, this behavior is strange, but I don't really know what is wrong. Fortunately, you don't need to use NDEBUG
macro, since tensorflow is already configured for optimized build here.
from tensorflow_cc.
Sorry, you are talking about the example CMakeLists, not the tensorflow_cc CMakeLists. That may cause some issues. Can you please try to build the example with -DCMAKE_BUILD_TYPE=Release
and tell me whether it produces the same error?
from tensorflow_cc.
Thanks!
So, I did following steps
cd example
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release
make -j
Then I did "ldd example" and I couldn't find the libtensorflow_cc.so file but it can find libtensorflow_framework.so. Moreover, the same error if I execute ./example.
"No session factory registered for the given session options: {target: "" config: } Registered factories are {}."
I am not able to understand how -DNDEBUG flag affects the library linking part!?
from tensorflow_cc.
Hi, thank you. I was looking into it, but unfortunately, I have not been able to solve it.
Tensorflow uses global register objects. I believe the problem is that without the NDEBUG
symbol, the global register objects that appear to be unused get optimized out by the compiler. Unfortunately, I have no idea how to avoid it.
Does anyone have a suggestion?
Relevant issues: tensorflow/tensorflow#3308 tensorflow/tensorflow#6396 tensorflow/tensorflow#4242
from tensorflow_cc.
@achalshah20 It appears that monolithic build solves the issue, can you please try #64, whether it helps you as well?
from tensorflow_cc.
Hi @FloopCZ , Yes it works. Thanks for the fix!
I am still wondering what monolithic build has to do with debug flags?
from tensorflow_cc.
Monolithic build merges all the libraries into a single library libtensorflow_cc.so
(i.e., no extra libtensorflow_framework.so
). This single library has to be linked, so we avoid optimizing out the global registers. It is a little bit hacky, though. :-)
from tensorflow_cc.
Related Issues (20)
- what is the Tensorflow version that i can compile with bazel 3.7.1? HOT 1
- Build Failed
- subprocess.CalledProcessError: Command '['bazel', 'build', '-c', 'opt', '//mediapipe_api:mediapipe_proto_srcs']' returned non-zero exit status 1. HOT 1
- tensorflow_cc slow startup, tensorflow over python works as expected HOT 7
- Bazel build fails on both macOS and Ubuntu HOT 3
- Where are certain tensorflow c/cc files? HOT 3
- Use system Eigen and/or provide FindEigen.cmake
- error while built HOT 1
- support for new versions of tensorflow
- It seems that Tensorflow_cc does not use the GPU on my installation HOT 19
- Tag/release 2.6/2.7/2.8 HOT 4
- is there a way to do this in windows HOT 2
- Duplicate #136 code and meet make errors HOT 16
- error downloads file from llvm repository HOT 2
- Inconsistent CUDA toolkit path: /usr vs /usr/lib HOT 2
- Conan package
- how to include tensorflow lite libraries also
- Cc1plus error when building tensorflow HOT 1
- Linking step fails with undefined symbols. HOT 4
- Still requires building tensorflow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow_cc.