How Nvidia’s CUDA Monopoly in Machine Learning Is Breaking
semianalysis.com
semianalysis.com
That means everything I build is locked to NVidia as well, and everything people build on top of my stuff will be locked to NVidia too. Trying to maintain compatibility is like making Wine run Windows apps natively.
The lock-in is now very significant. Virtually no one else has shipped anything really stable and usable, and we're now a very long time into people coding and testing only on NVidia.
I hear that higher-level APIs are being built, nominally intended to be cross-platform, but I suspect (1) those will go the same way (2) we'll want backwards-compatibility. I have code which uses old ML models, CuPy, or otherwise. That stuff is locked to NVidia. I'm buying NVidia. This means I'm only making patches to bugs impacting NVidia. Network effects.
So long as most people buy NVidia, NVidia will have more engineering resources too. It's very hard for a smaller player to catch up or pass. See Intel for many decades.
To break from NVidia would require either a gross failure in execution by NVidia or something fundamentally new. To break the monopoly, I could see new products which might deliver:
- Very low latency
- Support for conventional DDR in large quantity (so I can run GPT-3 models at home)
- Much more general functionality (e.g. an open architecture, and integration with conventional Python to parallelize normal code)
... or other significant new features. However, I don't see a lot of stuff like that being worked on, let alone coming out.
Same applies to their compute stuff. They really really want you to purchase their Pro cards and whatnot, and if you have a consumer card well too bad. Go back to playing games. Whereas with my Nvidia card CUDA runs flawlessly which leads me to doing test projects at home and fixing a bug here and there.
AMD doesn't understand how much of development happens on either home computers or university labs with small budgets which means consumer cards. They seem to think that everything happens using big teams and big money. Even though in reality it's the small developers doing stuff that then drives the purchase of the very lucrative large clusters.
For all of it's downsides NVidia actually understand the grassroots approach. Which is why their stuff just works on consumer stuff too.
I think the timing of when they entered into the field is also relevant. When Nvidia first came on the scene swinging, they really needed to see what would stick; so you have to try fishing in every available pond. You don't know what will necessarily pan out or catch on. So you need the tech to be available to all your consumers at every level, consumer, enterprise, HPC, everything. And it turns out, they found that there are customers at every single one of those levels, and providing for all of them provides both a good on-ramp, and a path to bigger things.
In contrast AMD is so late to the game, and there's so much money sloshing around in the field right now, and the trajectories of what big buyers want is so much more clear -- that they can just afford to mostly ignore the lower end. They know where the money is. The field and buyers and use cases are just much more well understood from the business "make money in the easiest way" POV.
As for Intel, they seem to actually be dedicating tons of money to the software stack for oneAPI, to work everywhere, which is not surprising IMO. They have the money to dump into this (the most money intensive) task and know it's critical for their products to reach anything other than pork-belly HPC contracts.
I watched a video over the weekend about how a new amd apu using rdna3 will make entry level/cheap graphics cards useless, but thats not really going to be the case if you want to dip your feet into utilizing an entry level card for workloads. Gamers turn their nose up at dinky gtx 1650s but at least you can use it to edit video. Theres no wonder intel doesnt see AMD as real competition in the space.
I was surprised when I started playing around with Stable Diffusion a couple of weeks ago and it just kind of worked with ROCm. That being said, I did run into a couple of very annoying issues... almost running out of VRAM seems to trigger GPU timeouts but as far as I can tell the GPU itself is fine and the memory allocation crawled to a halt. This also seems to be much more likely when running at half precision, which is a shame given that the relatively large 16GB VRAM effectively gets cut in half when running at full precision...
But this is already a big improvement over "ROCm doesn't support RDNA2" [0] which was still the case ~1.5 years ago. I just really hope that AMD keeps up the effort and fixes all the small and big issues that are still around...
Stable Diffusion is literally the single highest-profile application of machine learning. There has been extensive effort to make it work in all sorts of places. If it were the year 2000, someone would port it to a Beowulf cluster...
I'm more concerned about SpaCy, CuPy, the hundreds (thousands) of models on Hugging Face, etc. I do use a lot of that stuff. Buying a GPU or accelerator which only runs the high-profile stuff is a bad buy.
I still remember trying to train a model with TensorFlow on AMD maybe 2 years ago. The only option was OpenCL and it was disappointingly slow (and barely any load on the GPU) and in the end I switched back to my old 1060 which worked much better.
I found that running out of memory would lock up my X session, spam kernel logs about GPU ioctls timing out, and require a reboot. That's much less friendly than CUDA reporting an error to the requesting application and carrying on!
Better algorithms would require writing new ML libraries which would weaken the stranglehold GPUs have on ML. New niches opening would inevitably be bad for Nvidia, but good for upstarts.
https://bdtechtalks.com/2022/12/19/forward-forward-algorithm...
It actually wasn't as hard as I was expecting. Don't get me wrong, it will definitely depend on the size of your code base as to how effective of a tool it is. However, I managed to port over most of mine in the course of the month, and it's showing dividends now I'm making back performance gains using FPGA hardware acceleration. I'm now vendor neutral, and can run my code on team Red, Blue, or Green. I'd argue that heterogeneous computing is a good enough reason to make the switch.
[1]https://www.intel.com/content/www/us/en/develop/documentatio... [2]https://www.khronos.org/sycl/
I've been running Stable Diffusion on my M1 MBP since...I dunno, November or something? and it's working great.
I dont find that acceptable for a workflow where I need to tweak prompts.
It's important to mention that there is a huge difference in performance between a new MacBook with 8 GB or 16 GB of RAM when it comes to this memory-intensive ML tasks.
I dont think the m1 pro comes with 8gb either, so kinda unwarrented assumption. I love the kneejerk reaction on me saying anything bad about apple though.
If $W > $X + $Y, then people will go with AMD.
I'd love to get an AMD [6650XT-ish] for my teen's gaming PC. But they also do some programming with me and I slightly worry about "oh, your PC can't do CUDA, therefore can't do XYZ that's interesting to you". I probably will still just go AMD and then have us use rented GPUs if we want to do any CUDA demos together.
I have never ordered any server hardware, but there's a dashboard where I can see some abstracted infrastructure CAPEX and OPEX numbers for my team, org, division, etc.
These numbers get reported up the food chain and initiatives to reduce costs are rewarded if the savings are significant enough.
Initiatives to support ARM servers or AMD's CUDA equivalents can take a long time and be expensive to achieve full compatibility, but experiments in areas where the effort is not terribly high can demonstrate enough value to fund teams to do so.
I suspect that's most difficult in mid sized organizations where the hardware costs are high enough to get some savings but not high enough to fund a team to work on it, especially once the opportunity cost of new features is taken into account.
Universities, mid sized companies, big companies without a software focus, etc. spring to mind as the ones with the biggest disconnect between hardware costs and ability to fund engineers to cut them down.
That's actually most of the market. AMD will do fine for 3d gaming, stable diffusion, and a few similar uses. And price/performance wins for giant data centers doing something specialized (but if NVidia is about to lose a major data center deal because $W > $X + $Y, they can just cut a deal on $W).
And there’s a reason for that. OpenCL and particularly ROCm are much lower level and much less immediately usable compared to CUDA. AMD now has HIP, but HIP is “something that is almost CUDA-compatible, with no real improvements”, instead of actually doing something new and better. CUDA is an old API, and certainly has its rough edges, but I wonder why nobody has managed to do something genuinely _better_ in all these years.
ROCm is so low-level and pedantic it is nearly unusable. A simple implementation of FFT takes about 150 lines of C++/CUDA and about 2000 lines in ROCm — so no, no competition at all.
The competition is still like "Fortran what??!" every time I happen to watch a Khronos or AMD talk on compute.
ROCm is a framework, and its existence likely has a bigger impact on the quality of CUDA and the good behavior of Jensen than we realize.
Enjoy your 2% market share.
If the new PyTorch funnels everything through abstractions that don't require you to implement as many primitives to port it onto a new backend, then it matters less than before if ROCm (or whatever...) is harder to use, because the person doing the port don't have to do as much with it, and the actual application programmer never sees it at all.
> OpenAI Triton only officially supports Nvidia GPUs today, but that is changing in the near future. Multiple other hardware vendors will be supported in the future, and this open-source project is gaining incredible steam.
It's not even the first tool for allowing ML workloads in non NVidia cards. ROCm already exists. TF already supports M1/M2 GPU already. The entire point is that no cards come close to Nvidia on raw GPGPU performance, and this is not going to change in near future.
There is lower level code below cuda and below hip. In cuda, it's closed source and hidden. In rocm, you can follow the control flow all the way into the amdkfd kernel module.
I like having the option to program at a lower level than cuda. When I need to write in hip, I like having all the source from the stack trace.
Those Perl scripts won't do nothing for them.
Anything targeting PTX via LLVM should be able to target GCN by changing flags, though that may not be totally seamless.
Things writing ptx assembly directly would be more awkward to retarget, there's no direct equivalent there.
It is only a dialect of C++ for those that don't bother to read about what CUDA actually is.
The vast vast majority of ML researchers do not want to spend time fiddling with compiler flags. Give them something they can't do with NVIDIA, make the process not awful, and there's money to be found. At the very least, "winning" at AI will increase your revenue multiple...
I will never buy another nVidia card. They have made the firmware only modifiable to themselves. This forbids you from slowing down the card, for instance to run at a lower temperature (and prolong its life).
"Little hope of reclocking becoming available for GM20x and newer GPUs as firmware now needs to be signed by NVIDIA to have the necessary access."
The same is true for current generation of AMD cards :/ You can no longer edit voltage tables
I don't believe the firmware build tools are public. If you want to have a go with a hex editor, I'm not aware of any encryption or code signing going on. Interested to hear if I've missed it though.
Side note, the cookie popup box on that website was ridiculous and lacking the 'reject all' option, but the content is readable by disabling javascript.
Hopefully my laptop will outlast these tyrannical practices. If it doesn't, I'll just skip the dedicated GPU entirely.
Kinda funny we went from the wintel era to the winvidia era
Operator fusion ( function composition ) has helped but devs time is impacted by the ever growing list of fused operations.
This is a great overview of what Pytorch 2.0, TorchInduction, and OpenAI's Triton potentially bring to the table.
Namely compilation to LLVM bypassing CUDA, fusing operators and compiling graphs at a lower level allowing other arcitectures, kept out by CUDA's NVIDIA exclusivity, to potentially offer competeting compilers - other compilation toolchains are very early days though.
Backward comptibility is vital and the article details that these innovations are succesfully tested against existing Neural Net code.
NVIDIA still rules the roost in science and industry compute. In this rapidly growing market competition is healthy so this is a good thing for everyone - especially those differentiators like ARM competing on Watts per FLOP.
OpenAI's Triton compiles down to CUDA atm (if I read their github right), and only supports Nvidia GPUs.
PyTorch 2.0's installation page only mentions CPU and CUDA targets, therefor it's effectively all Nvidia GPUs.
While all the frameworks and abstractions could offer other back-ends in theory the story of anything ML related on the other big name in the industry, AMD, is still poor.
If anybody looses business because of bad decisions it is AMD, not Nvidia, who lead the whole industry. I am not convinced that anything will change in the near future.
> AMD ROcm supports Pytorch, TensorFlow, MlOpen, rocBLAS on NVIDIA and AMD GPUs: https://rocmdocs.amd.com/en/latest/Deep_learning/Deep-learni... [...]
> ROCm-Developer-Tools/HIPIFY https://github.com/ROCm-Developer-Tools/HIPIFY :
>> hipify-clang is a clang-based tool for translating CUDA sources into HIP sources. It translates CUDA source into an abstract syntax tree, which is traversed by transformation matchers. After applying all the matchers, the output HIP source is produced. [...]
From https://github.com/RadeonOpenCompute/clang-ocl :
> RadeonOpenCompute/OpenCL compilation with clang compiler
Apple has done more to see Apple Silicon supported in the ML space in almost no time than AMD did over the past decade. Apple obviously has more resources, but they don't have a 1000 person team working on this, I suspect, but instead it's a very commando, efficient operation. They got a small number of dedicated resources committed to bringing support and enabling the community, and it happened.
https://www.the-investing-desk.com/nvidia-will-lose-its-grip...
Eww, so it'll be 90% slower?
cuBLAS is insanely optimized. It's the reason why CUDA dominates the field even though one could in theory use a ROCm build of TensorFlow or PyTorch. But performance is abysmal without cuBLAS. So the entire article appears to hinge on a huge assumption: What if Free Open Source was equivalent to NVIDIA's top-tier priorietary library? (It's not)
Readers should at least visit the original site if they want to read the free part.
The whole ROCm stuff is built around the idea that you push out a half-working, buggy, and slow mess as Open Source and then the community will take over and maintain it into a usable product. But that hasn't happened so far. Instead of building their own FOSS libraries, people are happy to use NVIDIA's proprietary libraries.
Deleted comment
> Maybe the move away from CUDA dependence for these frameworks will make other manufacturers step up competition for accelerating ML workloads. But they should have been doing that anyway...
That is entirely down to SW, not the HW. For example consider these two 24GB cards:
Nvidia 4090: 82.58 TFLOPS/$1,599 = 51 GFLOPS/$
AMD 7900 XTX: 61.42 TFLOPS/$999 = 61 GFLOPs/$
Uhh, it's easier to debug because it's not C++. Rust is fairly easy to debug and profile, despite being compiled