https://github.com/vosen/ZLUDA Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} vosen / ZLUDA Public * Notifications * Fork 84 * Star 1.4k CUDA on Intel GPUs License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT 1.4k stars 84 forks Star Notifications * Code * Issues 18 * Pull requests 0 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights vosen/ZLUDA This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 22 branches 2 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/v] Use Git or checkout with SVN using the web URL. [gh repo clone vosen/] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @vosen vosen Search for a new developer (#44) ... 60d2124 Feb 28, 2021 Search for a new developer (#44) 60d2124 Git stats * 164 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .cargo Regenerate SPIR-V tests (#29) January 8, 2021 19:06 .github/workflows Add zluda_redirect.dll to CI builds (#40) February 21, 2021 17:44 detours-sys Add a library for dumping kernels arguments before and after launch ( #18 January 16, 2021 22:28 ext Merge commit '4b96dbc8f49c5ae00c96935e0b576df88a5d8af9' January 3, 2021 17:54 level_zero-sys Make misc fixes (#41) February 22, 2021 01:29 level_zero Make misc fixes (#41) February 22, 2021 01:29 ptx Make misc fixes (#41) February 22, 2021 01:29 spirv_tools-sys Update level0 to 1.0 and unpack fatbins August 28, 2020 22:37 zluda Make misc fixes (#41) February 22, 2021 01:29 zluda_dump Improve ZLUDA injection (#37) February 20, 2021 21:40 zluda_inject Improve ZLUDA injection (#37) February 20, 2021 21:40 zluda_lib Prevent linker from stripping exports on Linux (#33) January 15, 2021 01:17 zluda_redirect Improve ZLUDA injection (#37) February 20, 2021 21:40 .gitignore Reorganize project to a workspace February 9, 2020 20:32 .gitmodules Validate PTX build tests against SPIR-V sources July 12, 2020 14:58 CONTRIBUTING.md Add script for replaying dumped kernel (#34) January 23, 2021 16:57 Cargo.toml Add a library for dumping kernels arguments before and after launch ( #18 January 16, 2021 22:28 GeekBench_5_2_3.svg Fix signed integer conversion (#36) January 26, 2021 21:05 LICENSE-APACHE Update wording, add license November 24, 2020 23:23 LICENSE-MIT Update wording, add license November 24, 2020 23:23 README.md Search for a new developer (#44) February 28, 2021 12:18 View code [ ] ZLUDA Performance Explanation of the results Details Usage Windows Linux Building Linux Contributing License README.md Notice: Due to private reasons I am currently unable to continue developing this project. If you want to take it over, fork it and contact me at vosen@vosen.pl ZLUDA ZLUDA is a drop-in replacement for CUDA on Intel GPU. ZLUDA allows to run unmodified CUDA applications using Intel GPUs with near-native performance (more below). It works with current integrated Intel UHD GPUs and will work with future Intel Xe GPUs Performance ZLUDA performance has been measured with GeekBench 5.2.3 on Intel UHD 630. One measurement has been done using OpenCL and another measurement has been done using CUDA with Intel GPU masquerading as a (relatively slow) NVIDIA GPU with the help of ZLUDA. Both measurements use the same GPU. Performance below is normalized to OpenCL performance. 110% means that ZLUDA-implemented CUDA is 10% faster on Intel UHD 630. Performance graph ZLUDA - detailed results on Geekbench.com OpenCL - detailed results on Geekbench.com Overall, ZLUDA is slower in GeekBench by roughly 2%. Explanation of the results * Why is ZLUDA faster in some benchmarks? This has not been precisely pinpointed to one thing or another but it's likely a combination of things: + ZLUDA uses Level 0, which in general is a more low level, high performance API than OpenCL + Tying to the previous point, currently ZLUDA does not support asynchronous execution. This gives us an unfair advantage in a benchmark like GeekBench. GeekBench exclusively uses CUDA synchronous APIs + There is a set of GPU instructions which are available on both NVIDIA hardware and Intel hardware, but are not exposed through OpenCL. We are comparing NVIDIA GPU optimized code with the more general OpenCL code. It's a lucky coincidence (and a credit to the underlying Intel Graphics Compiler) that this code also works well on an Intel GPU * Why is OpenCL faster in Canny and Horizon Detection? Authors of CUDA benchmarks used CUDA functions atomicInc and atomicDec which have direct hardware support on NVIDIA cards, but no hardware support on Intel cards. They have to be emulated in software, which limits performance * Why is ZLUDA slower in the remaining benchmarks? The reason is unknown. Most likely, in some tests we compile from suboptimal NVIDIA GPU code and in other tests ZLUDA itself is emitting suboptimal Intel GPU code. For example, SFFT used to be even slower before PR #22 Details * Is ZLUDA a drop-in replacement for CUDA? Yes, but certain applications use CUDA in ways which make it incompatible with ZLUDA * What is the status of the project? This project is a Proof of Concept. About the only thing that works currently is Geekbench. It's amazingly buggy and incomplete. You should not rely on it for anything serious * Is it an Intel project? Is it an NVIDIA project? No, it's a private project * What is the performance? Performance can be close to the performance of similarly written OpenCL code (see GeekBench results in the previous section). NVIDIA GPUs and Intel GPUs have different architecture and feature set. Consequently, certain NVIDIA features have to be emulated in ZLUDA with performance penalty. Additionally, performance of ZLUDA will be always lower than the performance of code specifically optimized for Intel GPUs * How it's different from AMD HIP or Intel DPC++ Compatibility toolkit? Both are porting toolkits which require programmer's effort to port applications to the API in question. With ZLUDA existing applications "just work" on an Intel GPU (if you are lucky and ZLUDA supports the particular subset of CUDA) * Which Intel GPU are supported? Intel Gen9 and newer (Skylake and newer) which are supported by Intel Level 0 * Does ZLUDA support AMD GPUs? Certainly not currently, but it might be technically possible Usage Warning: this is a very incomplete proof of concept. It's probably not going to work with your application. ZLUDA currently works only with applications which use CUDA Driver API or statically-linked CUDA Runtime API - dynamically-linked CUDA Runtime API is not supported at all Windows You should have the most recent Intel GPU drivers installed. Run your application like this: \zluda_with.exe -- Linux You should install most recent run-time driver packages as outlined here: https://dgpu-docs.intel.com/installation-guides/index.html. Run your application like this: LD_LIBRARY_PATH= Building You should have a relatively recent version of Rust installed, then you just do: cargo build --release in the main directory of the project. Linux You should install most recent run-time an developer driver packages as outlined here: https://dgpu-docs.intel.com/installation-guides/ index.html. Additionally, you should have ocl-icd-opencl-dev (or equivalent) installed. If you are building on Linux you must also symlink (or rename) the ZLUDA output binaries after ZLUDA build finishes: ln -s libnvcuda.so target/release/libcuda.so ln -s libcuda.so target/release/libcuda.so.1 Contributing If you want to develop ZLUDA itself, read CONTRIBUTING.md, it contains instructions how to set up dependencies and run tests 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 About CUDA on Intel GPUs Topics rust cuda intel-gpu Resources Readme License Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT Stars 1.4k stars Watchers 43 watching Forks 84 forks Report repository Releases 2 Version 2 Latest Feb 22, 2021 + 1 release Contributors 4 * @vosen vosen Andrzej Janik * @take-cheeze take-cheeze Takeshi Watanabe * @ritschwumm ritschwumm * @nilsmartel nilsmartel Nils Martel Languages * C++ 66.5% * Rust 28.7% * Makefile 3.0% * Assembly 1.2% * C 0.5% * Python 0.1% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.