PatWie/tensorflow-cmake

1.14 Support

tykurtz opened this issue · 2 comments

Environment

info output
os Ubuntu 18.04
c++ version 7.4.0
TF version 1.14.1
TF is working works

Issue

Cmake fails on tensorflow version 1.14

Context:
Built tensorflow from source by slightly modifying your dockerfile

    bazel build -c opt --copt=-mavx --config=cuda \
       --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" \
       tensorflow/tools/pip_package:build_pip_package && \
    bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip

    bazel build -c opt --copt=-mavx --config=cuda \
       --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" \
       //tensorflow:libtensorflow_cc.so

    bazel build -c opt --copt=-mavx --config=cuda \
       --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" \
       //tensorflow:libtensorflow.so

I had to removetensorflow/tools/ci_build/builds/configured GPU \ as it would try to disable gpu support for whatever reason. Also had to symlink the output libaries to *.so.1. That's a separate issue but thought I would mention it.

Reproduce:
Ran cmake . -DPYTHON_EXECUTABLE=python2 in /inference/cc

Output

CMake Error at /home/pv20bot/coding/source_builds/tensorflow-cmake/cmake/modules/FindTensorFlow.cmake:254 (message):
  Your installed TensorFlow version 1.14 is not supported

  We tested against 1.9;1.9.0;1.10;1.10.0;1.11;1.11.0;1.12;1.12.0;1.13;1.13.1

Expectation
I'm thinking a warning is more appropriate than a fatal error on line 254 if major version > 1 or minor version > 13 to notify the user that the maintainer hasn't tested future releases yet, but that it might work.

Investigation
Like all good end users I simply commented out the lines causing the fatal error and wished for the best.

~/coding/source_builds/tensorflow-cmake/inference$ ./cc/inference_cc
...
Successfully opened dynamic library libcublas.so.10
input           Tensor<type: float shape: [1,2] values: [1 1]>
output          Tensor<type: float shape: [1,1] values: [-2.16181803]>
dense/kernel:0  Tensor<type: float shape: [2,1] values: [-0.908688426][-1.2531296]>
dense/bias:0    Tensor<type: float shape: [1] values: 0>

So far so good. Thanks for the awesome repo Pat!

1.15.2 support?

Looks good. I am happy to directly merge this as a PR.