Distributing CUDA enabled applications on Mac OS X

How can I distribute my driver-API CUDA program so that the end user can directly run it on a clean install of OS X?

From testing, it seems like the user has to install the developer drivers first. This is far from ideal in my opinion, and I would prefer if there was a way to bundle everything in my application. Specially since downloading the developer drivers is more convoluted than it should be, there isn’t even a permanent URL I could direct the user to that would still be valid after CUDA version changes.

Anyone have any ideas?

How can I distribute my driver-API CUDA program so that the end user can directly run it on a clean install of OS X?

From testing, it seems like the user has to install the developer drivers first. This is far from ideal in my opinion, and I would prefer if there was a way to bundle everything in my application. Specially since downloading the developer drivers is more convoluted than it should be, there isn’t even a permanent URL I could direct the user to that would still be valid after CUDA version changes.

Anyone have any ideas?

Port your CUDA program to OpenCL, which is natively supported on OS X. And since you already use the driver API, that should not be too difficult.

Port your CUDA program to OpenCL, which is natively supported on OS X. And since you already use the driver API, that should not be too difficult.

OpenCL on Mac OS X (and other platforms too) is lagging far behind CUDA on many features, as well on performances.
It is clearly not a olution at this time, compared to CUDA-optimized code.

I’ve been looking into this a bit. I tried to include the CUDA runtime libs in the application bundle, but that didn’t work. The error was weird, it claimed that I had the wrong version of the runtime - with the same libraries that works on my development installation! It seems CUDA makes some kind of check for its files, thereby requiring (part of?) a developer installation.

What parts of the CUDA installation are used when running a CUDA program? Runtime libraries of course. More? Driver, I suppose, but I don’t know how drivers are installed in OSX. Anyone who knows?

If you use the Runtime API (driver API-only apps can skip this), you should always distribute the CUDA Runtime with your application, ideally by internalizing the the runtime dylib as a private dylib inside your application bundle’s Frameworks directory.

http://developer.apple.com/library/mac/#documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW19

Any other CUDA toolkit libraries your app uses should be similarly internalized. Make sure that the runtime version is as new or newer than the libraries, or you will get an API version mismatch problem.

To use CUDA, the user will need to download and install the latest CUDA driver version. This page seems like a reasonable place to find the latest driver download.