View Full Version : CUDA on AMD - solution for running CUDA filters on RDNA hardware?
Adub
13th February 2024, 12:50
I realize this development impacts many different areas of our video world, but I know many people run CUDA based Vapoursynth filters so I figured I’d post this here.
In short, a developer working for AMD for two years has created a drop-in replacement of CUDA libraries that can run on RDNA series AMD cards. And the performance is actually shockingly good, even better than native ROCm implementations in some cases.
Reference:
1. https://github.com/vosen/ZLUDA
2. https://www.phoronix.com/review/radeon-cuda-zluda
Anyone have an RDNA GPU that they’d be able to test some filters with?
WolframRhodium
13th February 2024, 14:33
1. Significant number of features are missing.
ZLUDA's coverage of cuDNN APIs is very minimal (just enough to run ResNet-50) and realistically you won't get much running.
2. Even if ZLUDA is a miracle, BM3DCUDA for example should not be able to run on non-RDNA series GPUs unmodified, and the result should be non-deterministic garbage. This is a design decision because the code assumes Wave32 (and forward progress guarantees).
3. Why not using the native HIP api? In fact, it requires HIP driver support,
ZLUDA is built purely on ROCm/HIP.
which is not available (https://rocm.docs.amd.com/projects/install-on-windows/en/latest/reference/system-requirements.html#windows-supported-gpus) on RX GPUs.
Adub
13th February 2024, 15:38
3. Why not using the native HIP api? In fact, it requires HIP driver support,
which is not available (https://rocm.docs.amd.com/projects/install-on-windows/en/latest/reference/system-requirements.html#windows-supported-gpus) on RX GPUs.
That link shows that ROCm *does* work on RX GPUs (under the “Radeon” tab) though? And the Phoronix article specifically shows the author testing on the RX 7900, among others?
Or are we confusing the terms ‘RX’ somehow?
guest
13th February 2024, 17:09
I have an RX 480...but it's not currently in anything.
Would that work ??
Adub
13th February 2024, 17:35
Ahhh that might be the source of confusion - RX has been used to refer to multiple AMD GPU generations, including prior to RDNA.
But I believe in this case, ZLUDA only works on the RDNA versions of RX cards (things like the more recent RX 6X00 - 7X00 cards).
I’ll update the thread title to use the letters RDNA to prevent confusion.
So in short, no, I don’t believe an RX 480 can be used for testing ZLUDA.
guest
13th February 2024, 21:04
That's a shame :(
Thanks.
ReinerSchweinlin
16th February 2024, 13:16
ZLUDA is an amazing project - and the historie of AMDs and MIcrosofts involvemend is interesting, too (head over to youtube, some nice reports about the topic).
I have been toying around with GPU Computation for quite a while now. And I have a lot of AMD GPUs... And I sadly have to say: ROCm is not the way to go - support is way too bad. Only a handfull of recent GPUs is supported, even GNC 5.1 Cards like the RVII will fall out of support soon. While - with some tweaking and tingering - some older GCN Cards or recent consumer cards will work or can be persuaded to work - its far less straight forward and in most cases much less performant than CUDA.
So using some older AMD Card for video-filtering is difficult. I have some Furys or VEGA Cards, which are quite powerfull for scalar computation stuff, and could very well serve in a filter chain - but bot don´t run with HIP "out of the BOX".. With Nvidia, I can take any old Maxwell Card and make use of it.
OPENCL can be used, but thats not the future..
I had quite a lot of experiments with computation in the "AI" realm - for example: Getting stable diffusion to run.. While Trying to get it to run with ROCm is a P.I.D.A. - Vulkan or DirectML work and can be quite good in terms of speeds.
A CUDA2Vulkan "translator" would be lovely - Similar to DXVK in the gaming world, where DirectX Calls are translated to Vulkan, making Windows Games work in Linux (or even speed up windows games in windows - in some cases, the speeds are astonishing). Vulkan would be cross-plattform, free, not bound to any manufacturer and is likely to stay and fast.
If DirectML will ever make it into the Linux world - I don´t know... Under windows, even older GCN Cards can be used and some are surprisingly fast, GCN computation did age like fine wine (of course, modern tensor cores or alike are muuuuch faster - but for some a R9-290x is perfectly fine fo openCL denoising and encoding in x265 in an avysinth filter chain.)
I´d love to see ZLUDA stay alive - maybe it switches to vulkan as base? (or maybe AMD will sort out ROCm someday?)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.