Friday, February 16th, 2024 Posted by Jim Thacker

Open-source project ZLUDA lets CUDA apps run on AMD GPUs

Originally posted on 16 February 2024, and updated on 14 March 2024 with details of NVIDIA’s stance on CUDA translation layers.

Andrzej Janik has released ZLUDA 3, a new version of his open-source project that enables GPU-based applications designed for NVIDIA GPUs to run on other manufacturers’ hardware.

The wrapper technology is designed to enable existing applications to run on new hardware unmodified, without the need for any work on their developers’ part.

While previous versions of ZLUDA enabled CUDA applications to run on Intel GPUs, with version 3, that has switched to AMD GPUs.

ZLUDA has been confirmed to work, to varying degrees of success, with software including Blender, photogrammetry apps 3DF Zephyr and RealityCapture, and the Arnold renderer.

Below, we’ve compiled our own FAQs on the project, summarising how it might affect CG artists, and how well other CUDA-based CG applications are likely to run on AMD GPUs under ZLUDA.

ZLUDA? Isn’t that for Intel GPUs?
ZLUDA was first released in 2020, initially as a drop-in replacement for CUDA on Intel GPUs.

It attracted a fair amount of attention in the open-source community, but in 2021, shortly after the release of version 2, Janik announced that he was unable to keep developing the project.

No reason was given, and that seemed to be it for ZLUDA.

However, this week, Janik updated the FAQs section of the ZLUDA GitHub repository to explain the reasons for the radio silence.

In 2021, while he was still working at Intel – he was a Software Engineering Manager on the Visual Technologies team – the firm began to evaluate ZLUDA as a potential official technology.

Intel eventually decided there was “no business case for running CUDA applications on Intel GPUs”, and in 2022, Janik left the company, and, now a freelance contractor, approached AMD.

AMD evaluated ZLUDA for two years, but also decided not to go further with the project – at which point, Janik open-sourced the updated code.

It’s a fascinating story, and one told in more detail in this article on Phoronix, which first reported the news earlier this week.

Why might this matter to CG artists?
Version 3 of ZLUDA is intended to enable GPU-based applications developed using NVIDIA’s CUDA API to run on AMD GPUs.

That’s significant in industries like VFX, motion graphics and visualization, because a number of key CG applications, particularly renderers, are CUDA-based, and effectively NVIDIA-only.

Although AMD has its own technology, HIP, for porting CUDA apps to run on its hardware, it requires work on the part of the software developer.

HIP has been used to create AMD-compatible versions of Redshift and Blender’s Cycles renderer, but so far, few other CG tools developers have followed suit.

In contrast, ZLUDA – version 3 of which is actually built on HIP – is designed to enable CUDA applications run on AMD GPUs unmodified.

That means that artists can, at least in theory, take existing version of NVIDIA-only applications and run them on AMD hardware.

Previously NVIDIA-only software that Janik has tested with ZLUDA includes photogrammetry apps 3DF Zephyr and RealityCapture, and Autodesk’s Arnold renderer.

Gleb Alexandrov’s Attic scene rendered in Arnold under ZLUDA. Support for Arnold is a “proof of concept”: only one other scene has rendered successfully using ZLUDA’s OptiX implementation.

How fast is running a CUDA application under ZLUDA?
Janik describes CUDA apps as running with “near-native performance” on AMD GPUs.

Benchmark scores shown in Phoronix’s article and this thread on the Blender Artists forum suggest that for Blender, performance under ZLUDA is similar to the native HIP backend.

However, the ZLUDA GitHub repository notes that both 3DF Zephyr and Reality Capture are “much slower” under ZLUDA.

In addition, many developers of GPU renderers also use a second NVIDA API, OptiX, to accelerate ray tracing, which also contributes to performance.

ZLUDA has “minimum” support for OptiX, but only on Linux, not Windows, and the implementation is described as “buggy, unoptimized and incomplete”.

In fact, ZLUDA-Optix – used primarily for “proof of concept” support for Arnold – is not included in the redistributable version of ZLUDA: to use it, you have to build it yourself.

Will other CG applications run on AMD GPUs under ZLUDA?
Without user testing, it’s difficult to say how well other CUDA-based CG applications will run under ZLUDA.

However, it seems unlikely to be a magic solution: there are a number of known issues, and Janik has had limited success with other GPU renderers.

The V-Ray benchmark runs on “certain ‘lucky’ older combinations” of ZLUDA and HIP, but OctaneBench, the OctaneRender benchmark, doesn’t run at all.

Will more CUDA-based CG applications run under ZLUDA in future?
Janik says that without the backing of Intel or AMD, “realistically [ZLUDA] is now abandoned”.

Although he says that he is “open to any offers that could move the project forward”, without it, he is only likely to add support for NVIDIA technologies that interest him personally, like DLSS.

However, the source code is publicly available, and Janik suggests that even its current state, ZLUDA could be used by software devs as part of a “more gradual porting from CUDA to HIP”.

Updated 14 March: Tom’s Hardware has an interesting follow-up story pointing out that NVIDIA’s license terms for its SDKs, including the CUDA Toolkit, forbids their use to develop technologies like ZLUDA that translate their output to “target a non-NVIDIA platform”.

License and system requirements
Compiled versions of ZLUDA 3 are available for Windows and Linux. The source code is available under either an Apache 2.0 or MIT license.

Download ZLUDA 3 from the project’s GitHub repository

Have your say on this story by following CG Channel on Facebook, Instagram and X (formerly Twitter). As well as being able to comment on stories, followers of our social media accounts can see videos we don’t post on the site itself, including making-ofs for the latest VFX movies, animations, games cinematics and motion graphics projects.