Get the GPU info with Caffe2 in anaconda

292 Views Asked by At

I have anaconda3 and cuda 9 installed on my linux machine (aws to be precise), when I check caffe2 installation as in the official documentation it shows me success message, but when I check the GPU with the following script python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())' I see the following result Logging before InitGoogleLogging() is written to STDERR E0729 20:58:01.995159 2016 common_gpu.cc:42] Found an unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES. What I'm I doing wrong.

1

There are 1 best solutions below

0
On

Your problem translates an issue with your installation. Usually this problem is solved by one of these actions:

  1. Try restarting your computer (It never hurts to acutally try)
  2. Fully reinstall NVIDIA Drivers + CUDA + CuDNN (check env vars)
  3. Fully reinstall Caffe2 following the official documentation.

Debuging a faulty installation can be really cumbersome. If you are running on Linux, I would recommend you trying Docker + Nvidia driver: