CUDAfy .NET

CUDAfy is a set of libraries and tools that permit general purpose programming of NVIDIA CUDA Graphics Processing Units (GPUs) completely from within the Microsoft .NET framework.  The aim is to create the leading tools for this task; combining flexibility, performance and ease of use.

The CUDAfy SDK comprises the following:

    • CUDAfy Library (GPGPU Extensions)
    • CUDAfy Translator (.NET to CUDA C)
    • CUDAfy Host Library (Interact with GPU from Host App)
    • CUDAfy Math Library (FFT, RAND, SPARSE, BLAS)
    • CUDAfy Module Viewer GUI
    • CUDAfy Command Line Tool (V1.6)


CUDAfy Library

The base CUDAfy library provides GPGPU specific classes.  These are essentially an object orientated .NET means of approaching CUDA.  Key components are the GThread and CudafyModule classes and the Cudafy attribute.  GThread is used to identify the thread, block and grid IDs of parallel code running on the GPU as well as give access to the various different memory types GPUs have (e.g. shared , global, etc).  The Cudafy attribute is placed on methods, structures and constants that will be running on the GPU.  CudafyModules contain generated GPU code and other information to allow easy use from the CUDAfy host classes.

CUDAfy Translator
Using SharpDevelop’s decompiler ILSpy as basis the translator converts .NET code to CUDA C.

CUDAfy Host Library
The host library permits easy interaction between host and GPU code. CudafyModules can be loaded, data can be allocated on GPU and transferred between host and GPU, and GPU functions can be launched. Allocated data is tracked by the GPU class and pointers to data are standard .NET arrays. Furthermore emulation of GPU code is fully supported meaning that the power of the .NET debugger is available.

CUDAfy Math Library
This is a .NET wrapper around the NVIDIA CURAND (Host and Kernel), CUBLAS, CUSPARSE and CUFFT libraries – Random, Basic Linear Algebra, Sparse Matrix and Fourier Transform.

CUDAfy Module Viewer
Examine *.cdfy modules and modify generated CUDA C source code and retarget for a different architecture.

CUDAfy Command Line Tool
From the command line cudafy .NET dlls and exes and place the *.cdfy xml module into the resources of the original assembly. No need to redistribute *.cdfy files or have CUDA SDK on target machine.