4 ms·
There have been a few OpenCL versus CUDA posts lately and I wanted to add my take on it after writing the GPU portion of sixtyfour, which was my first GPGPU app
by tyoma 7y ago
There have been a few OpenCL versus CUDA posts lately and I wanted to add my take on it after writing the GPU portion of sixtyfour, which was my first GPGPU application.
OpenCL needs more examples, tutorials, and documentation. I really wanted to use it because it is cross platform, but quickly gave up. The tutorials and documentation wasn’t there, and what I did find was confusing. For CUDA there is an immense body of examples, support, and documentation that makes creating your first CUDA program dead simple.
I went with CUDA.
- frozenport 7y agoOpenCL needs template meta programing and C++ language features, right now its too painful to do any serious optimization (like work per element).
- cesarb 7y ago> For CUDA there is an immense body of examples, support, and documentation that makes creating your first CUDA program dead simple. Isn't it dead simple only if you have compatible hardware? OpenCL works everywhere, even in the worst case on the CPU through pocl.
- retrac 7y agoI'm surprised this isn't more of an advantage. Sometimes you just need to test if your code runs and in my experience, a CPU on my netbook is fine for that purpose. With CUDA I have to upload the code to a VM and test it there. Both expensive and a bit awkward.
- tyoma 7y agoI originally wanted to do just that, but my laptop is a MacBook and OpenCL is deprecated there. With CUDA I could just ssh to an old box under my desk.
- tyoma 7y agoI know, that was one of the reasons I wanted to use OpenCL. My time for this was limited, and I saw I could get a basic implementation working much faster in CUDA. All the major cloud providers offer (only) NVIDIA cards too, so it was not a hindrance for the end goal of running it on cloud.
- pjmlp 7y agoTry to use OpenCL on Android.
- llukas 7y agoDifferent subsets of OpenCL with different extensions work everywhere. If you want to use C++ then it definitely doesn't work everywhere. Precompiled kernels (SPIR-V) also do not work (anywhere?). Writing a GPU C program that only gets compiled when you run your program is extra overhead on productivity.
- nixpulvis 7y agoI took a class one summer that used OpenCL. Ended up learning a lot. Maybe this will help someone: https://github.com/nixpulvis/gpu_prog_arch https://github.com/nixpulvis/gpu_prog_arch
- pjmlp 7y agoBack when I started to explore GPGPU, OpenCL was all about C, CUDA allowed me to play with more productive languages, naturally I also went with CUDA. Same applies to Vulkan versus other next-gen APIs.
- jdc 7y agoDid you check out SYCL at all?