FloopCZ / tensorflow_cc

Build and install TensorFlow C++ API library.
MIT License
761 stars 183 forks source link

Where are certain tensorflow c/cc files? #282

Closed createmomo closed 2 years ago

createmomo commented 3 years ago

I can run the code successfully. But I cannot find some c/cc files in the lib/include directories. I am wondering why my code can run without errors but there is no these .h files in my lib/include folder? :)

For example, in the code I added and I can include them with no problem:

include <tensorflow/cc/client/client_session.h>

include <tensorflow/cc/ops/standard_ops.h>

include <tensorflow/core/framework/tensor.h>

I also checked the lib/include folder, but there are no client directory at all.

Anyone has this concern? (Thank you very much and looking forward to the response!)

FloopCZ commented 2 years ago

That is strange, have you tried e.g.:

find /usr -name "client_session.h"

?

njzjz commented 2 years ago

find /usr -name "client_session.h" provides /usr/local/include/tensorflow/bazel-bin/tensorflow/include/tensorflow/cc/client/client_session.h.

It's a bit strange when tensorflow/cc/client/client_session.h is not under the /usr/local/include directory...

FloopCZ commented 2 years ago

Yes, the bazel build spreads the header files in multiple directories, however, the cmake target registers all those directories as include folders. See the list of include folders.