Binary Size once code is build

Hi,

So I wrote a simple program where I perform addition on elements of 2 arrays on GPU. Once I build the project, I found my executable size as 114KB and the same code without CUDA when build has executable size as 8KB. Is there any way to reduce executables size?

reduce or minimize the number of GPU architecture options you specify when compiling

compile using a dynamic cudart link instead of a static cudart link

both of these are covered in the nvcc manual

https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html

Since you’ve provided no information about any of this, you may already be doing these things, I have no idea. 114KB is already a small size for a CUDA executable in my experience

I am using visual studio 2012 to build the project.

So the settings are same as you have suggested and still the same size. My concern is basically, in case of a basic code if the size generated is 114KB. Hence for a large project, executable the size would grow more.