2

I have seen caffe installation for Mac. But I have a question. If my Mac does not have GPU, then I have no chances to use GPU?? and I have to use CPU-only? or I have the chance of using (virtual!) GPU by NVIDIA web driver?

Moreover, can I have digits on my Mac? as I try to download it, it does not have any options for Mac download and it is just for Ubuntu!

I am very confused about these questions! Can you please make me clear about these?

user6352340
  • 107
  • 2
  • 10
  • The architecture differs a lot for CPU and GPU. If you don't have a specific code for GPU then the CPU code will not work on GPU. I suppose that it could also be the case the other way around. On the caffe homepage it is stated that you can choose whether you work with CPU or GPU. – keiv.fly Jul 24 '16 at 21:50
  • According to https://github.com/NVIDIA/DIGITS/issues/251 DIGITS is working on caffe and therefore it can also work on CPU just needs some tweeking. And according to the thread CUDA is not working on CPUs. – keiv.fly Jul 24 '16 at 21:56
  • @keiv-fly : How about NVIDIA web driver? – user6352340 Jul 24 '16 at 22:01
  • 1
    It is a driver that allows CUDA functionality on several Mac computers that have NVidia GPUs. So it is not working without GPU. – keiv.fly Jul 24 '16 at 22:07
  • @keiv.fly : based on what you said and the link you suggested, I should not have CUDA installed. right? – user6352340 Jul 24 '16 at 22:36
  • @keiv.fly: I am trying to compile caffe on my Mac which does not have GPU. but for 'make runtest' I get the error 'error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version' like many other people reporting this problem. do you have any solutions for that? – user6352340 Jul 24 '16 at 22:38
  • See the posted answer. I found a program ocelot that allows to use CUDA on CPU (x86) – keiv.fly Jul 24 '16 at 22:38
  • 1
    I posted all the solutions to the problem that I found in the thread – keiv.fly Jul 24 '16 at 22:50

1 Answers1

3

The difference in architectures between CPU and GPU does not allow simple transformation of the code written for one architecture to the other. The GPU drivers are specifically written for the GPU architecture and cannot be easily virtualized. On the other hand, some software supports both. This includes OpenGL instructions and caffe (http://caffe.berkeleyvision.org/). NVidia DIGITS is based on caffe and therefore can work without a dedicated GPU (Here the thread how to install on Macs: https://github.com/NVIDIA/DIGITS/issues/88)

According to https://www.github.com/NVIDIA/DIGITS/issues/251 CUDA cannot be run on computers that do not have a dedicated NVidia GPU, but according to How to run my CUDA application on ATI or Intel card in software mode? there is a program gpuocelot that receives CUDA instructions and can work on NVidia GPU, AMD GPU and x86.

In scientific shared computing they wrote separate programs for different devices, e.g. Einstein at Home has four separate programs to find gravitational waves: CPU, NVidia GPU (CUDA), AMD GPU and ARM.

To make DIGITS work you need to

build Caffe with CPU_ONLY and tell DIGITS not to use any GPUs by running digits-devserver with the --config flag

(https://github.com/NVIDIA/caffe/blob/v0.13.2/Makefile.config.example#L9-L10, https://github.com/NVIDIA/DIGITS/issues/251).

Other possibility:

you can still use the --config flag with the web installer. Try this:

./runme.sh --config. Choose "N" to select none.

Also a possibility:

I am trying to answer how you can choose CPU or GPUs.. Within the caffe folder, there is a Makefile.config.example file.. Copy the contents of this file into a new file and rename it as "Makefile.config". If you want to use CPU, then 1. comment out the "USE_CUDNN :=1 Within "Makefile.config" file, 2. uncomment CPU_ONLY := 1 3. issue the make all command again within the caffe folder..

And if nothing helps you can do the procedure two times because it helped someone at the end of the thread.

Community
  • 1
  • 1
keiv.fly
  • 3,343
  • 4
  • 26
  • 45