This project is read-only.
Project Description
CUDAfy .NET allows easy development of high performance GPGPU applications completely from the Microsoft .NET framework. It's developed in C#.

Write GPU Code in .NET for NVIDIA, AMD and Intel Devices

Modern graphics cards provide the potential of massive speed increase over CPUs for non-graphics related intensive numeric operations. Many large data set operations such as matrices can see a 100x or more speed up. CUDAfy allows .NET developers to easily create complex applications that split processing cleanly between host and GPU. There are no separate CUDA cu files or complex set-up procedures to launch GPU device functions. It follows the CUDA programming model and any knowledge gained from tutorials or books on CUDA can be easily transferred to CUDAfy, only in a clean .NET fashion. CUDAfy supports both CUDA and OpenCL code generation and therefore has the ability to run the same applications on:
  • NVIDIA GPUs (CUDA or OpenCL)
  • AMD GPUs (OpenCL)
  • Intel CPUs (OpenCL)


4 April 2015: CUDAfy 1.29 and CUDA 7.0
Newest CUDAfy version supports CUDA 7.0. If you use the BLAS, FFT, RAND and SPARSE maths libraries then you will need CUDA 7.0 and CUDAfy 1.29. Note that support for x86 platform has been removed from maths libraries by NVIDIA. CUDAfy is no longer supplied with specific x86 versions of CudafyViewer and cudafycl (used for cross compilation on x64). Note also that since CUDA 7.0 no longer supports GPUs of architecture 1.x, CUDAfy default is now 2.0 (sm_20).

13 January 2015: You couldn't make this up ... CUDA 7.0 RC announced
Indeed you could not make this up ... finally CUDAfy 1.28 is released with CUDA 6.5 support and then 9 days later NVIDIA announce CUDA 7.0 RC. Well we've streamlined the build process and there appears to be an upsurge in interest in CUDAfy, so we will certainly be looking at getting CUDA 7.0 support implemented much quicker than we added 6.5. If any users would like to assist in evaluating CUDA 7.0 and discussing with us then please contact.

4 January 2015: CUDA 6.5 and Latest Compute Capability Support
Well it's here at last, version 1.28 of CUDAfy, the one that supports CUDA 6.5 maths libraries and runtime. The main issue people were having with 1.27 and CUDA 6.5 was again related to the Visual C++ compiler not being in the Environment Path. This issue was compounded by the fact that CUDA 6.5 NVIDIA compiler did not support Visual Studio 2008 and that CUDAfy was not displaying the full error message received from the NVIDIA compiler. Well the full error message is now displayed, but you'll still need to ensure CL.exe (Visual C++) is in the path. Do a search on the discussions forum to see how to do this if you don't know how. Anyway, please get stuck in with this newest release before NVIDIA launch a bunch of new compute architectures and a new version of CUDA and you need to wait half a year for us to get around to making a new release ... or not since finally we have a viable alternative to the propitiatory tool we used for merging all the DLLs into one DLL. We'd been using .NET Reactor, but the ILMerge GUI did a sterling job so we've switched to this. Unfortunately the command line use of ILMerge still did not play ball so it is not built into the build process yet. To do it manually head on over to the ILMerge GUI project on codeplex, download ILMerge, and then add the DLLs of the Cudafy.NET project, marking Cudafy.NET.dll as the primary assembly. Click Merge and then you have in the output dir the exact same Cudafy.NET.dll as you can download.

20 July 2014: CUDA 6.0 Support
Apologies for the delay. CUDA 6.0 support is now available in CUDAfy 1.27. If you are using the CUDA maths libraries (CUFFT, CUBLAS, CUSPARSE, CURAND) then you will need to use CUDA 6.0. If not then you are free to continue using CUDA 5.x. CUDA 6.5 will also work with CUDAfy 1.27 with exception of maths libraries.

7 May 2014: CUDA 6.0 Support
This will be in the upcoming CUDAfy release. Code changes will be committed today.

7 May 2014: CUDAfy at NVIDIA GTC 2014
John Hauck's presentation on Image Stitching with CUDAfy can be viewed at

25 March 2014: CUDAfy at NVIDIA GTC 2014
GTC2014 kicks off in San Jose today. At 16:00 on Thursday in room 210C John Hauck will present C# with CUDAfy: Image Stitching Concepts.

29 November 2013: CUDAfy.NET 1.26 Release
Head over to the download page and get the latest release. There is a new installer and the CUDA and OpenCL set-up tools have been incorporated into the Cudafy Module Viewer GUI. The option to start this tool is given at the end of the install procedure. Again if you have any issues then please report this! The CUDAfy community is dependent on such feedback. Also if you make any changes to source code then please get in touch - many great new features in this release such as support for classes, SIMD functions and warp shuffle have been from users. Our thanks to these guys.

15 November 2013: CUDAfy.NET Promo Video
Using Paint.NET, Sony Movie Studio, Camstudio and a great voice over from a 1 minute promotional video has been produced.

24 September 2013: CUDAfy.NET Videos
Two videos have been posted introducing CUDAfy.NET.
Installing and configuring:
CUDAfy By Example Walkthrough:

