Giter VIP home page Giter VIP logo

Comments (6)

leinxx avatar leinxx commented on May 30, 2024 2

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.

Zardinality avatar Zardinality commented on May 30, 2024

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.

Zardinality avatar Zardinality commented on May 30, 2024

@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.

leinxx avatar leinxx commented on May 30, 2024

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.

Zardinality avatar Zardinality commented on May 30, 2024

@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.

XFJH avatar XFJH commented on May 30, 2024

You can refer this web page: https://developer.nvidia.com/cuda-gpus

from tf_deformable_net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.