AMD GPUs are now compatible with CUDA applications


Nvidia has established itself for around fifteen years as the benchmark player in calculation for artificial intelligence. All the major innovations in the sector over the past two decades, from the advent of deep learning to the major language models that have shaken up tech since last year, run on Nvidia GPUs.

The key to this success was CUDA (Compute Unified Device Architecture), a software platform that allows non-specialized operations to be performed on a graphics chip. An approach called GPGPU, for “general-purpose computing on GPUs”. These calculations for “general use” were until now the prerogative of CPUs. Today, Nvidia is one of the most valuable companies in the world, its market capitalization having surpassed that of Intel, the CPU giant, last August when it announced its quarterly results.

Advertisement

AMD takes on the CUDA ecosystem

AMD, the other major historical supplier of graphics chips (since the acquisition of ATI in 2006), finally seriously launched into the battle a few months ago, with a GPU designed specifically for generative artificial intelligence: l 'Instinct MI300X. A late but welcome awakening. The only problem is that optimizing almost all AI tasks for CUDA limits its immediate usefulness.

AMD has therefore been seeking for several years to make its GPUs compatible with this proprietary ecosystem. We learned this February 13 from our colleagues at Phoronix that AMD has discreetly funded work over the past two years to run CUDA applications on ROCm, its own software platform designed for high performance computing (HPC) and AI, simply by replacing the software libraries (thus without the need to adapt the code). And these efforts seem to have paid off. It is a former Intel developer, Andrzej Janik, recruited in 2022 by AMD, who is at the origin.

The project of a former Intel engineer

Janik had independently launched an open source project called ZLUDA (based on OneAPI Level Zero), whose goal was to run CUDA on Intel GPUs. But the latter did not consider it promising enough and did not wish to finance the project. Andrzej Janik therefore continued his work within AMD, this time with the objective of adapting ZLUDA for use on Radeons.

Andrzej Janik remained discreet during his work, and he was also asked not to participate publicly in the development of ZLUDA. After two years of development and discussions, it works. Despite this, AMD has decided to stop funding this development, and will not publish anything resulting from it. Luckily, Andrzej Janik had planned this.

Advertisement

“One of the terms of my contract with AMD was that if they didn't deem it suitable for further development, I could release it. Which brings us to today,” says Andrzej Janik. The project was therefore published on GitHub and can be downloaded. According to our colleague from Phoronix, who carried out several tests, many CUDA applications can now run on HIP/ROCm without any modification.

Satisfactory results


“Simply run the binaries as you normally would while ensuring that the ZLUDA libraries replacing CUDA are loaded”, he assures. In terms of performance, CUDA compatible software works quite well on ROCm. “Even proprietary renderers and the like work with this CUDA implementation on Radeon,” it is specified.


If the RTX 4080 tops the benchmarks in all of our colleague's tests, the Radeon RX 7900 XTX is often not far behind and outperforms the RTX 4070. ZLUDA also performs better than OpenCL in many cases of figure. Obviously, this implementation of ZLUDA is not perfect (Nvidia OptiX is for example not fully supported), and AMD probably prefers real ports optimized for its platform, but this project has the merit of working effortlessly in a majority of cases.

Selected for you

The Competition Authority is investigating the generative AI sector

Advertisement