In my OS X build (CUDA 7.5 on OS X 10.10 with Xcode 4.6) I’m linking against the static runtime libcudart_static.a and using otool I can see I’m not linking to any other CUDA dynamic libraries. However I can see when I run my app something in that static library requires a rpath of /usr/local/cuda/lib and that ends up loading /usr/local/cuda/lib/libcuda.dylib which in turn loads some more CUDA frameworks.
The section on deploment here http://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#distributing-cuda-runtime-and-libraries talks about the benefit of using the static runtime which all makes sense but if that library loads dynamic libraries that doesn’t really help. Is libcuda.dylib not considered part of the runtime? How do I deploy that and the driver on the end user’s machine?
This section on which files to redistribute http://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#redistribution–which-files I think is incorrect or out of date on the mac; using otool shows,as I said above, that I’m not linked to any CUDA shared library and that something at runtime must be using rpath to find libcuda.dylib,