Closed ZhengyuLin closed 6 years ago
This error happens when the compiler failed to link libucudnn.so
to libcudart.so
which is located in the CUDA toolkit.
Please make sure that environment variables such as LIBRARY_PATH
, LD_LIBRARY_PATH
, and CUDA_PATH
are set correctly, like:
export CUDA_PATH=/path/to/cuda
export LIBRARY_PATH=/path/to/cuda/lib64:...
export LD_LIBRARY_PATH=/path/to/cuda/lib64:...
Thanks. By the way, I am compiling Tensorflow with ucudnn by bazel. Do you know how to include it into Tensorflow's source code and compile it by bazel?
To compile u-cuDNN with TensorFlow, you have to apply a patch to the specific version of TensorFlow, and then compile TensorFlow itself.
Please follow the instruction of patch/README.md
to use the patch.
If you are using a newer version of TensorFlow, you may have to check diff
between your TensorFlow and the patched version.
Details of the build instruction is documented here: https://www.tensorflow.org/install/install_sources
Your instruction is to compile TensorFlow by CMake. Can I compile it using Bazel? Thanks.
In my instruction, u-cuDNN is compiled by CMake, but you still use Bazel to compile TensorFlow. The upper part of the README is about how to compile Caffe by CMake.
After type cmake .. -DCMAKE_INSTALL_PREFIX:PATH="/usr/local/cuda-9.0", I try to build the files. Then I got errors
../libucudnn.so.1.1.0: undefined reference to
cudaGetDeviceCount' ../libucudnn.so.1.1.0: undefined reference to
cudaFree' ../libucudnn.so.1.1.0: undefined reference tocudaGetDeviceProperties' ../libucudnn.so.1.1.0: undefined reference to
cudaEventSynchronize' ../libucudnn.so.1.1.0: undefined reference tocudaGetDevice' ../libucudnn.so.1.1.0: undefined reference to
cudaMemset' ../libucudnn.so.1.1.0: undefined reference tocudaEventQuery' ../libucudnn.so.1.1.0: undefined reference to
cudaEventRecord' ../libucudnn.so.1.1.0: undefined reference tocudaEventCreate' ../libucudnn.so.1.1.0: undefined reference to
cudaEventDestroy' ../libucudnn.so.1.1.0: undefined reference tocudaSetDevice' ../libucudnn.so.1.1.0: undefined reference to
cudaMemGetInfo' ../libucudnn.so.1.1.0: undefined reference tocudaStreamSynchronize' ../libucudnn.so.1.1.0: undefined reference to
cudaMalloc' ../libucudnn.so.1.1.0: undefined reference tocudaMemcpy' ../libucudnn.so.1.1.0: undefined reference to
cudaGetErrorString'How can I solve this? Thank you.