I’m new to both mac and CUDA :blink: , so I have a beginner’s question: If I have written a .cu file, which I copied from some beginner’s sample online, how could I compile it to an executable file with nvcc and gcc?
Please show me the detail instructions, Thx :rolleyes:
I did that by the toolkit reference successfully, but I am still curious about how could we compile .cu file without using makefile, do anyone know how to do that?
I found that by default, nvcc doesn’t put the binary in the current directory. I’m not sure where it goes, but if I include the -o option when I call nvcc, I get my binary, as expected. So for me, in bash, my command might be, “nvcc testprog.cu -o mybin”, then to run, just “./mybin”.