Comments (6)
Thanks for the info.
Finally I get to run successfully. Here is the configuration that works for me:
Ubuntu 16.04
tensorflow-gpu-1.4.1
cuda-8.0
cudnn6
g++-4.9
Geforce titan x
modify cuda_config.h according to my situation, and manually copied this file to
$TF_INC/tensorflow/stream_executor/cuda/
I also need to link against tensorflow_famework by adding the following to make.sh
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
and add the following to g++ commands
-D_GLIBCXX_USE_CXX11_ABI=0 -L$TF_LIB -ltensorflow_framework
add the following to all nvcc and g++ commands:
-I /usr/local/lib/python2.7/dist-packages/tensorflow/include/external/nsync/public/
Undefined symbols occurs when:
using tensorflow-gpu>1.5, from pip or source, cuda-8.0 or cuda-9.0.
I didn't try tensorflow-gpu-1.4.1 with cuda-9.0.
Hope this helps.
The script I used:
cuda_config.h
#ifndef CUDA_CUDA_CONFIG_H_
#define CUDA_CUDA_CONFIG_H_
#define TF_CUDA_CAPABILITIES CudaVersion("5.2")
#define TF_CUDA_VERSION "8.0"
#define TF_CUDNN_VERSION "6"
#define TF_CUDA_TOOLKIT_PATH "/usr/local/cuda-8.0"
#endif // CUDA_CUDA_CONFIG_H_
make.sh (only for deform_conv_layer)
#!/usr/bin/env bash
TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
TF_INCA=/usr/local/lib/python2.7/dist-packages/tensorflow/include/external/nsync/public/
#/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/stream_executor/
echo $TF_INC
echo $TF_LIB
CUDA_HOME=/usr/local/cuda/
sudo cp ./cuda_config.h $TF_INC/tensorflow/stream_executor/cuda/
#if [ ! -f $TF_INC/tensorflow/stream_executor/cuda/cuda_config.h ]; then
# cp ./cuda_config.h $TF_INC/tensorflow/stream_executor/cuda/
#fi
cd deform_conv_layer
nvcc -std=c++11 -ccbin=/usr/bin/g++-4.9 -c -o deform_conv.cu.o deform_conv.cu.cc -I $TF_INC -I $TF_INCA -I /usr/local -D\
GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -L /usr/local/cuda-8.0/lib64/ --expt-relaxed-constexpr -arch=sm_52
## if you install tf using already-built binary, or gcc version 4.x, uncomment the three lines below
g++-4.9 -std=c++11 -shared -o deform_conv.so deform_conv.cc deform_conv.cu.o -I\
$TF_INC -I $TF_INCA -I /usr/local -fPIC -lcudart -L $CUDA_HOME/lib64 -D GOOGLE_CUDA=1 -Wfatal-errors -I\
$CUDA_HOME/include -D_GLIBCXX_USE_CXX11_ABI=0 -L$TF_LIB -ltensorflow_framework
from tf_deformable_net.
Check this issue for more information.
Because now I do not have the environment to test it, I am not assured this works. But if it did works for you, could you start a pull request with the right script on your machine? Thanks in advance.
from tf_deformable_net.
@leinxx Thanks you for the efforts, by the way, according to the comment in make.sh
, Titan X should use the capability of 6.1.
from tf_deformable_net.
I think you are talking about the Nvidia Titan X. I am using the much lower version: GTX titan X 😶.
https://developer.nvidia.com/cuda-gpus
from tf_deformable_net.
@leinxx Nvidia really doesn't know how to choose a name for its GPU model... Anyway, I have updated the build script and readme. Have a great day!
from tf_deformable_net.
You can refer this web page: https://developer.nvidia.com/cuda-gpus
from tf_deformable_net.
Related Issues (20)
- Could you upgrade the lib to support tensorflow 1.4, cudnn 6.0 and cuda 8.0?
- any detail result accuracy about your result? HOT 1
- config.py paras problems HOT 1
- training problems HOT 1
- Batchsize issue HOT 1
- Offsets Subnet Details HOT 3
- Meaning of num_groups in offsets HOT 3
- How to use this on Windows
- Problems in installation HOT 5
- can it be used in g++4.8? HOT 2
- Can we add deformable convolution at different places?
- Testing problem HOT 2
- Compile Error HOT 12
- deform_conv.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev HOT 1
- Thoughts on training on Custom data
- Training error while running faster_rcnn/train_net.py HOT 2
- DCN V2
- compile error
- Error when executing command: make
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tf_deformable_net.