-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Add support for opencl #408
Comments
Ren Wu, the Distinguished Scientist of Baidu, gave a talk titled with "Deep Learning Meets Heterogeneous Computing" at the GTC 2014. He re-emphasized Baidu IDL's belief "Big data + Deep learning + Heterogeneous computing = Success". To make the DNN run on GPU supercomputers, data centers (cloud), smart phones, and wearable devices, they built their DNN technology based on highly optimized OpenCL since it is the only widely accepted heterogeneous computing open industry standard. But it is not clear whether the vision of Caffe includes heterogeneous computing. Building a library that is compatible with multiple types of computing platforms will surely involves substantial expert level knowledge to optimize the usually not easily portable performance for those platforms and is probably out of the scope of this algorithm research oriented project. Even the people want to do that, because the current design of Caffe mixes the high level DNN algorithms with the low level hardware platform specific computing details, the code base needs to be refactored a lot which may break the stable state of Caffe and greatly hinder the ongoing researches. You had better start a new project to experiment whether the performance of a DNN built on clBLAS is efficient and portable enough. Or you can even build a higher level library based on clBLAS in the way that mshadow wraps BLAS and then create an OpenCL counterpart of CXXNET (#382). |
I don't have any plans to implement OpenCL support for Caffe myself (I don't personally have any use for it and I know nothing about it). But I'd be happy to see it supported in a similar way that Caffe (now) supports switching between MKL and other BLAS libraries, assuming such a thing is even possible (again, I know nothing about OpenCL -- maybe this is an absurd proposal). I think there would basically be three steps, the second being by far the most time-consuming one (granted things always get much more complicated when you actually try to do something, but...): (1) Factor out all CUDA ( (2) Reimplement the wrappers in OpenCL, potentially requiring changing some of the API you designed in step (1), depending on how mismatched the CUDA and OpenCL libraries are. (3) Have the Makefile compile the OpenCL versions of the wrappers if a cuda/opencl switch in Makefile.config is set to opencl. |
Any progress on OpenCL support? Its a shame that Caffe is locked to a single vendor for GPU support. |
Alternatively you can use something like : |
Another effort started at #2195 |
anybody tested this #2610 https://github.com/naibaf7/caffe ? |
Done by the official |
Hi Theano is adding support to opencl[1] trought CLBLAS[2].
Can caffe use this kind of solution to add opencl (more vendor neutral) support?
[1]https://github.com/Theano/libgpuarray
[2]https://github.com/clMathLibraries/clBLAS
The text was updated successfully, but these errors were encountered: