Cubin Module

Hello to all,
can somebody to explain me how to compile a *.cu file to create a cubin module to call in some application?
I need a simple and trivial example i Visual Studio 2008
Maybe a skeleton structure project…in a zip file…
Thanks to all for helping me, ahead :-)

Hello Guido,

If you only have a single .CU file, you may call something like
nvcc -cubin inputFile.CU -o outputFile.CUBIN

Alternatively, you may add the parameter
-keep=1
to an existing NVCC command line, which will keep the intermediate files, among which is the CUBIN file

You may also want to have a look at the SDK Samples in Visual Studio: Under
Project -> Properties
there should be a point “CUDA build rule”, which contains an item “Preprocessor”. There you can select “Keep preprocessed files”, which effectively adds the “keep=1” parameter to the command line.

bye

Hello Guido,

If you only have a single .CU file, you may call something like
nvcc -cubin inputFile.CU -o outputFile.CUBIN

Alternatively, you may add the parameter
-keep=1
to an existing NVCC command line, which will keep the intermediate files, among which is the CUBIN file

You may also want to have a look at the SDK Samples in Visual Studio: Under
Project -> Properties
there should be a point “CUDA build rule”, which contains an item “Preprocessor”. There you can select “Keep preprocessed files”, which effectively adds the “keep=1” parameter to the command line.

bye

Hi Marco,
are you italian?

Can You post a simple example that I can reuse? A zip file containing a simple project in Visual studio 2008, like sum of two array or number?
A trivial sample…
Thanks!! :-)

Hi Marco,
are you italian?

Can You post a simple example that I can reuse? A zip file containing a simple project in Visual studio 2008, like sum of two array or number?
A trivial sample…
Thanks!! :-)

Hello Guido,

No, I’m not Italian.

Attached you will find a minimum(!) project which basically is the vectorAddDrv example from the SDK, simplified so that it does not use the CUTILs, and condensed to 4 files. It creates a CUBIN during the compilation, and the cubin file is loaded in the program during execution. (This is not very pretty the way it is, but may serve as a starting point…)

bye

vectorAddDrv.zip (7.09 KB)

Hello Guido,

No, I’m not Italian.

Attached you will find a minimum(!) project which basically is the vectorAddDrv example from the SDK, simplified so that it does not use the CUTILs, and condensed to 4 files. It creates a CUBIN during the compilation, and the cubin file is loaded in the program during execution. (This is not very pretty the way it is, but may serve as a starting point…)

bye

Ah…Marco is an italian man…it seemed to me that you were Italian…
However, you are a gentleman! A GREAT MAN!! :-)
It is exactly what I needed …
thanks thanks thanks really! :-)

Ah…Marco is an italian man…it seemed to me that you were Italian…
However, you are a gentleman! A GREAT MAN!! :-)
It is exactly what I needed …
thanks thanks thanks really! :-)

ehm…I wanted to say “Marco is an italian NAME”! :-P…

ehm…I wanted to say “Marco is an italian NAME”! :-P…