Skip to content

CMake file generation for my project #43

@OronG13

Description

@OronG13

Hello cjweeks,
Short background:
I'm interesting about an inference application development that will execute an already trained model that was previously developed using the Tensorflow APIs.
The execution shall use an NVIDIA GPU accelerations capabilities based on the NVIDIA cuDNN library only without TensorRT usage at all.

The application shall be based on Tensorflow C++ interface only (no Python at all) which means that I'm interesting to perform a process like this:
https://www.tensorflow.org/install/install_sources

but for C++ not for Python.

After I will have the installed Tensorflow I will want to develop my inference application using the Nsight Eclipse Edition so my expectation is that I will have a kind of *.so file (or several files) that my application will be able to compile and linkage with them.

So, I founded your tensorflow-cmake guide an saw that if I will use it I will get the tensorflow library .so file.

These are my questions:

  1. What are the reasons that the Eigen and Protobuf are required?
    Is the libtensorflow_all.so depends on them?
    Will my application linkage process will fail without them?
    What are the final output of their installation process? Are they *.so files too?
  2. I cannot understand why I need to work with CMake? As I desribed above my plan is to work with the Nsight Eclipse Edition which is a full IDE provided by NVIDIA.
    Please clarify why I need to use the CMake? Why I need CMake files if my plan is to use the Nsight?
    What is the meaning of My CMake modules directory?
  3. I executed all the instructions till the phase of the Eigen generation and I got stuck.
    Note: I needed to edit the eigen.sh file and replace the line ARCHIVE_HEADER="native.new_http_archive(\s*" with ARCHIVE_HEADER="tf_http_archive(\s*"
    (Without that change I couldn't install the eigen)

I performed the following command:
~/Desktop/DL/tensorflow/tensorflow-cmake-master$ sudo ./eigen.sh generate installed /home/ubuntu/tensorflow

And I got the following error:
Finding Eigen version in /home/ubuntu/tensorflow using method 0...
Finding Eigen version in /home/ubuntu/tensorflow using method 1...
Finding Eigen version in /home/ubuntu/tensorflow using method 2...

Found Eigen information in /home/ubuntu/tensorflow:
Eigen URL(s): https://mirror.bazel.build/bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz https://bitbucket.org/eigen/eigen/get/fd6845384b86.tar.gz
Eigen URL Hash: d956415d784fa4e42b6a2a45c32556d6aec9d0a3d8ef48baee2522ab762556a9
Eigen Archive Hash: fd6845384b86

Found Eigen in /usr/local
Eigen_VERSION.cmake written to .
cp: '/home/ubuntu/Desktop/DL/tensorflow-cmake-master/FindEigen.cmake' and './FindEigen.cmake' are the same file
Command failed - script terminated

I founded the following:
#26

But unfortunately I couldn't understand it correctly, it was not clear enough for me to understand why and what I shall do.

Any advice will be grateful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions