Reputation: 304
I have a small project in Nvidia's Nsight, which creates the makefiles for me. I want to use some SSE instructions and would like to compile cpp-files in the project with gcc instead of nvcc.
Is there a way to configure Nsight to do that or do I have to write the Makefile manually?
EDIT: .cu file should be compiled with nvcc of course.
Upvotes: 1
Views: 1934
Reputation: 9474
You should be able to use GCC SSE instructions in the CU files - NVCC compiles all the host code with your platform compiler.
If you still would like to use GCC, you have two options:
Upvotes: 1
Reputation: 9781
To use gcc in Nsight, you have to create makefile project and write the makefile by hand.
Alternatively, uou could use nvcc to compile your .cpp/.c file. To add extra compiler options which do not recognized by nvcc (only recognized by gcc), the nvcc option -Xcompiler
should be prefixed.
One of the side-effects using nvcc is that your .cpp program will require libcudart.so to run, even it does not really need that.
Upvotes: 1