开源项目 ZLUDA 让 CUDA 应用程序在 AMD GPU 上运行
Open-source project ZLUDA lets CUDA apps run on AMD GPUs

原始链接: https://www.cgchannel.com/2024/02/open-source-project-zluda-lets-cuda-apps-run-on-amd-gpus/

最近推出的 ZLUDA 3 由 Andrzej Janik 创建,允许以前仅与 NVIDIA 制造的 GPU 兼容的 CUDA 应用程序在 AMD 生产的芯片上无缝运行。 这项突破性技术通过一个开源项目发挥作用,该项目将 CUDA 应用程序封装在 AMD 专有的 HIP 框架内,提供几乎相同的“本机”性能。 尽管由于驱动程序开发的复杂性,ZLUDA 迄今为止存在一些限制,但它为严重依赖 CPU 要求高的软件(通常是 NVIDIA 品牌产品专用的软件)的 CG 专业人士带来了巨大的希望。 目前,ZLUDA 的范围已扩展到 Blender、摄影测量软件 3DF Zephyr 和 RealityCapture 以及 Autodesk 的 Arnold 渲染器等程序。 然而,根据 Blender 论坛上进行的 Benchmark 分数和测试,在 AMD 系统上运行时,CUDA 应用程序的性能可能与相应的本机支持的等效应用程序相同。 然而,在某些情况下,应用程序速度在操作过程中可能会受到轻微影响,特别是在 ZLUDA 和 HIP 的特定配置上。 值得注意的是,实现 ZLUDA 确实需要构建自定义内核,这是一个相对简单的过程,使具有最少编程经验的用户能够轻松进行实验。 最终,虽然 ZLUDA 提供了快速解决方案,但随着 AMD 准备增加对 HIP 基础设施的投资,开发人员希望未来能够在不同品牌的图形处理单元之间提供更精细的交叉兼容性。

黑客新闻上有很多关于在线其他地方可用的替代言论监管方法的帖子。 但是,如果您更喜欢在黑客新闻的背景下讨论替代方案,请随时在本文下方进行讨论。 你的来电。
相关文章

原文


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”.

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.

联系我们 contact @ memedata.com