mikegashler / waffles

A toolkit of machine learning algorithms.
http://gashler.com/mike/waffles/
86 stars 33 forks source link

OpenCL support #30

Open thelukester92 opened 7 years ago

thelukester92 commented 7 years ago

We use Cuda right now for GPU parallelization, but OpenCL is more widely supported. Perhaps we should look into adding OpenCL support.

mikegashler commented 7 years ago

I certainly like the idea of using a general interface better than a proprietary one. However, in chatting with our local GPGPU expert, I got the impression that OpenCL was a good idea but its implementation ended up being significantly more complex than Cuda, and Cuda was surging ahead so much faster that the long-term viability of OpenCL was in question. I went with Cuda because it was simpler, and I felt like I was just writing temporary code that would have to be redesigned soon anyway.

Now, it looks like we will have to rewrite the GPGPU stuff, so this is a great time to re-evaluate my original decision. I don't know enough to about GPGPU programming to check my impressions, or to know whether things have changed. Two other options include adding a dependency on ViennaCL or CUDNN for our GPGPU needs. I usually avoid superfluous dependencies, but this might be a sufficiently special case to justify it.