News for hackers. Stuff that matters.
Re:Which GPUs to get for deep learning by nanagojo on Tuesday September 08, 2020 @12:34AM (#24405229)
CUDA owns the industry. AMD has to step up with a good alternative to disrupt it. Any serious work is being done in CUDA and there are lots of resources for CUDA.
Re:Which GPUs to get for deep learning by shmerl on Tuesday September 08, 2020 @12:46AM (#24405284)
You don't need to use CUDA for GPU programming, no? It's simply a lock-in. But I'm sure Nvidia was pushing it quite lot to make sure it's hard not to use it. But it clearly has to go. It's not healthy for the industry.
Re:Which GPUs to get for deep learning by fluffything on Tuesday September 08, 2020 @06:25AM (#24406997)
> You don't need to use CUDA for GPU programming, no?

No, you don't _need_ to use CUDA for GPU programming, you can use OpenCL or Vulkan or probably even PHP instead.

I do, however, _want_ to use the best programming language for the task at hand. If that task is GPU programming, CUDA is the best language I know for that, much better than SyCL, OpenCL, Vulkan / OpenGL + shaders, etc.

If these other technologies would be better, I would use them instead.

Re:Which GPUs to get for deep learning by shmerl on Tuesday September 08, 2020 @12:53PM (#24410240)
CUDA can't be best if it's tied to a single GPU. It's DOA by definition. This idea of "a language that only works on this hardware" is out of some dinosaur lock-in handbook from the last century.
Re:Which GPUs to get for deep learning by fluffything on Wednesday September 09, 2020 @07:22AM (#24419791)
CUDA compiles to CPUs, and AMD has support for CUDA via HIP.

Not that this matters because your argument is flawed.

The claim that CUDA is not worth using because it lacks portability, only holds, if there is hardware worth using that's not supported by CUDA.

The only GPUs worth buying for compute are from nvidia and support CUDA, so your claim isn't true.

The only thing you achieve today by not using CUDA is paying a huge price in development quality for portability that you can't use.

The startup cemetery is filled with companies that made this trade-off and picked OpenCL just in case they wanted to use non-nvidia hardware. They were all killed by the velocity of their competitors that were using CUDA to deliver better products that payed the bills.

The only people for which it might make sense to avoid CUDA are "non-professionals" (hobbyist, etc.). If you only want to use OpenCL to "learn OpenCL", then OpenCL is the right choice. But if you want to make money, then CUDA was the right choice 15 years ago and still is the right choice today.

If that makes you angry, direct your anger properly. It isn't NVIDIA's fault that CUDA is really good. It is however, AMD's, Intel's, Apple's, Qualcomm, ARM's... fault that everything else _sucks hard_. Being angry at nvidia for delivering good products is just stupid. Its the other companies fault that they can't seem to be able to get their sh* together when it comes to GPU computing.

Re:Which GPUs to get for deep learning by shmerl on Wednesday September 09, 2020 @01:21PM (#24423321)
> The only GPUs worth buying for compute are from nvidia

That sounds like koolaid marketing to me. AMD GCN was more compute oriented than Nvidia for years and only lately AMD increased focus on gaming with RDNA.

Re:Which GPUs to get for deep learning by fluffything on Thursday September 10, 2020 @07:39AM (#24431296)
> That sounds like koolaid marketing to me.

That's a fact: check HPL, MLPerf, Spec, etc. results. MLPerf is the perfect example, were your results are only accepted if they can be verified by others. Where is AMD in there? (nowhere, their products suck for compute).

> AMD GCN was more compute oriented than Nvidia for years

No, the only thing AMD GCN was good for is as a very expensive stove.

AMD GCN had a lot of compute, on paper, and higher numbers than nvidia GPUs of the time. Unfortunately, AMD GCN's memory subsystem sucked, and it was impossible to deliver data fast enough to actually be able to use the compute.

So nvidia's hardware essentially destroyed GCN for any useful practical application.

IIRC, the only application for which GCN's got some use was bitcoin mining, which avoided hitting GCN's issues because it just requires doing a ton of useless work on a tiny amount of memory. Perfect for GCN right? Nope, nvidia's hardware was still better, but sold out, and GCN wasn't horrible at this, so it got some use.

AMD actually fired the architect of GCN over this. Yet this still perfectly summarizes AMD's GPGPU strategy of the last 15 years: higher numbers on paper, that cannot be achieved in practice, and lower that the numbers that nvidia's hardware achieves in practice.

Re:Which GPUs to get for deep learning by atomlib on Tuesday September 08, 2020 @12:57AM (#24405334)
Are you trying to say Nvidia created a great framework for GPU compute so everyone is using it?
Re:Which GPUs to get for deep learning by shmerl on Tuesday September 08, 2020 @01:26AM (#24405441)
Nvidia probably sponsored a lot of high level frameworks that only support CUDA, essentially poisoning them with lock-in.
Re:Which GPUs to get for deep learning by pjmlp on Tuesday September 08, 2020 @02:21AM (#24405687)
Nope, it is up to Khronos and other card vendors to actually offer tooling beyond stone age C dialects and printf style debugging.

NVidia cannot be blamed for their incompetency.

Re:Which GPUs to get for deep learning by fluffything on Tuesday September 08, 2020 @06:32AM (#24407037)
Somebody below mentions that nvidia donated free GPUs to the developers of these open source frameworks.

Why didn't AMD do this as well? I thought AMD was strong on supporting open source.

[dead]
Re:Which GPUs to get for deep learning by hobofan on Tuesday September 08, 2020 @02:24AM (#24405693)
Though this is a snapshot from ~2015, I don't think anything has significantly changed since then:

I developed a (more or less popular, though not in wide use) ML framework[0] back then. NVIDIA pretty quickly contacted us and offered to send a Titan X (top-of-the-line back then) our way.

We also tried to make the framework work with OpenCL, but were severely limited in doing so. Mostly because Nvidia intentionally limits their GPUs to an older OpenCL version that has an uncompetitive featureset. They started doing that once they had a decent lead in the market over AMD. With that OpenCL was no longer vendor agnostic, but rather AMD-only, and you would always need to fully support both backends to support both vendors.

Yes, Nvidia may produce the best GPUs right now and have great market and mindshare, but there is nothing "honest and deserved" about how they got there.

[0]: https://github.com/autumnai/leaf

Re:Which GPUs to get for deep learning by fluffything on Tuesday September 08, 2020 @06:28AM (#24407014)
> because Nvidia intentionally limits their GPUs to an older OpenCL version that has an uncompetitive featureset

So I suppose you still used OpenCL for AMD and Intel hardware because that worked well there? That is, OpenCL only worked poorly on nvidia hardware?

If that's the case, I wonder what's your take on OpenCL 3.0 reverting all OpenCL > 1.2 features, such that OpenCL 3 is essentially OpenCL 1.2. The reason given by Khronos is that _nobody_ was implementing these features anyways. Yet your story sounds like AMD had great support for OpenCL newer features, and only nvidia's support was poor, kind of contradicting Khronos themselves.

Maybe you meant that nvidia has poor support for OpenCL 1 ?

Re:Which GPUs to get for deep learning by hobofan on Tuesday September 08, 2020 @07:51AM (#24407478)
Not sure if I can offer a good take, as I don't 100% remember. We didn't have much resources to tackle OpenCL, as it was already hard enough to compete against the other frameworks on the CUDA side alone, so that's where our focus was until our company shut down. IIRC we had all the basics working with OpenCL 1.2 (with an Intel CPU and Titan X as test devices) and were looking into transitioning towards 2.0, as the abstractions used there were much closer to those in CUDA. I remember particularly the memory management in 1.2 to be a pain and difficulties around async RAM<->VRAM copies and subsequent async kernel execution. The latter in particular accounted for the biggest performance differences when profiling the same tasks on the Nvidia GPU.

I'm not really informed about what happened with OpenCL 3.0, but I would count any 2.x features as essential when trying to compete with modern CUDA. I don't think the support for OpenCL _the standard_ was bad, but there wasn't really any comparable tooling for OpenCL, and a set of good cuBLAS, cuDNN, etc. alternatives was missing. If OpenCL 3 is really reverting back to 1.2, that sounds like a big mistake.

Re:Which GPUs to get for deep learning by fluffything on Wednesday September 09, 2020 @07:16AM (#24419747)
> If OpenCL 3 is really reverting back to 1.2, that sounds like a big mistake.

See: https://www.anandtech.com/show/15746/opencl-30-announced-hit...

This was also extensively discussed here in HNs. You might be able to find that thread, was really interesting.

Re:Which GPUs to get for deep learning by pjmlp on Tuesday September 08, 2020 @02:27AM (#24405715)
The fact that OpenCL is stuck on a C dialect, while CUDA is a polyglot runtime already puts OpenCL out of the game for me.

In fact it was thanks to this that Khronos finally woke up, but it was too late, and almost no one cares to target SPIR, while SYSCL just decided to go backend agnostic with the whole 1.2 => 3.0 rebranding.

As for the rest, rules of the game.

Re:Which GPUs to get for deep learning by shmerl on Tuesday September 08, 2020 @02:31AM (#24405727)
Nvidia has been doing this anti-competitive junk for years. There is nothing honest and deserved about crooked practices.

Today it should be easier to target compute queues with something like Vulkan though, which is a generic GPU API, not limited to graphics.

Re:Which GPUs to get for deep learning by pjmlp on Tuesday September 08, 2020 @03:19AM (#24405966)
Another example of Khronos being stuck with C mindset and poor tooling.

Vulkan Compute so far hasn't gotten anywhere.

Re:Which GPUs to get for deep learning by shmerl on Tuesday September 08, 2020 @02:15AM (#24405657)
AMD apparently had asynchronous compute support in hardware when Nvidia didn't. And cryptocurrency miners bought AMD a lot more as well.

I don't call lock-in shenanigans a fair advantage. And supporting lock-in is a slippery slope.

Re:Which GPUs to get for deep learning by pjmlp on Tuesday September 08, 2020 @02:24AM (#24405697)
That did not come with support for C++, Fortran, .NET, Java, graphical debuggers with ability to step through shader code, so bad luck.
Re:Which GPUs to get for deep learning by sdenton4 on Tuesday September 08, 2020 @12:46AM (#24405282)
(well, there is also 'serious' work being done with TPUs...)