naibaf7 / caffe

Caffe: a fast open framework for deep learning. With OpenCL and CUDA support.
http://caffe.berkeleyvision.org/
Other
85 stars 20 forks source link

Can OpenCL caffe be built on windows? #65

Open Chris-R-R opened 7 years ago

Chris-R-R commented 7 years ago

Hi, I noticed that there is a separate branch of Caffe for windows support but what are my options if I want both Windows support and OpenCL support?

Are there any benchmarks on how OpenCL compares to CUDA speedwise? Assuming a GPU that supports both, and on image classification tasks.

naibaf7 commented 7 years ago

There are currently no up-to-date benchmarks that compare the two. It also depends a lot on what GPU you have and which network is used.

As a rule of thumb, an AMD GPU with X TFLOPS (using LibDNN) will be half as fast as an nVidia GPU with X TFLOPS (using cuDNN) at the moment, which is still very significantly more than CPU performance.

Yes, OpenCL Caffe does support Windows. Just read both the instructions from OpenCL and Windows Caffe in the Readme. You'll need MSVC, ViennaCL and Caffe to be able to compile it on Windows, it is not very difficult.

psyhtest commented 7 years ago

Feel free to use Windows binaries prebuilt via Collective Knowledge.

psyhtest commented 7 years ago

@Chris-R-R We have recently released benchmarking data for the NVIDIA GTX 1080 across 4 models and 14 variants of Caffe which can be viewed here. While the data is about 6 months old, the community can easily perform similar experiments across other devices, variants and models. Hope this helps!

Chris-R-R commented 6 years ago

Hi I am looking into this again - I need to build OpenCL Caffe with VS2017. Unfortunately the build_win.cmd does not seem to support this but I was able to build the windows branch with VS2015 and update the VS solution/project to VS2017 and get that to build. I am now using this solution as a starting point to try and get the OpenCL branch to build with VS2017. So far there are a few problems:

I used Git to fetch the code.

naibaf7 commented 6 years ago

That's right, the latest OpenCL branch does not support Windows yet - update will follow this fall.

Chris-R-R commented 6 years ago

Thanks. Any idea how far back I have to go to get a version that does work on windows? If I can fetch a particular revision?

naibaf7 commented 6 years ago

35a53ee98e033bfd95aabc0cb831ce9160fe196a probably