• About
    • Learn More
    • Highlights
    • Features
    • News
    • FAQ
  • Project
    • Sourcecode
    • Releases
    • Milestones
  • Documentation
  • Discord
  • Get Started

Documentation

Primers
  • Setting Up ILGPU
  • A GPU Is Not A CPU
  • Memory & Bandwidth Threads
Beginner
  • Context & Accelerators
  • MemoryBuffers & ArrayViews
  • Kernels & Simple Programs
  • Structs
Advanced
  • Memory Buffers & Views
  • Kernels
  • Shared Memory
  • Math Functions
  • Dynamically Specialized Kernels
  • Debugging & Profiling
  • Inside ILGPU
Upgrade Guides
  • v0.8.X to v0.9.X
  • v0.8.0 to v0.8.1
  • v0.7.X to v0.8.X
  • v0.6.X to v0.7.X
  • v0.3.X to v0.5.X
  • v0.1.X to v0.2.X
  1. Home
  2. Setting Up ILGPU

Setting Up ILGPU

What is ILGPU

ILGPU provides an interface for programming GPUs that uses a sane programming language, C#. ILGPU takes your normal C# code (perhaps with a few small changes) and transforms it into either OpenCL or PTX (think CUDA assembly). This combines all the power, flexibility, and performance of CUDA / OpenCL with the ease of use of C#.

Setting up ILGPU.

This tutorial is a little different now because we are going to be looking at the ILGPU 1.0.0.

ILGPU should work on any 64-bit platform that .Net supports. I have even used it on the inexpensive nvidia jetson nano with pretty decent cuda performance.

Technically ILGPU supports F# but I don’t use F# enough to really tutorialize it. I will be sticking to C# in these tutorials.

High level setup steps.

If enough people care I can record a short video of this process, but I expect this will be enough for most programmers.

  1. Install the most recent .Net SDK for your chosen platform.
  2. Create a new C# project. dotnet new console
  3. Add the ILGPU package dotnet add package ILGPU
  4. ??????
  5. Profit

More Info

If you would like more info about GPGPU I would recommend the following resources.

  • The Cuda docs / OpenCL docs
  • An Introduction to CUDA Programming - 5min
  • Introduction to GPU Architecture and Programming Models - 2h 14min

Help us make these docs great!

All ILGPU docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

© Copyright ILGPU. All Rights Reserved.