ILGPU JIT Compiler for high-performance .Net GPU programs
ILGPU is a JIT (just-in-time) compiler for high-performance GPU programs written in .Net-based languages. ILGPU is entirely written in C# without any native dependencies. It offers the flexibility and the convenience of C++ AMP on the one hand and the high performance of Cuda programs on the other hand. Functions in the scope of kernels do not have to be annotated (default C# functions) and are allowed to work on value types. All kernels (including all hardware features like shared memory and atomics) can be executed and debugged on the CPU using the integrated multi-threaded CPU accelerator.
Real-world applications typically require a standard library and a set of standard algorithms that "simply work". The ILGPU Algorithms library meets these requirements by offering a set of auxiliary functions and high-level algorithms (e.g. sorting or prefix sum). All algorithms can be run on all supported accelerator types. The CPU accelerator support is especially useful for kernel debugging.
The sample projects demonstrate the basic usage of ILGPU to help you get started with high performance GPU programming.
ILGPU requires Visual Studio 2019 (Community edition or higher).
Use the provided Visual Studio solution to build the ILGPU libs in the desired configurations (Debug/Release).
Sometimes the XUnit test runner stops execution when all tests are run in parallel. This is not a problem related to the internal tests, but a known XUnit/Visual Studio problem. If the tests stop unexpectedly, you can simply run the remaining tests again to continue working.
Note: You can unload ILGPU.Tests.Cuda (for example) if you do not have a Cuda-capable device to execute the Cuda test cases.
Preview/Daily builds are distributed using https://feedz.io/. To pull preview versions into your project, use the following NuGet.config file:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="ilgpu" value="https://f.feedz.io/ilgpu/preview/nuget/index.json" /> </packageSources> </configuration>
Symbols for ILGPU can be loaded in VS2019.
For official releases, ensure that the built-in
NuGet.org Symbol Server is enabled. For preview release symbols, add the link:
ILGPU also provides Source Link support for a better debugging experience. Make sure
Enable Source Link support is activated in VS2019 options.
ILGPU is licensed under the University of Illinois/NCSA Open Source License. Detailed license information can be found in LICENSE.txt.
Copyright (c) 2016-2020 Marcel Koester (www.ilgpu.net). All rights reserved.
Different parts of ILGPU require different third-party libraries.
Detailed copyright and license information of these dependencies can be found in LICENSE-3RD-PARTY.txt.