28 August 2013: CUDA 5.5 and Dynamic Parallelism Support
Last week CUDAfy 1.25 was released with CUDA 5.5 and dynamic parallelism support. The translate and compile procedure was also re-written promising a more powerful, extensible and flexible way of doing this stage. However some users are reporting issues of CUDAfy 1.22 working with CUDA 5.5 and CUDAfy 1.25 not. We've still not reproduced this or figured out what on earth is going on, but if you have some issues then PLEASE report!

15 June 2013: Portable CUDA on NVIDIA, AMD, Intel GPUs and CPUs
Article on how CUDAfy allows a single .NET assembly to run without modification on Windows, Linux, 32-bit or 64-bit. AMD, NVIDIA, Intel GPUs and CPUs. Also discussed is how CUDAfy will support embedded and mobile devices as we begin to see OpenCL appearing on the likes of the Google Nexus 10 and other ARM based products.

14 June 2013: CUDAfy.NET for Linux.
On the downloads page you can access the Linux version of CUDAfy.NET. You need to install Mono and the CUDA and/or OpenCL SDKs. Your feedback especially on the use of the maths libraries and OpenCL is essential. Thanks in advance.

07 June 2013: Take a look at the Hybrid DSP blog.
Three articles as of now:
  • Using FPGAs in data acquisition systems
  • NVIDIA – Clear as Mud – Hyper-Q and Dynamic Parallelism on Laptops (a rant on the NVIDIA marketing muddle)
  • Ethics and your GPU (should we care what the technology we develop is used for? In light of the news about NSA this is even more relevant that when I wrote it earlier in the week)

08 May 2013: CUDAfy V1.22 is the first official release with support for OpenCL
In addition to OpenCL support there are a bunch of bug fixes and other new features like integer intrinsics, code insertion, a shiny new installer tool that also tests your system configuration, and an updated user manual. The OpenCL branch that has been in use for the last few months has now been merged into the main trunk.

23 Apr 2013: Benchmarking OpenCL and CUDA using CUDAfy on GTX Titan
Article from John Michael Hauck where he tried CUDAfy on GTX Titan in both CUDA and OpenCL mode. He also compares against the .NET parallel library on a 8-core Xeon CPU. An entertained read.

16 Apr 2013: CUDAfy Installer / Config Tool
As of V1.21 Beta CUDAfy is supplied as a custom installer. The SDK is not installed as Program Files etc but is unzipped into specified location. The rest of the installer checks whether suitable GPUs are found and whether the drivers, CUDA SDK and OpenCL SDKs are present. If there are any issues then links to relevant help are given.

6 Mar 2013: If CUDAfy is useful for you please donate to this charity
We don't ask for donations for CUDAfy because we use it internally and have other sources of income. The commercial license version brings in enough to cover basic costs. So for all users of CUDAfy LGPL version please if you found it useful and it has saved you and your company or organization time and money make a donation to Harmony through Education. This charity supports handicapped kids in developing countries. The first school is in India. It's all very close to my heart and I'd like to help as much as possible. My thanks in advance.

2 Mar 2013: Beta version of CUDAfy with OpenCL support
Yes it is now finally here and on downloads page. Please give it a go and give some feedback. Maths libraries and device strings are not supported, most other stuff is.

18 Jan 2013: CUDAfy OpenCL Support - Target AMD GPUs and Intel CPUs
After a bit more testing we will merge the non-public OpenCL branch of CUDAfy back into codeplex. What will this mean? It means you can in most cases take your CUDAfy application, change the the target eGPUType enum and have the app also run on an AMD GPU or Intel CPU. No need to learn any OpenCL syntax, just stick with your knowledge of CUDA and CUDAfy.

Can you contribute?
Yes that would certainly be appreciated. Some possibilities:

Publicity: CUDA is still a niche believe it or not, and CUDAfy is a tiny niche of that niche. Articles or papers can help spread the word. More users results in more testing and less bugs; more features and higher level libraries.

Testing and feedback: report bugs and idiosyncrasies, or things that could be better or clearer. The maths libraries are being extended by contributors and also need testing due to their complexity.

Maths libraries: Suggest and add to the higher level libraries such as the maths libraries. Higher level libraries lower the hurdle to use. Take a look at some 3rd party libs such as .NET Numerics.

Investigate graphics interop such as CUDAfy to XNA or SlimDX. This is a bit of a hole in CUDAfy right now. A means of letting people display CUDA data directly without copying it back to host first would be very useful!

Texture memory is a part of CUDA that is useful in some applications. Currently (V1.11) CUDAfy does not support this - if you have CUDA experience and can propose a way of supporting this from CUDAfy then your input would be greatly appreciated.

The LGPL v2.1 License applies to CUDAfy .NET. If you wish to modify the code then changes should be re-submitted to Hybrid DSP. If you wish to incorporate Cudafy.NET into your own application instead of redistributing the dll's then please consider a commerical license. Visit This will also provide you with priority support and contribute to on-going development.

The following libraries are made use of:
The MIT license applies to ILSpy, NRefactory and ICSharpCode.Decompiler (Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop team).
Mono.Cecil also uses the MIT license (Copyright JB Evain).
CUDA.NET is a free for use license (Copyright Company for Advanced Supercomputing Solutions Ltd)

Last edited Apr 8, 2015 at 8:40 AM by NickKopp, version 40