niuzhiheng / caffe

Caffe
http://caffe.berkeleyvision.org/
BSD 2-Clause "Simplified" License
317 stars 129 forks source link

Error: invalid device function #25

Closed hanklin3 closed 10 years ago

hanklin3 commented 10 years ago

I got this error, was able to solve it so like to share with others.

Compiling VS was successful, but when running the .exe (in mnist/train_lenet.bat) I got the runtime error. Laptop is nvidia 765m, install CUDA 6.0 (note, install VS2012 before installing CUDA)

after reading this link: https://github.com/BVLC/caffe/issues/138

I go to Solution Explorer, right click on the project, Properties.

Configuration Proporties->CUDA C/C++->Device on the line Code Generation, put:

compute_20,sm_20;compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_50,compute_50 (note no space)

then I can compile in VS and run exe without problem.

Hopefully this will help others who have trouble.

niuzhiheng commented 10 years ago

Thank you very much for your feedback. This problem has been also addressed in #1 . I think maybe it is better for me to update this directly in the code.

niuzhiheng commented 10 years ago

Updated in e43879f14165c6abe2fb30ea307e654fb5eb2ce1