CUDA&MATLAB

Does a Matlab CUDA Toolbox exist? Where I can find it?
There are some CUDA-Mexfile examples avalaible on the web?

www.accelereyes.com

THey have Jacket and a toolbox for Matlab

Thanks alot, but I need to use CUDA-Enabled mex files, not the jacket engine

[url=“Game Development Tools, SDKs, and Partner Engines | NVIDIA Developer”]http://developer.nvidia.com/object/matlab_cuda.html[/url]

[url=“File Exchange - MATLAB Central”]http://www.mathworks.com/matlabcentral/fil...ag%3A"cuda"[/url]

Does anyone have a successfull experience on writing and compiling cuda mex files under MS VS 2008? I have at least two problems:

  1. When I have 2 files (cudamex.cu and cudakernels.cu) I can’t link it, because linker outputs that all my functions in cudakernels.cu allready declared in cudamex.obj
  2. If I make a single file, it compiles and linkes but after running in matlab error arises that mex-file can’t find some module. Using Dependency Walker, I’ve found that the missing file is msvcr90.dll. Putting this file in the folder with mex-file didn’t help, matlab reports thar dll init failed.

on number 1. : You probably include “cudakernels.cu” in cudamex.cu ?

Yes, but this code successfully compiles and then runs from matlab.

Thus if I type “nvmex -g -f nvmexopts.bat cudamex.cu -I’C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\inc’ -LC:\cuda\lib -lcudart” and then run cudamex, everything fine. But if I compile from VS, I have mentioned problems.

I’ll be investigating how to compile a mex file from within VS in the next week, as I am splitting up a very big mex file with lots of kernels into seperate compilation units. I think I will then need to compile from within VS (I will also try to see if I can get cmake to do it for me, as I also run linux). If I find anything I’ll post it here.

I think I’ve found solution. File cudakernels.cu shuld be excluded from build, but should be included in Project properties->Cuda build rule->General->Source dependences. Also manifest generation should be enabled.

This thread may also be of interest:
[url=“http://forums.nvidia.com/index.php?showtopic=66961”]http://forums.nvidia.com/index.php?showtopic=66961[/url]