https://www.phoronix.com/review/radeon-cuda-zluda Phoronix * Articles & Reviews * News Archive * Forums * Premium Ad-Free * Contact * Popular Categories * Close * * Articles & Reviews * News Archive * Forums * Premium * Contact * Categories Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals * [ ] [Search] 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. While there have been efforts by AMD over the years to make it easier to port codebases targeting NVIDIA's CUDA API to run atop HIP/ROCm, it still requires work on the part of developers. The tooling has improved such as with HIPIFY to help in auto-generating but it isn't any simple, instant, and guaranteed solution -- especially if striving for optimal performance. Over the past two years AMD has quietly been funding an effort though to bring binary compatibility so that many NVIDIA CUDA applications could run atop the AMD ROCm stack at the library level -- a drop-in replacement without the need to adapt source code. In practice for many real-world workloads, it's a solution for end-users to run CUDA-enabled software without any developer intervention. Here is more information on this "skunkworks" project that is now available as open-source along with some of my own testing and performance benchmarks of this CUDA implementation built for Radeon GPUs. Radeon GPU running CUDA Blender From several years ago you may recall ZLUDA that was for enabling CUDA support on Intel graphics. That open-source project aimed to provide a drop-in CUDA implementation on Intel graphics built atop Intel oneAPI Level Zero. ZLUDA was discontinued due to private reasons but it turns out that the developer behind that (and who was also employed by Intel at the time), Andrzej Janik, was contracted by AMD in 2022 to effectively adapt ZLUDA for use on AMD GPUs with HIP/ ROCm. Prior to being contracted by AMD, Intel was considering ZLUDA development. However, they ultimately turned down the idea and did not provide funding for the project. Radeon GPU with CUDA-Z on Linux Andrzej Janik spent the past two years bringing ZLUDA to Radeon GPUs and it works: many CUDA software can run on HIP/ROCm without any modifications -- or other processes... Just run the binaries as you normally would while ensuring that the ZLUDA library replacements to CUDA are loaded. For reasons unknown to me, AMD decided this year to discontinue funding the effort and not release it as any software product. But the good news was that there was a clause in case of this eventuality: Janik could open-source the work if/when the contract ended. Radeon ZLUDA Git commit Andrzej Janik reached out and provided access to the new ZLUDA implementation for AMD ROCm to allow me to test it out and benchmark it in advance of today's planned public announcement. I've been testing it out for a few days and it's been a positive experience: CUDA-enabled software indeed running atop ROCm and without any changes. Even proprietary renderers and the like working with this "CUDA on Radeon" implementation. The ZLUDA implementation though isn't 100% fail-safe as NVIDIA OptiX support not being fully supported and some features such as software not using PTX assembly code isn't currently handled. But for the most part this implementation is surprisingly capable for being a single developer effort. Radeon ZLUDA libraries For those wondering about the open-source code, it's dual-licensed under either Apache 2.0 or MIT. Rust fans will be excited to know the Rust programming language is leveraged for this Radeon implementation. NOTE: In my screenshots and for the past two years of development the exposed device name for Radeon GPUs via CUDA has just been "Graphics Device" rather than the actual AMD Radeon graphics adapter with ROCm. The reason for this has been due to CUDA benchmarks auto-reporting results and other software that may have automated telemetry, to avoid leaking the fact of Radeon GPU use under CUDA, it's been set to the generic "Graphics Device" string. I'm told as part of today's open-sourcing of this ZLUDA on Radeon code that the change will be in place to expose the actual Radeon graphics card string rather than the generic "Graphics Device" concealer. 46 Comments - Next Page Tweet [Page 1 - Introduction ] Page: 1 2 3 4 Next Page Related Articles Intel's Open-Source Compute Runtime Performing Increasingly Well Against NVIDIA's Proprietary Linux Driver Intel Arc Graphics See Faster Performance On Ubuntu 23.10 Raspberry Pi 5 Graphics Continue With Open-Source Driver & Crazy Fast Compared To RPi 4 Initial Benchmarks Of The "NVK" Open-Source NVIDIA Vulkan Driver Intel Scores Another Nice Arc Graphics Boost On Linux For Summer 2023 Intel Arc Graphics Enjoy Nice ~10% Speedup With Recent Open-Source Linux Driver Latest Linux News Intel Releases x86-simd-sort 5.0 With 4~5x Faster C++ Object Sorting Using AVX-512 OpenZFS Native Encryption Use Raises Data Corruption Concerns Rust Kernel Support On AArch64 Ready To Go For Linux 6.9 GNOME Mutter 46 Beta A Win For Gamers & VM Users, Other Last Minute Changes Too Linux 6.8-rc4 Released With Bcachefs & NTFS3 File-System Fixes, Transmeta Crusoe Fix AMDGPU Driver Changes Begin For Linux 6.9: RAS ACA Framework, SEQ64 Infrastructure & Fixes Debian 12.5 Released To Provide The Latest Security & Bug Fixes AMD Zen 5 Compiler Support Posted For GCC - Confirms New AVX Features & More Qualcomm Hardware Support Increasingly In Good Shape On The Mainline Linux Kernel Xfce 4.20 Aiming For Usable Wayland Support While Maintaining X11 Compatibility Show Your Support, Go Premium Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations. Latest Featured Articles AMD Quietly Funded A Drop-In CUDA Implementation Built On ROCm: It's Now Open-Source NVIDIA GH200 CPU Performance Benchmarks Against EPYC Zen 4 & Xeon Emerald Rapids AMD Ryzen 5 8500G: A Surprisingly Fascinating Sub-$200 CPU AMD Announces Embedded+ Architecture For Ryzen Paired With Xilinx IP AMD Ryzen 5 8600G Linux Performance Support Phoronix The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by subscribing to Phoronix Premium. You can also contribute to Phoronix through a PayPal tip or tip via Stripe. Phoronix Media --------------------------------------------------------------------- * Contact * Michael Larabel * OpenBenchmarking.org Phoronix Premium --------------------------------------------------------------------- * Support Phoronix * While Having Ad-Free Browsing, * Single-Page Article Viewing Share --------------------------------------------------------------------- * Facebook * Twitter * Legal Disclaimer, Privacy Policy, Cookies | Contact * Copyright (c) 2004 - 2024 by Phoronix Media. * All trademarks used are properties of their respective owners. All rights reserved.