175 points · by chiassedu80 · 2mo ago · 109 comments
It's unbearable that most LLM inference happens on closed H/W, closed drivers, and closed SDKs.
I would really appreciate your input!
1. Top end model on high/xhigh thinking (last time I did it it was Sol xhigh I think)
2. Make sure it creates some representative fixtures of different sizes and sets up a good testing, profiling and benchmarking loop that doesn't require my input.
3. Make sure it has access to reference implementation code
Edit: Oh and one obvious pitfall that for some reason I still have to remind even smart models of from time to time: make sure it knows not to try to parallelize its benchmark runs. I've occasionally had an agent struggle to figure out absolutely nonsensical data because it tried to run multiple tests on the same compute hardware simultaneously.
Can you tell us what kind of gain you got ie. what was the speed bump
Keep in mind though that this is also sometimes use case dependent. Off the shelf implementations are generally pretty good overall, but can have pathological behavior on specific workload shapes you care about. So do this as a somewhat later optimization, and particularly when you see performance characteristics that don’t seem to make any sense.
The moment LunarG no longer gets sponsored it will be back to "here is a standard, all the best, the community will provide the tools".
On the SYSCL front, that is mostly driven by Intel, and their own OpenAI tooling, there are hardly any offerings for SYCL from anyone else. Thus it is really only pseudo-open.
My software is labeled "CPU only unless using an nVidia GPU". I would prefer to strikethrough "nVidia". Incidentally, this means no more Mac support.
Even Carmack later admitted that DirectX had become much better than OpenGL, but they weren't going to change given the studio culture.
See https://www.bit-tech.net/news/gaming/pc/carmack-directx-bett...
It's likely that CUDA will continue dominating until they put aside their differences. The current MLX/MPS/ROCm ecosystems are too fractured to threaten Nvidia.
Intel uses SPIRV iirc
They're migrating away from SPIR-V to their own, Intel PISA: https://discourse.llvm.org/t/rfc-upstreaming-the-pisa-backen...
The basic underlying tech can be agreed on, but Apple/AMD/Intel all have different GPU priorities that limit their ability to agree on a CUDA-adjacent hardware platform.
Source: worked at a bunch of accelerator companies in the kernels or equivalent team. They're nothing alike.
Early graphics APIs ran on GPUs that were just about as different form one another as that.
We could easily figure it out, were it not for the trillion dollars incentives to not figure it out.
Sucks like important libraries like Alphafold are locked into CUDA. Its ridiculous for researchers.
the source language has never been the moat. Nvidia sells to hyperscalers. Hyperscalers have armies of kernel authors who have no issue translating shaders by hand (or now with claude). Nvidia's moat is (and will remain for the foreseeable future) the entire stack. you cannot fathom the pain and misery of working on literally any other stack. if you've never debugged a GPU synchronization error or kernel panic due to some GPU firmware bug or fought absolute shit profilers hunting for perf you really have no idea what you're talking about.
EDIT: i can't believe this really requires saying but graphics and compute are not the same domain at all. if you work in graphics for GPU but not compute then you are still way out of your depth commenting. to wit: graphics people do not (and cannot) write CUDA kernels/shaders.
“graphics people do not (and cannot) write CUDA kernels/shaders” is just not true at all. All it would take to verify that would be things like reading the introduction of the OptiX documentation, a small sample of SIGGRAPH GPU papers or the Blender/Cycles source code.
ZLUDA is already doing that, no?
ZLUDA is JIT (it's working with the binary, not the source, which usually means you've lost some information) and it doesn't support CDNA, which is a showstopper for enterprises, tho it's a great project and it's awesome seeing it work on Windows (I wonder whether MS Defender complains about it due to library injection? IIRC, it used to. That'd be another enterprise showstopper)
Someone here mentioned scale-lang.com already as a portability tool - it also beats HIP in the performance game, on average. scale-lang.com/s/discord is where its community lives.
disclaimer: I am part of SCALE's team, Spectral Compute
This gives me strong "Bash on Ubuntu on Windows" kind of vibes
AMD GPUs build for AI specs for reference: https://flopper.io/gpus?vendor=AMD&page=1
The FP16 throughput on RDNA1 is both shader reliant and requires everything to be packed first. Even with 2 or 4 or 1000 cards, you would be consuming all of the available memory and memory bandwidth just packing and unpacking values, and if you really want to dump a hundred billion tokens into making it work anyways, you're only going to find out that even if you bother to sit there ferrying packed values to ram or disk before then issuing the instructions, paying that already severe penalty again when the values then have to be unpacked is so steep of a cost that the 256 BF16 flops/cu/clock's effective throughput is outright lower than simply doing it on a Zen 2 processor. You also don't have INT8 (or really INT4) on RDNA1 so the other RNS/CRT tricks aren't viable.
Sadly RDNA1's VCN2 also lacks actually good x264 bframe encoding support, or even P010 for 10 bit color, so what I'm saying is you should sell them. Used Radeon VII's are like $260, you'll go a lot further with those especially if you throw in a 7900XTX, and then augment that further with a 9070 CRE (you only want it for its int8 cores), and of course 128GB of ram.
E: And sure, that's 3, or ideally 4 GPUs, and a good bit of extra work. But that gets you up to more than halfway to the naive performance of a $15,000 MI300x in a surprising amount of cases, with additional strengths that it lacks. For far less than half of the cost
- what exactly is CUDA?
- is it patented hardware tech that AMD cannot replicate?
- is it a library that ll also work on AMD while it currently works on nvidia
- can AMD cook an equivalent of CUDA, if so why havent they done it?
At the botton you have the PTX bytecode.
Followed by (from NVidia) compilers for C, C++, Fortran, Python JIT and more recently Julia JIT.
Additionally there are third party support for .NET, Java, Haskell tooling to also target CUDA.
Then you have the libraries ready to plug into the official NVidia compilers to reduce the need to explicitly write CUDA code manually.
Finally you have the graphical debugging and profiling tools that make targeting GPUs as easy as regular CPU programming, ignoring the hardware differences for a moment.
All wannabe replacements fail, because they focus only on the CUDA C++ compiler and nothing else.
I’ve been working on a Windows setup that lets CUDA-targeted applications run on AMD GPUs using ZLUDA + ROCm/HIP.
Repo: https://github.com/Speedstu/CUDA-for-AMD-Windows
So far, it has only been tested on my RX 9060 XT (gfx1200), where I’ve used it with CUDA-enabled LibTorch workloads, including long ai training and use.
I also added a GPU scanner / auto-detection system that detects:
AMD GPU model
gfxXXXX architecture
ROCm/HIP installation
driver info
whether the GPU has already been validated by the project
Example:
RX 9060 XT → gfx1200 → RDNA4 → HIP detected → validated
The goal now is to test it on more hardware, especially RX 6000 / 7000 / 9000 cards.
If you have an AMD GPU on Windows and want to try it, I’d really appreciate compatibility reports working or broken. There’s a dedicated GPU compatibility issue template in the repo.
If this is useful to you, a star would also help the project get more testers.