vosen / ZLUDA
- вторник, 2 марта 2021 г. в 00:26:42
CUDA on Intel GPUs
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 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
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.
ZLUDA - detailed results on Geekbench.com
OpenCL - detailed results on Geekbench.com
Overall, ZLUDA is slower in GeekBench by roughly 2%.
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 performanceWarning: 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
You should have the most recent Intel GPU drivers installed.
Run your application like this:
<ZLUDA_DIRECTORY>\zluda_with.exe -- <APPLICATION> <APPLICATIONS_ARGUMENTS>
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=<ZLUDA_DIRECTORY> <APPLICATION> <APPLICATIONS_ARGUMENTS>
You should have a relatively recent version of Rust installed, then you just do:
cargo build --release
in the main directory of the project.
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
If you want to develop ZLUDA itself, read CONTRIBUTING.md, it contains instructions how to set up dependencies and run tests
This software is dual-licensed under either the Apache 2.0 license or the MIT license. See LICENSE-APACHE or LICENSE-MIT for details