AMD Quietly Funded A Drop-In CUDA Implementation Built On ROCm: It's Now Open-Source

Written by Michael Larabel in Display Drivers on 12 February 2024 at 09:00 AM EST. Page 4 of 4. 153 Comments.

Seeing ZLUDA + Blender 4's CUDA back-end delivering (slightly) better performance than the native Radeon HIP back-end was a sight to see and made for exciting prospects, besides ZLUDA being beneficial for software yet to see any native ROCm/HIP port.

Radeon GPU CUDA drop-in libraries

Similarly, Andrzej Janik has found that the ZLUDA code path for CUDA-enabled software like GeekBench often performs better than the generic OpenCL path for allowing existing Radeon GPU compute support. In best cases the ZLUDA path was 128~175% the performance of the OpenCL Geekbench results for a Radeon RX 6800 XT. Here are those benchmarks shown by Andrzej Janik of his OpenCL vs. ZLUDA Radeon performance:

Radeon ZLUDA performance

ZLUDA is an incredible technical feat getting unmodified CUDA-targeted binaries working on AMD GPUs atop the ROCm compute stack. It's worked well once sorting out the device selection issues as noted and then a few software applications like OctaneBench not running due to limitations. It's well beyond the past of being a minimum viable product but is working real-world software packages on at least the RDNA (Navi) class GPUs. It's open-source, written in Rust, and running remarkably well especially for being a one man band. And it works on both Linux and Windows environments.

It apparently came down to an AMD business decision to discontinue the effort, but unfortunate. In some ways though it's understandable as in 2024 there is now more software packages natively supporting ROCm/HIP than a few years ago... If ZLUDA on AMD hardware had been ready a couple years ago, it could have been a whole different show. But now that AMD is delivering capable accelerators/GPUs and their software stack has matured, the software ecosystem has begun better embracing ROCm and more commonly providing software support. But ROCm is still not nearly as ubiquitous in 2024 as NVIDIA CUDA. Given the pervasiveness of NVIDIA CUDA over the years, ultimately there will inevitably be software out there indefinitely that will target CUDA but not natively targeting AMD GPUs either due to now being unmaintained / deprecated legacy software or lacking of developer resources, so there is still value to the ZLUDA effort.

Even with the steady rise of ROCm/HIP-ported software in recent years, it's hard to understand why AMD would discontinue this effort of supporting this secretive ZLUDA development. With it just being a single contracted developer, presumably it wasn't budget constraints but I'd have to guess maybe legal related or some other non-technical reasons... Or just not wanting to enhance the developer outlook for supporting NVIDIA's walled garden any further. But in any event an unfortunate move for end-users just wanting CUDA software to "just work" (for the most part) with their Radeon GPUs. It was great even pulling random binaries like CUDA-Z that hasn't been updated since 2015 and finding that binary just working fine atop ZLUDA with Radeon iGPUs and dGPUs.

ZLUDA on AMD GPUs still share some of the same inherent issues of ROCm in the officially supported hardware spectrum not being as broad as NVIDIA with their all-out CUDA support. Or the matter of ROCm largely catering to the major enterprise Linux distributions and aside from that the ROCm software support is basically limited to community efforts elsewhere. So the same headaches of installing/using ROCm are involved with the ZLUDA route as opposed to a relatively care-free experience on any Linux distribution and any (recent) GPU if using the NVIDIA proprietary driver.

At the end of the day though ZLUDA is awesome. It's an awesome technical marvel for showcasing GPU computing possibilities and getting CUDA-only software up and running on Radeon GPUs. It's unfortunate AMD isn't pursuing the effort further but at least now it's open-source. It will be interesting to see if it's open-source code evolves and if there is enough community backing and demand for easy CUDA software binary support on AMD GPUs. Andrzej Janik hasn't expressed much optimism around the prospects of crowd-funding/donations to continue ZLUDA development at full-speed short of receiving new corporate backing, but did mention interest in at least working on ZLUDA for his own personal needs such as exploring NVIDIA DLSS on ZLUDA for AMD Radeon hardware. Hopefully something can come about to keep the project alive.

Those wanting to check out the new ZLUDA open-source code for Radeon GPUs can do so via GitHub. Here's to hoping for the success of ZLUDA as a very exciting open-source project!

If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.


Related Articles
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.