[tensorflow gpu] build tensorflow shared library for C & apply it - helloahn/nnstreamer GitHub Wiki
environment
- ubuntu 18.04
- nvidia 418
- cuda 9.0
- cudnn 7.3.1
- bazel 0.18.0
- GeForce GTX 1080
2019-03-12 20:10:40.178166: E tensorflow/stream_executor/cuda/cuda_dnn.cc:332] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2019-03-12 20:10:40.178233: E tensorflow/stream_executor/cuda/cuda_dnn.cc:340] possibly insufficient driver version: 390.116.0
To solve above errors, I upgraded nvidia driver version to 418 from 390.(guide) No input method(KB, mouse) is working after 418
$ sudo apt-get install xserver-xorg-input-all
build tensorflow shared library for C++
tensorflow$ bazel build //tensorflow:libtensorflow_cc.so
below 2 .so files are generated
libtensorflow_cc.so
libtensorflow_framework.so
how to apply
It's simply applied with cmake for instance
link_libraries(
${PATH_TO_LIB}/libtensorflow_cc.so
${PATH_TO_LIB}/libtensorflow_framework.so
)