-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference at cc/inference sample #53
Comments
Are the env-var |
I tried this, but I get the exact same error message when doing a make. |
Minor: Should be I cannot reproduce this issue here. |
I updated my post and put detailed information about my bazel configuration. Maybe this helps. |
I am a bit confused. You built TensorFlow from source (v1.13) and installed tensorflow pip (v1.9). If this is correct, then there is likely the following issue:
Since you have installed This would at least explain the linker errors you observed. |
Environment
python -c "import tensorflow as tf; sess=tf.InteractiveSession()"
worksIssue
I can't build the inference example for cc. The make command fails with a linkage error.
Context:
I cloned this repo and followed the instructions.
Reproduce:
git clone https://github.com/tensorflow/tensorflow/ && cd tensorflow
git checkout r1.13
./configure
(python2.7, cuda version 9.0)with following options:
XLA JIT support: Y
OPENCL SYCL support: N
ROCm support: N
CUDA support: Y (Version 9)
cuDNN version 7
TensorRT support: N
NCCL version: https://github.com/nvidia/nccl
cuda compute capabilities: 6.1,6.1
clang as CUDA compiler: N
MPI support: N
bazel optimization flags: -march=native -Wno-sign-compare
WS for Android: N
mkdir ${TENSORFLOW_BUILD_DIR}
6)
cp ${TENSORFLOW_SOURCE_DIR}/bazel-bin/tensorflow/*.so ${TENSORFLOW_BUILD_DIR}/
cp ${TENSORFLOW_SOURCE_DIR}/bazel-genfiles/tensorflow/cc/ops/*.h ${TENSORFLOW_BUILD_DIR}/includes/tensorflow/cc/ops/
Therefore I did a
mkdir -p ${TENSORFLOW_BUILD_DIR}/includes/tensorflow/cc/ops/
before.
cd inference/cc
mkdir build
cmake ..
(Tried it withcmake .. -DPYTHON_EXECUTABLE=python
as well)make
Output
Expectation
Successful make build.
Investigation
I tried several linking flags in the cmake file (-ltensorflow, -tensorflow_cc, -ltensorflow_framework) suggested at https://github.com/tensorflow/tensorflow/issues/14632.
I tried this steps described above on two different machines (Both Ubuntu 16.04, one with cuda as shown above, the other without cuda), but both failed with the error shown above.
I tried the Custom Operation guide in the tensorflow-cmake repo as well, but this didn't succeed neither.
The text was updated successfully, but these errors were encountered: