Comment by pjmlp

Comment by pjmlp 10 months ago

27 replies

CUDA success has much to thank Intel and AMD for never providing anything with OpenCL that could be a proper alternative in developer experience, graphical debugging, libraries and stable drivers.

Even OpenCL 2.x C++ standard was largely ignored or badly supported by their toolchains.

winwang 10 months ago

Isn't the point of OpenCL to be... open? Not only did Intel and AMD not provide enough value, but neither did the community.

CUDA... is kind of annoying. And yet, it's the best experience (for GPGPU), as far as I can tell.

I feel like it says something that CUDA sets a standard for GPGPU (i.e. its visible runtime API) but others still fail to catch up.

  • cogman10 10 months ago

    The problem is the OpenCL development model is just garbage.

    Compare the hello world of OpenCL [1] vs CUDA [2]. So much boilerplate and low level complexity for doing OpenCL whereas the CUDA example is just a few simple lines using the cuda compiler.

    And what really sucks is it's pretty hard to get away from that complexity the way OpenCL is structured. You simply have to know WAY too much about the hardware of the machine you are running on, which means having the intel/amd/nvidia routes in your application logic when trying to make an OpenCL app.

    Meanwhile, CUDA, because it's unapologetically just for nVidia cards, completely does away with that complexity in the happy path.

    For something to be competitive with CUDA, the standard needs something like a platform agnostic bytecode to target so a common accelerated platform can scoop up the bytecode and run it on a given platform.

    [1] https://github.com/intel/compute-samples/blob/master/compute...

    [2] https://github.com/premprakashp/cuda-hello-world

    • winwang 10 months ago

      Yeah, not just OpenCL, but even "newer" standards like WebGPU. I considered making a blog post where I just put the two hello worlds side-by-side and say nothing else.

      I was severely disappointed after seeing people praise WebGPU (I believe for being better than OpenGL).

      As for the platform-agnostic bytecode, that's where something like MLIR would work too (kind of). But we could also simply just start with transpiling that bytecode into CUDA/PTX.

      Better UX with wider platform compatibility: CuPy, Triton.

dragontamer 10 months ago

OpenCL 2.x was a major failure across the board.

OpenGL and Vulkan were good though. Gotta take the wins where they exist.

  • pjmlp 10 months ago

    Thanks to Intel and AMD.

    • dragontamer 10 months ago

      NVidia never even implemented OpenCL 2.0

      AMD had a buggy version. Intel had no dGPIs so no one cared how well an iGPU ran OpenCL (be it 1.3 or 2.0)

      --------

      AMD was clearly pushing C++ AMP at the time with Microsoft. And IMO, it worked great!! Alas, no one uses it so that died.

      • pjmlp 10 months ago

        Don't blame NVidia for Intel and AMD failures to support OpenCL.

        • talldayo 10 months ago

          Olympics-tier mental gymnastics, considering Apple treated both Intel and AMD as manufacturing partners at the time.

talldayo 10 months ago

cough cough

Remind me who owns the OpenCL trademark, again?

Intel and AMD weren't the ones that abandoned it. Speaking in no uncertain terms, there was a sole stakeholder that can be held responsible for letting the project die and preventing the proliferation of Open GPGPU standards. A company that has everything to gain from killing Open standards in the cradle and replacing them with proprietary alternatives. Someone with a well-known grudge against Khronos who's willing to throw an oversized wrench into the plans as long as it hurts their opponents.

  • pjmlp 10 months ago

    Don't blame Apple for what Khronos, Intel and AMD have done with OpenCL after version 1.0.

    It isn't Apple's fault that Intel and AMD didn't deliver.

    • talldayo 10 months ago

      It is entirely Apple's fault that they rejected OpenCL to replace it with a proprietary library. If this was an implementation or specification problem, Apple had every opportunity to shape the project in their own image. They cannot possibly argue that this was done for any other reason than greed, considering they themselves laid the framework for such a project. Without Apple's cooperation, Open Source GPGPU libraries can not reasonably target every client. Apple knows they wield this power, and considering their history it's both illogical and willfully ignorant to assume they're not doing this as part of a broader trend of monopolistic abuse.

      Having shut out Nvidia as part of a petty feud, Apple realized they could force any inferior or nonfree CUDA alternative onto their developers no matter how unfinished, slow or bad it is. They turned away from the righteous and immediately obvious path to complicate things for developers that wanted to ship cross-platform apps instead of Mac-only ones.

      • pjmlp 10 months ago

        The fact is that Intel, AMD and even Google (coming up with Renderscript), didn't gave a shit about making OpenCL something developers cared about.

        • talldayo 10 months ago

          That's not their job. CUDA wasn't "something developers cared about" for 11 fucking years and now look at where we are. If the OEMs focused on doing their job and implementing their standards, then neither of us would be trying to assign blame in the first place.

          The worst part is, now that Apple has gone all-in on incomplete and proprietary alternatives, nobody has won. Apple successfully applied their monopoly abuse to a market that they have completely captive. And we want to blame... checks clipboard Intel and AMD, for having renewed interest in a successful decade-old concept.

  • google234123 10 months ago

    Would you be willing to share the deal with Apple/Khronos relations?

    • troupo 10 months ago

      Apple didn't like OpenGL, rightfully, and came up with their own Metal which they released two years before first version of Vulkan was released.

      Now people pretend that Apple is bad because it never adopted Vulkan and never implemented the "good modern OpenGL" (which never really existed).

      • jsheard 10 months ago

        It runs deeper than that, during the development of WebGPU it came to light that Apple was vetoing the use of any Khronos IP whatsoever, due to a private legal dispute between them. That led to WebGPU having to re-invent the wheel with a brand new shader language because Apples lawyers wouldn't sign off on using GLSL or SPIR-V under any circumstances.

        The actual details of the dispute never came out, so we don't know if it has been resolved or not.