Scripts2026年5月25日·1 分钟阅读

ZLUDA — Run CUDA Applications on AMD and Intel GPUs

A drop-in CUDA compatibility layer that lets unmodified CUDA applications run on non-NVIDIA GPUs via translation to native GPU APIs.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
ZLUDA Overview
通用 CLI 安装命令
npx tokrepo install 25196ced-57d1-11f1-9bc6-00163e2b0d79

Introduction

ZLUDA is a compatibility layer that translates CUDA API calls to native GPU APIs (ROCm HIP for AMD, oneAPI Level Zero for Intel). It allows existing CUDA binaries to run on non-NVIDIA hardware without source code changes or recompilation.

What ZLUDA Does

  • Translates CUDA runtime and driver API calls to AMD ROCm HIP at runtime
  • Supports Intel GPUs via oneAPI Level Zero backend
  • Handles PTX (NVIDIA's intermediate representation) to native GPU ISA compilation
  • Works with pre-compiled CUDA binaries without requiring source access
  • Provides partial cuBLAS, cuSPARSE, cuFFT, and cuDNN API translation

Architecture Overview

ZLUDA intercepts CUDA library calls by acting as a drop-in replacement for CUDA shared libraries (libcuda, libcudart). When a CUDA application loads, ZLUDA's libraries are loaded instead. PTX kernels are compiled on-the-fly to the target GPU's native instruction set using the respective vendor SDK. The translation layer maps CUDA memory management, stream synchronization, and kernel launch semantics to equivalent constructs on the target platform.

Self-Hosting & Configuration

  • Build from source with Rust nightly toolchain
  • AMD support requires ROCm 5.x+ installed on the host
  • Intel support requires oneAPI Level Zero runtime
  • Set LD_LIBRARY_PATH to point ZLUDA libraries before the real CUDA libraries
  • No configuration files; behavior is controlled via environment variables

Key Features

  • Binary-level CUDA compatibility without recompilation
  • On-the-fly PTX to native ISA compilation
  • Support for CUDA runtime API, driver API, and select math libraries
  • Works with popular frameworks when their CUDA usage aligns with supported APIs
  • Active development with growing API surface coverage

Comparison with Similar Tools

  • ROCm HIP — requires source-level porting from CUDA to HIP; ZLUDA works at binary level
  • SCALE (Spectral Compute) — compiles CUDA source to AMD targets; needs source access
  • chipStar — translates CUDA/HIP to OpenCL or Level Zero but requires source compilation
  • Intel SYCL — cross-vendor GPU programming but requires rewriting in SYCL
  • Native CUDA (NVIDIA) — no translation overhead but locks you to NVIDIA hardware

FAQ

Q: Does ZLUDA support all CUDA applications? A: No. Coverage depends on which CUDA APIs the application uses. Core runtime and driver APIs are well-supported; specialized libraries have partial coverage.

Q: What is the performance overhead? A: Varies by workload. Simple compute kernels often run near-native speed. Complex applications using many CUDA libraries may see larger gaps.

Q: Is ZLUDA officially supported by AMD or Intel? A: No. ZLUDA is an independent open-source project. AMD previously sponsored development but it is now community-driven.

Q: Can I use ZLUDA for machine learning inference? A: Some inference workloads work, but full training pipelines often depend on cuDNN features that have limited coverage.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产