Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure to run on system without GPU in CPU mode #6245

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

artyom-beilis
Copy link

When running caffe compiled with CUDNN in CPU mode on hardware without GPU it fails with errors like

 cudnn_conv_layer.cpp:52] Check failed: error == cudaSuccess (35 vs. 0)  CUDA driver version is insufficient for CUDA runtime version

Using Caffe default engine instead of CUDNN for CPU only mode fixes the issue

@Noiredd
Copy link
Member

Noiredd commented Feb 20, 2018

Can you elaborate on the issue? I cannot even compile Caffe with USE_CUDNN and CPU_ONLY together.

@artyom-beilis
Copy link
Author

Can you elaborate on the issue? I cannot even compile Caffe with USE_CUDNN and CPU_ONLY together

I have one version of caffe build with CUDNN support - such that on machines with GPU I can start it in GPU mode and without one in CPU mode and of course I call set_mode(Caffe::CPU) or GPU accordingly

However it fails to run in CPU mode despite I asked to do prediction on CPU because all CUDNN layers do some initialization specific to gpu in LayerSetUp - something that caffe default layers don't do.

After this patch I can deploy caffe library on machine without GPU when I setup it in CPU mode.

@artyom-beilis
Copy link
Author

artyom-beilis commented Feb 20, 2018

The major goal is to deploy same build of Caffe on different machines regardless they have nVidia GPU or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants