-
Notifications
You must be signed in to change notification settings - Fork 745
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
Caffe linking to caffe CPU only build (without GPU support) #219
Comments
Sure, you can make a build without CUDA support. It's probably easier to simply not use CUDA at runtime though. |
I set |
Something like that should do it yes. IIRC, works fine here.
|
Anyway, if it doesn't for you, please report it upstream! Thanks |
Sorry to reopen issue, but the compilation isn't working correctly. Please notice that if you build caffe with GPU support and then disable it at runtime only, it will still search for CUDA and CUDA driver but not use them. What I want to achieve is get a caffe build that doesn't search for the CUDA driver and can work on a machine without any GPU at all. (such as old macbook) These are the steps I tried to recompile the javacpp-presets for caffe WITHOUT GPU support (CPU_ONLY=1):
I add to my pom file and it imports the correct libraries into my project. Sorry for long message, I just want to explain exactly what I did. |
Please try to follow the instructions here to build on OS X: |
I just found out that is should be possible to get rid of that issue by linking with |
I've just released an update that works well on machines without GPU as well. It has version "master-1.2": We still need CUDA 7.5 installed, but I've tested it with Mac OS X (Yosemite) on a machine that has no GPU and it works fine. Just make sure that your code never calls either |
Thank you Saudet! I can confirm this is working on a Mac without a GPU |
@saudet thanks for your https://github.com/bytedeco/javacpp-presets/tree/master/caffe , but I can not import the following dependence:
I don't know weather it is out of date or some other reason, can you give a useful dependency? |
@shiqin-zhang Make sure to enable the SNAPSHOT repository by adding something like the following in your pom.xml or settings.xml file: |
CUDA needs to be installed, even if you don't use or have a GPU. |
FYI, separate CPU-only and GPU-enabled builds are now a reality! In addition to <dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<artifactId>caffe</artifactId>
<version>1.0-1.3.4-SNAPSHOT</version>
<classifier>linux-x86_64-gpu</classifier>
</dependency> If not, the CPU-only binaries are used. |
Hello,
I wanted to use javacpp presets for caffe on machines without a GPU. I had already successfully built and ran caffe in CPU only mode and now I'm trying to access it from java but the javacpp-presets downloads and links to a pre-built caffe with GPU support.
First I kept getting this error:
I then installed CUDA on the device and this error disappeared.
Now I get
This is obviously because the machine doesn't contain a GPU and the nVidia Cuda driver won't work on it.
Is there a way to link to the CPU only caffe built libraries ??
Thanks,
Bisher
The text was updated successfully, but these errors were encountered: