facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.95k forks source link

OpenCL AMD GPU support #275

Closed maxcr closed 7 years ago

maxcr commented 7 years ago

Is it just completely missing? Especially now that the AMDGPU-Pro drivers work for Linux... That's dope...

Yangqing commented 7 years ago

Thanks - OpenCL is definitely an interesting direction to look into. Right now we don't have a definite roadmap for OpenCL yet, but we'll share info as soon as possible when there are updates.

By the way, the Caffe OpenCL branch is relatively mature with the great work from @naibaf7 : https://github.com/naibaf7/caffe

TechnikEmpire commented 6 years ago

It's not just an interesting direction to look into, it's also the only option if this entire project is ever going to be considered for use outside of the lab or other such private settings. I wonder how many drinks I'd have to buy and how dark and hidden the table at the pub would have to be for people to admit this under their breath. Maybe the Nvidia shill leash would give us away either way. By leaning on this proprietary software to be able to execute anything interesting and get the results before heat death of the universe occurs, you're binding the use of your software explicitly with the use/terms of CUDA/cuDNN. Might as well overwrite your LICENSE file with Nvidia's.

naibaf7 commented 6 years ago

@TechnikEmpire Look out for a different approach to Caffe coming soon. Currently under development here: https://github.com/naibaf7/caffe You'll get all the candy such as integer quantization, fp16, runtime compile, kernel caching etc. under both OpenCL, CUDA and soon also HIP. The project is non-profit and university driven, no manufacturer bias involved.

TechnikEmpire commented 6 years ago

@naibaf7 Excellent work, I've already found you and I'm in the middle of compiling now. 👍 Thank you for your efforts, truly.

naibaf7 commented 6 years ago

@TechnikEmpire Note that https://github.com/naibaf7/caffe is "alpha" right now, while https://github.com/BVLC/caffe/tree/opencl is production ready (however, the code base will be deprecated as soon as the other branch goes beta. I currently maintain both.

IvanTurgenev commented 6 years ago

Sad state for the opensource world

orionr commented 6 years ago

Please refer to https://github.com/caffe2/caffe2/issues/637 for more discussion on Caffe2 with OpenCL.

VincentSC commented 6 years ago

Besides OpenCL, AMD has HIP now - it translates CUDA-code to the AMD-platform directly. The advantage is that building for AMD does not need a separately maintained branch, like OpenCL would need - this can be automated now. It thus gives what would have happened if Nvidia would just have supported OpenCL.

While HIP itself is mostly done, it does needs to have a HIP-version of the used CUDA-libraries, as these are closed source and cannot be converted. Luckily new HIP-libraries are popping up continuously, so it's just a matter of time until Caffe2 can be "hipified".

In case you want to know: HIP-libraries are always open source in contrast with most CUDA libraries.