You are here:   Support > FAQ
  |  Login

CUDAfy - Frequently Asked Questions

Can I embed Cudafy modules (*.cdfy) file in .NET assemblies?
Yes.  By running the command line tool (cudafycl.exe) targeting a dll that contains Cudafy attribute marked code, all such code will be cudafied, a module generated and then stored into the original dll.  Within your host code you can write something like:

myModule = GetType().Assembly.GetCudafyModule(); 
This saves the need to redistribute *.cdfy files alongside your executables.

Can CUDAfy be used from Visual Basic?
Yes any .NET language should suffice, however we at Hybrid DSP have not tested this ourselves.  Up to CUDAfy V1.5 you will get a Cudafy language exception saying "Checked expressions are not supported" if the Remove integer overflow checks option is not enabled in the Advanced Compile Options of the project Compile options tab. 

Is .NET Reflector required to use CUDAfy?

Not any more.  The excellent ILSpy decompiler is now used and fully embedded in Cudafy.NET.dll.

Do I need to install the NVIDIA CUDA SDK?

For development and producing the CUDAfy modules (that are used by the CUDAfy host library) the CUDA SDK is required.  This is a free download from NVIDIA.  For distributing applications it is not required to be on the target machine.  Only an up to date NVIDIA driver is needed.  If the CUDAfy math libraries are used then the relevant dlls will be needed.

Can CUDAfy work with NVIDIA Parallel NSight?

From NSight 1.5 onwards it is possible to start .NET CUDA project from NSight in Visual Studio by using a stub native cpp project  In NSight 2.0 .NET apps can be started directly.

Can I use Compute Visual Profiler?

Yes this works no problem and is recommended to identify bottlenecks in your GPU code.

Does CUDAfy really have a GPU kernel emulator?

Yes, for code that was written in .NET and conforming to the CUDAfy module standard then an emulator host interface can be instaniated instead of a GPU host interface.  You can then make full use of the Visual Studio debugger as you would with any normal .NET application.  Do realise that if there are many GPU threads in a single GPU block then performance is not exactly going to be mind blowing...  

How do I use the FFT, RAND, SPARSE and BLAS libraries?

You will either need to have the CUDA SDK installed or distribute the relevant NVIDIA libraries with your application. Remember to use either the 32-bit or 64-bit version depending which version your app will be running as.  

Can I use AMD GPUs?

From CUDAfy version 1.20 this will be possible through the OpenCL support.  The current CUDA based syntax is supported with a few exceptions.  The OpenCL means of accessing built-in IDs (thread, block, grid IDs) will also be supported for both OpenCL and CUDA targets. You will need the relevant AMD Catalyst drivers.  Another benefit is that you can also target Intel CPUs by downloading and installing the Intel OpenCL SDK.  For some applications with four or more cores quite respectable performance can be had.  Of course you can also choose to generate OpenCL and run on NVIDIA GPU if you're so inclined.