The ZLUDA toolkit has been released, allowing CUDA applications to run on AMD GPUs.

The ZLUDA project has prepared an open implementation of CUDA technology for AMD GPUs, enabling the execution of unmodified CUDA applications with performance close to that of applications running without layers. The published toolkit ensures binary compatibility with existing CUDA applications built using the CUDA compiler for NVIDIA GPUs. The implementation works on top of the ROCm stack being developed by AMD, utilizing the HIP (Heterogeneous-computing Interface for Portability) runtime. The project code is written in Rust and is distributed under MIT and Apache 2.0 licenses. It supports operation on both Linux and Windows.

The layer for enabling CUDA functionality on AMD GPU systems has been under development for the last two years, but the project has a longer history, originally aimed at facilitating CUDA operation on Intel GPUs. The shift in GPU support policy is due to the fact that the developer of ZLUDA was initially an Intel employee, but in 2021, the company determined that enabling CUDA applications to run on Intel GPUs was not of business interest and chose not to advance the initiative.

In early 2022, the developer left Intel and entered into a contract with AMD to develop a CUDA compatibility layer. During development, AMD requested that the interest in the ZLUDA project not be publicly disclosed and that no commits be made to the public ZLUDA repository. After two years, AMD decided that the launch of CUDA applications on AMD GPUs was not of business interest, which, according to the contract terms, allowed the developer to reveal their work. As GPU manufacturers ceased funding the project, its future now relies on community interest and collaboration proposals from other companies. Without external support, the project may only advance in areas personally interesting to the author, such as DLSS (Deep Learning Super Sampling).

In its current form, the implementation quality is assessed as an alpha version. Nevertheless, ZLUDA can already be used to run many CUDA applications, including Geekbench, 3DF Zephyr, Blender, Reality Capture, LAMMPS, NAMD, waifu2x, OpenFOAM, and Arnold. Minimal support is provided for the primitives and libraries cuDNN, cuBLAS, cuSPARSE, cuFFT, NCCL, and NVML.

The first launch of CUDA applications on ZLUDA experiences noticeable delays because ZLUDA compiles GPU code. Subsequent launches do not have this delay, as the compiled code is cached. During the execution of the compiled code, performance is close to native. When running the Geekbench benchmark on the AMD Radeon 6800 XT GPU, the CUDA test suite executed via ZLUDA showed significantly higher performance than the OpenCL-based variant.

The ZLUDA toolkit has been released, allowing CUDA applications to run on AMD GPUs.

Support for the official CUDA Driver API and parts of the undocumented CUDA API learned through reverse engineering is implemented in ZLUDA by replacing function calls with equivalent functions provided in the HIP runtime, which closely resembles CUDA. For instance, the function cuDeviceGetAttribute() is replaced with hipDeviceGetAttribute(). Compatibility with NVIDIA libraries, such as NVML, cuBLAS, and cuSPARSE, is similarly ensured—translating libraries with the same name and function set built as wrappers over analogous AMD libraries are provided in ZLUDA.

The GPU code of applications, compiled into PTX (Parallel Thread Execution) representation, is initially translated by a special compiler into an intermediate representation of LLVM IR, from which binary code for AMD GPUs is generated.

The ZLUDA toolkit has been released, allowing CUDA applications to run on AMD GPUs.


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster