I’ve recently started to work with CUDA, and I surprised about the difficulty on finding some kind of “getting started” information about the compilation process.
Apparently, from what I take from the online material and contributions to different forums, the most general trend seems to be to adapt some makefile from the SDK.
I’m not certain about why building a makefile should be necessary. In other words: if I have a small .cu code, what is wrong about compiling it with a simple call to
nvcc -o EXECUTABLE_NAME “…/SOURCE_NAME.cu”-I/usr/local/cuda/include -lcudart -L/usr/local/cuda/lib
I guess there must be some kind of problem with this way, as my programs do work, but seem to be rather underperforming… I guess there is a minimum set of flags that I need in order to ensure adaption to the local architecture.
Any suggestion is very welcome…