4 ms·
There are two questions there that are really completely distinct, even though you're conflating them: 1) OpenCL vs CUDA In reality, performance of these is i
by gcp 9y ago
There are two questions there that are really completely distinct, even though you're conflating them:
1) OpenCL vs CUDA
In reality, performance of these is identical: i.e. writing the same kernel in OpenCL versus writing the same kernel in CUDA (this is almost always possible unless hardware intrinsics are used) gives the same performance, with NVIDIA's current drivers. The odds are pretty great the same compiler is backing them both.
2) cuDNN vs MIOpen
I haven't seen much benchmarks here. AMD has patches for most of the big frameworks but they're not upstream yet. The gist of the implementation seems state of the art, but no idea if the level of optimization is comparble. hipCaffe exists, but haven't seen any usable benchmarks so far.
So for deep learning, the question isn't CUDA vs OpenCL. It's cuDNN vs the alternatives (MIOpen, Intel MKL/DAAL).
- hedgehog 9y agoMy company is also working on broader hardware support, we haven't tried any of the Vega cards yet but we do have early results for OpenCL on hardware in our lab: http://vertex.ai/blog/bringing-deep-learning-to-opencl http://vertex.ai/blog/bringing-deep-learning-to-opencl
- mattnewton 9y agoThanks for the detail and clearing the waters I muddied a bit. I guess I'm just surprised that people are doing deep learning on AMD gpus, not because of the performance of OpenCL, but because of the reliance on Cudnn in frameworks like tensorflow and torch made that seem not worth it in the past.
- gcp 9y agoWell, cuDNN doesn't run on AMD cards, so if you want your software to have good performance on all consumers' systems (as well as avoiding being vendor-locked), cuDNN isn't an option. Also, you have to get explicit permission from NVIDIA to redistribute cuDNN (though that reportedly is a formality). Not being vendor locked in is pretty nice if the competition releases a 22 TFLOPS (fp16) card for only 400 USD. Well, they could have released it, if they had working fp16 support in their driver, sigh.
- mattnewton 9y agoThat's for inference though, the intensive part is training no? Then with a reasonable model (maybe distilled somehow from a larger one through more training) you could even do it off CPU or whatever.
- gcp 9y agofp16 is usable for training and inference, so the Vega would have been good for both. I care about inference performance too, anyway. CPU is only a (much slower) fallback if the OpenCL drivers are broken.