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

CPU Mode on classification example #37

Closed
flymer opened this issue Oct 3, 2015 · 8 comments
Closed

CPU Mode on classification example #37

flymer opened this issue Oct 3, 2015 · 8 comments

Comments

@flymer
Copy link

flymer commented Oct 3, 2015

Hi,

I've managed to compile classification.cpp without any problem. But I want it to use with the CPU Mode and I cant get it to work. I keep getting this CUDA error:

F1003 19:48:48.537168 1992 cudnn_conv_layer.cpp:31] Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version

I tried forcing it with the line "Caffe::set_mode(Caffe::CPU);" and playing with the VS compiling properties but with no success.

I am sure I am missing someting, can you help me pls?

@chipgarner
Copy link

See the first line in cudnn_conv_layer.cpp:
#ifdef USE_CUDNN
You have USE_CUDNN defined. In VS go to the caffe project Properties, C/C++, Preprocessor and delete USE_CUDNN. You may need to delete it from one or more of the other projects, you will see if you hit a similar error in one of them.

@happynear
Copy link
Owner

Yes, you should remove the preprocessor macro USE_CUDNN before compiling.

@Kwongpuikong
Copy link

I do delete the all the USE_CUDNN in those projects. What else do I miss?

@happynear
Copy link
Owner

@Kwongpuikong ,
That's all. I think you have came across another question. Please post more message for us to diagnose.

@Kwongpuikong
Copy link

Cause I dont have a gpu, I delete all the USE_CUDNN in all projects. I can compile all the projects successfully. Yes, I can compile all the projects successfully.
The problem comes when I want to run the mnist example.
I set the solver_mode: CPU in lenet_solver.prototxt,
and modify the bat file like:
.\bin\caffe.exe train --solver=examples/mnist/lenet_solver.prototxt
It shows the problem [internal_thread.cpp:26] check failed:error == cudaSuccess(35 vs. 0)
I check the internal_thread.cpp, I think the CPU_ONLY is not defined.
Therefore, it checks my GPU which I do not have.
What can I do?
I am a beginner with caffe. Can you help me pls?

@happynear
Copy link
Owner

@Kwongpuikong ,
Try to add CPU_ONLY macro. However, I haven't tested it. There may be some more bugs.

@happynear happynear reopened this Oct 4, 2015
@flymer
Copy link
Author

flymer commented Oct 4, 2015

Oooh thanks, solve it! I had actually removed USE_CUDNN and added CPU_ONLY but only in the caffe project, I also needed to do it in the caffelib.

Finally it works! Wonderful, I hope it can help others.

Thanks happynear for the port!

@happynear
Copy link
Owner

@flymer, thanks for the test report. I will add instructions in the ReadMe page.

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

No branches or pull requests

4 participants