I guess you are going to implement Detectron (otherwise nobody wanna use this dumb Caffe2 these days)
I'm pretty sure that it is caused by the mismatch of the CUDA version and CuDNN. I got stacked by this problem for a while (you don't know which version is correct for the Caffe2), finally, I got two solutions at almost the same time. Both of them work for me.
At first, just update the Nvidia driver to the latest version. My version is updated to 410.78, you can simply update the driver by selecting the certain driver in the System settings-> Software and update-> Additional Drivers.
Don't forget to restart your PC.
Then, there are two ways to implement it.
- Build the environment with a Docker.
It is simple and fast. You just install Docker (as well as nvidia-docker for GPU usage) and use this pre-implemented environment with this command:
sudo docker pull ylashin/detectron
sudo nvidia-docker run --rm -it ylashin/detectron
Then you can test your Caffe2 with that NumCudaDeivce command.
It works for me!
See the whole introduction here, thanks to the efforts:
Build a Detectron environment with Docker
If you have some problem with the Docker installation (especially for the nvidia-docker), you can just skip it to the next one.
- Use Detectron2
The newest Detectron is published recently (actually three days ago!). We can now work on that one now which is supported by Pytorch.
Here is the Detectron2:
Detectron2 link
Just go to the lastest one, you can even distribute everything in the Google Colab, it's much easier.