1

I'm accustomed to installing the Cuda toolkit and cudnn from the Nvidia source, but have just tried installing via conda with the following:

conda install cudatoolkit=10.0
conda install -c anaconda cudnn

I'm now trying to compile FAISS with cuda support, which requires me to pass the path to the cuda installation when compiling.

Does anyone know where Anaconda installs the cuda toolkit? I'd also like to find where anaconda installs cudnn, in case that becomes relevant in the future. Any help others can offer with this question would be hugely helpful!

OS: Ubuntu 18.04

First I tried searching for the cuda toolkit with:

nvcc --version

but this returned:

Cuda compilation tools, release 9.1, V9.1.85

version 9.1, not 10.0! So then I tried:

locate cuda | grep /cuda$

This returned several things:

(3.6) user$ locate cuda | grep /cuda$
/home/dhlab/anaconda3/envs/3.6/include/boost/fiber/cuda
/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/cupy/cuda
/home/dhlab/anaconda3/envs/3.6/lib/python3.6/site-packages/numba/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/numba/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda/cuda
/home/dhlab/anaconda3/envs/pixplot/lib/python3.6/site-packages/tensorflow_core/include/tensorflow/stream_executor/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/external/local_config_cuda/cuda/cuda
/home/dhlab/anaconda3/envs/stylegan/lib/python3.6/site-packages/tensorflow_core/include/tensorflow/stream_executor/cuda
/home/dhlab/anaconda3/lib/python3.7/site-packages/numba/cuda
/home/dhlab/anaconda3/pkgs/boost-cpp-1.70.0-h8e57a91_2/include/boost/fiber/cuda
/home/dhlab/anaconda3/pkgs/cupy-7.3.0-py36h273e724_0/lib/python3.6/site-packages/cupy/cuda
/home/dhlab/anaconda3/pkgs/numba-0.45.1-py37h962f231_0/lib/python3.7/site-packages/numba/cuda
/home/dhlab/anaconda3/pkgs/numba-0.49.0rc1-np1.11py3.6h04863e7_gdc1c08865_0/lib/python3.6/site-packages/numba/cuda
/usr/include/thrust/system/cuda
/usr/lib/cuda

I thought /usr/lib/cuda looked inviting, so I looked at its contents, but it's empty! Then I thought the local_config_cuda inside tensorflow_core might have a clue, so I looked in there, where I found a single header file that contained:

#define TF_CUDA_VERSION "10.0"
#define TF_CUDA_LIB_VERSION "10.0"
#define TF_CUDNN_VERSION "7"

#define TF_CUDA_TOOLKIT_PATH "/usr/local/cuda"

That sounds like the version of the cuda toolkit I installed with conda, but /usr/local/cuda does not exist!

I'm clearly missing something. If someone with more experience with Conda-installed Cuda could help me find the Cuda toolkit so I can tell FAISS where to find it, I'd be very grateful.

duhaime
  • 25,611
  • 17
  • 169
  • 224
  • Anaconda doesn't install a complete CUDA toolkit and the nvcc version has nothing to do with what Anaconda installs – talonmies Apr 09 '20 at 15:54
  • So I've learned! Do you think it's possible to compile FAISS with the cuda toolkit elements installed by conda? – duhaime Apr 09 '20 at 16:18
  • No because, as I said, it is incomplete – talonmies Apr 09 '20 at 16:33
  • I ended up just building a Cuda install from source. If you make your comment an answer and ideally link to a source that documents exactly what's included in the conda install I'll gladly accept your answer – duhaime Apr 09 '20 at 16:48
  • What does "I ended up just building a Cuda install from source" mean? NVIDIA only distributes pre-build libraries and tools. There is no "source". And there is no documentation for what conda does and does not install. You can inspect the internal manifests of your conda installation as per the linked duplicate – talonmies Apr 10 '20 at 15:19

0 Answers0