Giter VIP home page Giter VIP logo

Comments (16)

Yangqing avatar Yangqing commented on April 27, 2024

IMHO I wouldn't put this at a high priority. Plus it would be pretty nontrivial to implement this, requiring a lot of #ifdef macros as well as substantially rewriting the syncedmem class. We would also need to consider how we would like caffe::Caffe::mode to be... All these might make the codebase rather messy so I am not sure if it is the right move - at the end of day, it probably does not hurt too much to just ship with cuda libraries - unlike MKL, they are freely redistributable.

from caffe.

sguada avatar sguada commented on April 27, 2024

I agree that is not high priority, but I think that separating the cpu and gpu parts of code would be helpful for maintenance and eventually to make a CPU only version without needing CUDA to compile or run it.

from caffe.

Yangqing avatar Yangqing commented on April 27, 2024

The current code actually allows one to run without a physical GPU (as long
as cuda runtime is distributed - again it is freely allowed), which is what
I am planning to deploy on the ICSI cluster.

For developers working on caffe I assume they will at least have cuda
compilers.

Yangqing

On Tue, Nov 26, 2013 at 12:21 PM, Sergio Guadarrama <
[email protected]> wrote:

I agree that is not high priority, but I think that separating the cpu and
gpu parts of code would be helpful for maintenance and eventually to make a
CPU only version without needing CUDA to compile or run it.


Reply to this email directly or view it on GitHubhttps://github.com/Yangqing/caffe/issues/3#issuecomment-29330167
.

from caffe.

tdomhan avatar tdomhan commented on April 27, 2024

on Mac OS X 10.9 the cuda libaries are linked to libstdc++ while everything else on the system is linked to libc++ by default, due to the switch from gcc to clang. This way compiling caffe on OS X 10.9 is a huge mess right now, because you need to make sure that all the libraries you link to are linked to libstdc++, which mostly means you need to manually compile all the libraries and set the correct flags. The worst part is that you won't notice directly during compilation, but only when you try to run the program afterwards.
If there was a CPU only version, you could at least compile only the CPU code without a hassle, until nvcc will work with libc++ instead of stdlibc++.

from caffe.

junwang4 avatar junwang4 commented on April 27, 2024

Hi tdomhan,
Have you succeeded to install it on your Mac OS X 10.9? I got an error:
clang: error: unsupported option '-dumpspecs'
Then it stops to compile.

from caffe.

shelhamer avatar shelhamer commented on April 27, 2024

The OSX 10.9 situation hasn't yet changed since @tdomhan's nice summary of the issue. OS X 10.9 is not currently a feasible compilation target for GPU mode. The -dumpspecs error you mention is due to CUDA/clang incompatibility, but it is not currently possible to compile with gcc either.

For CUDA compatibility on OS X it seems to mostly be a matter of waiting for a new version of CUDA to ship that links to libc++.

from caffe.

sguada avatar sguada commented on April 27, 2024

The problem of compiling with gcc seems to be that when linking it detects
duplicate functions between the cpp and the cuda code. If you figure out
how to fix that, then we will be a bit closer to compile with gcc in OS X
10.9

duplicate symbol caffe::LRNLayer::LRNLayer(caffe::LayerParameter
const&)in:
src/caffe/layers/lrn_layer.o
src/caffe/layers/lrn_layer.cuo

Sergio

2014-01-31 Evan Shelhamer [email protected]:

The OSX 10.9 situation hasn't yet changed since @tdomhanhttps://github.com/tdomhan's
nice summary of the issue. OS X 10.9 is not currently a feasible
compilation target for GPU mode. The -dumpspecs error you mention is due
to CUDA/clang incompatibility, but it is not currently possible to compile
with gcc either.

For CUDA compatibility on OS X it seems to mostly be a matter of waiting
for a new version of CUDA to ship that links to libc++.

Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-33861457
.

from caffe.

tdomhan avatar tdomhan commented on April 27, 2024

I managed to build and run caffe under Mac OS X. I'll post the details later. It's a little hacky of course.

from caffe.

tdomhan avatar tdomhan commented on April 27, 2024

Already I finally had time to add instructions for OS X 10.9, see: f0f594c
Hope this helps.

from caffe.

junwang4 avatar junwang4 commented on April 27, 2024

Thanks, Tobias! Following your instructions, I succeeded in installing Caffe on OS X 10.9.

I did a test on the MNIST demo, but found that the GPU setting (running time: 275s) doesn't have any advantage over the CPU setting (running time: 284s) on a latest iMac. I only changed the setting "solver_mode: 1/0" in data/lenet_solver.prototxt. Do you have any comparison between the GPU and the CPU setting?

from caffe.

Yangqing avatar Yangqing commented on April 27, 2024

The MNIST demo is not likely to show the advantage of GPU over CPU, since
the model is very small and the overhead of e.g. data transfer and CPU side
control codes is big enough that GPU and CPU takes approximately the same
time. For larger models like ImageNet the GPU advantage will become clearer.

Yangqing

On Thu, Feb 6, 2014 at 8:39 PM, junwang4 [email protected] wrote:

Thanks, Tobias! Following your instructions, I succeeded in installing
Caffe on OS X 10.9.

I did a test on the MNIST demo, but found that the GPU setting (running
time: 275s) doesn't have any advantage over the CPU setting (running time:
284s) on a latest iMac. I only changed the setting "solver_mode: 1/0" in
data/lenet_solver.prototxt. Do you have any comparison between the GPU and
the CPU setting?

Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-34403732
.

from caffe.

junwang4 avatar junwang4 commented on April 27, 2024

Yangqing,
Thanks for your clarification! Is there any comparison data of the running time between the CPU vs. GPU on ImageNet or CIFAR?

from caffe.

Yangqing avatar Yangqing commented on April 27, 2024

I have not got detailed analysis yet. On imagenet with GPUs, full
forward+backward using Alex Krizhevsky's network takes about 7ms, and
forward only takes about 2.5ms on my desktop with a K20 (when computation
are carried out in a batch fashion). CPUs are about 10 times slower than
that, but given the multiple choices of specific CPU types it might be hard
to say exactly what the speed it is.

Yangqing

On Thu, Feb 6, 2014 at 8:59 PM, junwang4 [email protected] wrote:

Yangqing,
Thanks for your clarification! Is there any comparison data of the running
time between the CPU vs. GPU on ImageNet or CIFAR?

Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-34404390
.

from caffe.

junwang4 avatar junwang4 commented on April 27, 2024

Thanks - just noticed this from your CAFFE presentation
https://docs.google.com/presentation/d/1lzyXMRQFlOYE2Jy0lCNaqltpcCIKuRzKJxQ7vCuPRc8/edit#slide=id.g3c48e0e3ae4e94440
image

from caffe.

kloudkl avatar kloudkl commented on April 27, 2024

A not very accurate benchmark of CPU and GPU mode is done in #85. Even the result is not fair for GPU, it still shows great speed advantage.

from caffe.

shelhamer avatar shelhamer commented on April 27, 2024

Done in #561!

from caffe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.