Free and open source
compiler and .NET framework
for GPU programming in C#

Welcome! This is the website for Campy, a compiler and framework for running NET programs on a GPU.

Panel 1

What Campy is

Based on the ECMA standards for CLIC#, and NET Standard 2.0, Campy is the only free and open-source compiler and substituting .NET base class layer that enables GPGPU programming for NET Core and Framework applications for virtually all C#. Other compilers exist, but as far as I know, these systems do not implement a full meta data system and NET framework. These system lack support for any number of features: reference types, generics, virtual functions, new operator, collections, strings, a file system, and/or various NET frameworks. Campy supports nearly all of C#. Campy does not support exception handling as CUDA does not.

Campy is targeted for Windows 10 64-bit and Ubuntu 16.04 64-bit OSes, CUDA GPU Toolkit 9.2/10.0, Net Core 2.1, Net Framework >= 4.6.1, Net Standard 2.0, and NVIDIA GPUs with sm_30 (Kepler) or newer architecture. Campy also works with Mono 5.12.

Campy offers a unique blend of features: able to execute all C# on a GPU, except for certain OS-specific code; a small API that allows for clean and simple implementations to be developed; easy integration into an application via Nuget. Visual Studio is not required. There are no extra build steps. Just compile your program normally, and Campy will JIT at runtime. Full deployment of your app is achieved via Net Core 2.1 as a self-contained deployment.

Note, Campy is still in development. The releases are debug builds, with no emphasis on the speed of the code, mostly correctness of the results. Check out the blog for further details.

Panel 2

What Campy is not

Campy cannot parallelize an existing compiled program. You need to write C# code to call Campy.Parallel.For(), and rebuild your app. All C# data structures, and all C# language features except Exception, are accessible on the GPU. Campy is not a platform-specific API, so you cannot call CUDA, C++/AMP, or OpenCL directly. Campy is not a stand-alone compiler, although this will change at some point. Campy cannot run without a GPU, which is currently only targeted for NVIDIA GPUs. Campy is not a panacea for discharging you from understanding GPUs and GPGPU programming; you still need to understand how to program a GPU. However, there will be a plenty of examples of Campy to get you on your way.

 

 

Panel 3

What Campy can do

  • Use Campy to run Parallel.For() loop code written in C# on a GPU;
  • C# code in Parallel.For() can be virtually any C# code;
  • Develop fully functional and easy-to-understand parallel algorithms;
  • Document parallel algorithms in a platform independent language;

Learn more

Panel 4 Placeholder