6 ms·
Anyone here use OpenCL for their day job? Practically speaking, what are the use cases for it in a corporate environment?
by lwb 7y ago
Anyone here use OpenCL for their day job? Practically speaking, what are the use cases for it in a corporate environment?
- sjmulder 7y agoI’ve been exploring it for use for financial calculations that are ‘embarrassingly parallel’. It’s much faster alright but people here aren’t trained in data oriented programming. Might end up writing some generic accelerated building blocks for use from VBA.
- lmeyerov 7y agoWe abandoned it due to lack of ecosystem support. We originally picked it for general ETL / analytics / preprocessing data viz when opencl vs. nvidia for commodity data parallel hardware ( = GPU ) was unclear, and as a long option in case FGPAs would ultimately make sense. But the CUDA software stack's community + Nvidia investments eventually converted us. Interestingly, we now exclusively use high-level data parallel abstractions like RAPIDS dataframes, so if there was say a Modin->risc-v path, wouldn't be too heavy a lift to port most of our stack. (Though, as is, little reason to.)
- zozbot234 7y agoThe ecosystem seems to be moving to Vulkan-based compute these days. That's more aligned to the hardware than plain old OpenCL, so performance should be improved.
- lmeyerov 7y agoNot sure what hw support adds here. While I prefer stacks that a megacorp doesn't own at the bottom, my point is it's the software. Current langs + frameworks are relegated to a tiny fragment of the coding population. So more about making it as easy to reach for GPU / data parallel stuff as folks do for say Spark or Pandas. We tried working with AMD & Intel early on here but they didn't really get it (architects, investors, and a few other decision-maker-types). It's easy to put $10-20M into the ecosystem and just build it -- a16z finally has several years after we pitched it to them, and so did Nvidia with rapids.ai after we pushed them for a couple years ("what's a dataframe?"). Nothing stopping AMD/Intel and other opencl ecosystem players. But they still aren't.
- Athas 7y agoI don't think this is true, or at least as simple a story as "Vulkan is faster". OpenCL is already a pretty good and modern API, and computation in Vulkan doesn't seem like it's the main point. It's my impression that Vulkan is mostly fast compared to OpenGL, and particularly by removing driver overheads, but that has never really been a big problem with OpenCL. Last year, I had a student add a Vulkan backend to a GPU-targeting compiler[0]. Compared to the OpenCL backend, many programs ran substantially slower, and very few ran faster. It's certainly possible that this backend is imperfect, but it's more of a data point that I have seen elsewhere. [0]: https://futhark-lang.org/student-projects/steffen-msc-project.pdf https://futhark-lang.org/student-projects/steffen-msc-projec...
- bubblethink 7y agoIt's like CUDA, but not owned by NVIDIA. AMD's entire ROCM stack is based on OpenCL. That means that if you run tenserflow on amd gpus, you are using OpenCL. By corporate environment, if you mean day to day IT, probably none. It's useful for high performance and parallel code.
- pjmlp 7y agoYou got it wrong, it is like CUDA but only supports C, has lousier debugging tools, and buggy drivers. Yes it does support C++ and finally has its own bytecode format for heterogeneous programming, but unless the card is OpenCL 2.2, it is back to my first paragraph.
- rrss 7y agoPretty sure the rocm backend for tensorflow uses hip, not OpenCL, and hip is basically just AMD's implementation of cuda. I don't think it's accurate to say that the "entire ROCM stack is based on OpenCL." The rocm stack supports OpenCL, but it also supports hip, which is what AMD chose to use to implement many of the new libraries in the rocm platform (rocBLAS, rocFFT, rccl; replacing cuBLAS, cuFFT, nccl) FWIW, rocm also doesn't support OpenCL 2.0.
- nl 7y agoROCM isn't OpenCL based.
- Ono-Sendai 7y agoYes, we use it for Indigo Renderer (https://www.indigorenderer.com/ https://www.indigorenderer.com/) and Chaotica Fractals (https://www.chaoticafractals.com/ https://www.chaoticafractals.com/). It allows cross-platform (Windows, Mac, Linux) execution on GPUs.
- boulos 7y agoVlado mentioned at SIGGRAPH, that they basically gave up and has gone from OpenCL => CUDA => "let OptiX handle it" => "OptiX7 w/ RTX". Do you have a CUDA and/or RTX comparison? P.S. It's awesome you're still working on Indigo!
- Ono-Sendai 7y agoOpenCL seemed to have comparable performance to CUDA when we stopped using CUDA. I don't have comparisons with RTX on hand. The main problem with OpenCL now is not performance but vendor/driver support. For example the Apple OpenCL drivers are pretty buggy.
- wyldfire 7y agoIf you have an HPC workload it can make sense. Lots and lots of software work is I/O bound and doesn't do a whole heckuva lot of computation. I used to use OpenCL at work a lot.
- Awtem 7y agoSadly, OpenCL (alongside OpenGL) are already deprecated on Mac...
- pjmlp 7y agoCurrently none. Android uses its own dialect, RenderScript. iOS had OpenCL, but since Metal got introduced, Metal Shaders are much better. On Windows I used C++AMP for a while, now I just make use of Java/.NET libraries that plug into CUDA. OpenCL biggest mistake was focusing on C only instead of opening the programming model to other languages. SPIR and SYS-CL came too late into the game.
- fulafel 7y agoBlender and Darktable use it at least. Also commercial Mac apps like Photoshop, Premiere etc. It's emitted by a bunch of compiler backends (eg Futhark). ML and computer vision toolkits support it (eg PyTorch, OpenCL etc). Not sure what you mean by corporate environments but the suits probably mostly use Excel and calc.exe :)
- kitd 7y agoTbf, Excel making use of OpenCL kind of makes sense :)