CUDA on ??? GPUs
Find a file
2024-12-20 22:13:00 +01:00
.cargo Connect new parser to LLVM bitcode backend (#269) 2024-09-13 01:07:31 +02:00
.devcontainer Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
comgr Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
cuda_base Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
cuda_types Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
detours-sys Fix 32-bit builds 2021-04-09 20:32:37 +02:00
ext Fix host code and update to CUDA 12.4 (#299) 2024-12-02 00:29:57 +01:00
llvm_zluda Fix host code and update to CUDA 12.4 (#299) 2024-12-02 00:29:57 +01:00
ptx Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
ptx_parser Fix host code and update to CUDA 12.4 (#299) 2024-12-02 00:29:57 +01:00
ptx_parser_macros Recover from and report unknown instructions and directives (#295) 2024-11-02 15:57:57 +01:00
ptx_parser_macros_impl PTX parser rewrite (#267) 2024-09-04 15:47:42 +02:00
zluda Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
zluda_bindgen Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
zluda_dump Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
zluda_inject Enable Geekbench 5 (#304) 2024-12-10 21:48:10 +01:00
zluda_ml Fix build error (#314) 2024-12-20 18:33:05 +01:00
zluda_redirect Clean up ZLUDA redirection helper 2022-02-04 14:14:51 +01:00
.gitattributes Fix linguist instructions 2024-08-07 13:29:03 +02:00
.gitignore Reorganize project to a workspace 2020-02-09 20:32:21 +01:00
.gitmodules Fix host code and update to CUDA 12.4 (#299) 2024-12-02 00:29:57 +01:00
Cargo.toml Fix host code and update to CUDA 12.4 (#299) 2024-12-02 00:29:57 +01:00
GeekBench_5_2_3.svg Fix signed integer conversion (#36) 2021-01-26 21:05:09 +01:00
LICENSE-APACHE Update wording, add license 2020-11-24 23:23:53 +01:00
LICENSE-MIT Update wording, add license 2020-11-24 23:23:53 +01:00
README.md Update README 2024-12-20 22:13:00 +01:00

Discord

ZLUDA

ZLUDA is a drop-in replacement for CUDA on non-NVIDIA GPU. ZLUDA allows to run unmodified CUDA applications using non-NVIDIA GPUs with near-native performance.

ZLUDA is work in progress. Follow development here and say hi on Discord. For more details see the announcement: https://vosen.github.io/ZLUDA/blog/zludas-third-life/

Usage

Warning: This version ZLUDA is under heavy development (more here) and right now only supports Geekbench. ZLUDA probably will not work with your application just yet.

Windows

You should have recent AMD GPU driver ("AMD Software: Adrenalin Edition") installed.
To run your application you should etiher:

  • (Recommended approach) Copy ZLUDA-provided nvcuda.dll and nvml.dll into a path which your application uses to load CUDA. Paths vary application to application, but usually it's the directory where the .exe file is located
  • Use ZLUDA launcher like below. ZLUDA launcher is known to be buggy and unfinished
    <ZLUDA_DIRECTORY>\zluda_with.exe -- <APPLICATION> <APPLICATIONS_ARGUMENTS>
    

Linux

Run your application like this:

LD_LIBRARY_PATH=<ZLUDA_DIRECTORY> <APPLICATION> <APPLICATIONS_ARGUMENTS>

where <ZLUDA_DIRECTORY> is the directory which contains ZLUDA-provided libcuda.so: target\release if you built from sources or zluda if you downloaded prebuilt package.

MacOS

Not supported

Building

Dependencies

  • Git
  • CMake
  • Python 3
  • Rust compiler (recent version)
  • C++ compiler
  • (Optional, but recommended) Ninja build system

Build steps

  • Git clone the repo (make sure to use --recursive option to fetch submodules):
    git clone --recursive https://github.com/vosen/ZLUDA.git
  • Enter freshly cloned ZLUDA directory and build with cargo (this takes a while):
    cargo build --release

Linux

If you are building on Linux you must also symlink the ZLUDA output binaries after ZLUDA build finishes:

cd target/release
ln -s libnvcuda.so target/release/libcuda.so
ln -s libnvcuda.so target/release/libcuda.so.1
ln -s libnvml.so target/release/libnvidia-ml.so

Contributing

ZLUDA project has a commercial backing and does not accept donations. ZLUDA project accepts pull requests and other non-monetary contributions.

If you want to contribute a code fix or documentation update feel free to open a Pull Request.

Getting started

There's no architecture document (yet). Two most important crates in ZLUDA are ptx (PTX compiler) and zluda (AMD GPU runtime). A good starting point to tinkering the project is to run one of the ptx unit tests under a debugger and understand what it is doing. cargo test -p ptx -- ::add_hip is a simple test that adds two numbers.

Github issues tagged with "help wanted" are tasks that are self-containted. Their level of difficulty varies, they are not always great starting points, but they have a relatively clear definition of "done".

If you have questions feel free to ask on #devtalk channel on Discord.

License

This software is dual-licensed under either the Apache 2.0 license or the MIT license. See LICENSE-APACHE or LICENSE-MIT for details