How to compile Cuda code for execution in Matlab


I just don’t know what I should do to compile mu cuda code *.cu into MATLAB I asked the MATLAB forum but they don’t give me any anser and when I contact the technical department they said they don’t support studentes question.It is really kinlling me to read many many people soultion and don’t fix my problem


I hope I find my answer here


filename = '';

cuFile = [filename '.cu'];

ptxFile = [filename '.' parallel.gpu.ptxext]


system(['nvcc -ptx ' cuFile  ' -o ' ptxFile]);

This is my code

here is the reult 


ptxFile =

nvcc fatal   : Cannot find compiler 'cl.exe' in PATH 


I have

C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.1

I have Visual Studio 10.0

nvcc fatal : Visual Studio configuration file ‘vsvars32.bat’ could not be found for installation at ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\bin/…/…/…’

where can I find this ‘vsvars32.bat’ then where do I have to put it :turned: :blink:

if there is any comand that I can just write in command window matlab and install all nvcc problem as I undrestand from some topic please provide me

Thank you all

Mocha, I feel your pain. Shoot me an email and we’ll figure out how to get you the Jacket SDK to make life easier for you.


Thank about your efoort just want to know how can I find this file

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64>nvcc
nvcc fatal : Visual Studio configuration file ‘vsvars32.bat’ could not be foun
d for installation at ‘./…/…/…’

do I need to have Microsoft Visual Studio to run JAKET too I hate configration and setup :wallbash:

Yes, you do need MSVS with the Jacket SDK for compiling. But it is fully documented here:

now I got this

EDU>> ginfo
Jacket v2.1 (build c76104b) by AccelerEyes (32-bit Windows)
License Type: Designated Computer (C:\Program Files\AccelerEyes\Jacket\engine\jlicense.dat)
License expires in 5 days.
Addons: MGL16, JMC, SDK, DLA, SLA
CUDA toolkit 4.1, driver 296.10
GPU1 GeForce GT 525M, 2048 MB, Compute 2.1 (single,double)
Display Device: GPU1 GeForce GT 525M
Memory Usage: 1958 MB free (2048 MB total)

I want to see how to compile cuda code which compile I have to use …if there is a viedo to show this step by step that would be great.

To clarify on my earlier statement, you only need a “Visual C++ Runtime” to run Jacket, which is usually present in most Windows Operating Systems, and can be installed in a few seconds. To use the Jacket SDK, you do need the Visual Studio environment, as the Jacket SDK needs a compiler.

A video that gives a basic introduction to the Jacket SDK can be found at:

Please make sure the system requirements for Jacket SDK are met, as given at:

Instructions to compile and run Jacket SDK code are given at: