News for hackers. Stuff that matters.
Re:Lisa Su Saved AMD. Now She Wants Nvidia's AI Crown by belval on Friday June 02, 2023 @02:13PM (#36168772)
If you ever get the chance to write something in OpenCL and then in CUDA I promise you will understand immediately why Google didn't push for it.

There is a lot more boilerplate to it, read/write to the buffer, queueing being handled explicitly. Here's an example that illustrate what I mean: https://github.com/rsnemmen/OpenCL-examples/blob/master/mand...

For comparison here is an implementation in CUDA: http://selkie.macalester.edu/csinparallel/modules/CUDAArchit...

Notice how the CUDA code is more readable.

Re:Lisa Su Saved AMD. Now She Wants Nvidia's AI Crown by bryanlarsen on Friday June 02, 2023 @02:20PM (#36168847)
Google is part of the Khronos group. They were well positioned to steer the standard towards one that doesn't suck. Or they could have championed a different standard. Google has the scale that only Google is to blame that they are still heavily dependent on a closed standard.

Open Standards almost always beat closed ones. IMO AMD was right to bet on open standards. They lost the bet but I think it was the right bet.

Re:Lisa Su Saved AMD. Now She Wants Nvidia's AI Crown by barbariangrunge on Friday June 02, 2023 @05:18PM (#36170869)
> the Khronos group

I still wake up at night, sweating, thinking about my time learning OpenGL in university. The docs were a nightmare back then

Re:Lisa Su Saved AMD. Now She Wants Nvidia's AI Crown by shaklee3 on Saturday June 03, 2023 @01:14AM (#36173917)
openCL != openGL
Re:Lisa Su Saved AMD. Now She Wants Nvidia's AI Crown by SuchAnonMuchWow on Friday June 02, 2023 @03:24PM (#36169624)
In the link provided, the CUDA example only show the compute kernel itself and not the boilerplate required to run it. On the other hand, your OpenCL example only show the boilerplate.

This is the OpenCL kernel from the same repo, for a more fair comparison: https://github.com/rsnemmen/OpenCL-examples/blob/master/mand...

This is much more readable. OpenCL-C the language is fine: it's how you deploy the program on the cards that is complicated with opencl.