Can I crunch numbers on my GPU from .NET? - Yes you can, and it's easy!
summary
Shows how to run GPU kernels from pure .NET using ILGPU NuGet to JIT‑transpile C# kernels to CUDA/OpenCL, allocate a 2D accelerator buffer, launch with a generated delegate and call accelerator.Synchronize, then copy results back. Implements a Mandelbrot renderer in “few lines” of kernel code and moves ~100 million iterations per frame (millions of pixels × 100 iterations) off the CPU, dropping a half‑second CPU render to interactive GPU zoom speeds. All parts compile, run and produce the expected colored images.
AI-written summary · about
chapters (6)
- 0:00ILGPU and GPU computing
- 1:26ILGPU accessibility
- 6:01Mandelbrot set CPU
- 9:58GPU with ILGPU
- 13:57Performance comparison demo
- 15:23Conclusion next steps
related talks
29mBeyond CUDA: GPU Accelerated Computing on Cross-Vendor Graphics Cards with Vulk...
01h 29mGPU development with Python 101
48mGPU Programming in Pure Python
53mIntroduction to C++ AMP (GPGPU Computing)
02h 55mGPU Accelerated Python w: CUDA
32mCyfra: Scala on GPU
27mVendor-Neutral GPU Programming in Chapel
50mFrom Magic to Mechanics: Demystifying GPU Programming
