I’ve had the same problem. In my case, every time I ran a cuda binary from /Developer/GPU Computing/C/bin/darwin/release the error was “cudaSafeCall() Runtime API error 38: no CUDA-capable device is detected”.
This occur because the kernel extension CUDA.kext (located at /System/Library/Extensions/) isn’t autoloaded at system startup. In fact, after a manual load of this extension (with the command kextload /System/Library/Extensions/CUDA.kext) all works well.
To solve, first of all make sure all is well installed, so read the getting started guide for mac, and follow strictly those steps.
I have uninstall everything, and then reinstall all following the steps explained into the guide.
Then, after the installation, all seems to work, because the CUDA.kext extension is load (as written into the guide, doing kextstat | grep -i cuda you could see the extension right loaded).
But, after a reboot, the system doesn’t autoload CUDA.ext (in fact, doing again kextstat | grep -i cuda you couldn’t see nothing).
To solve it:
First, create a .plist file like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
and save it to /System/Library/LaunchDaemons/ (I think you could use /Library/LaunchDaemons/ instead, but even CUDA.kext is in /System/Library/, so I use /System/Library/LaunchDaemons/).
Make sure it has the right privilege, doing
sudo chown 0:0 /System/Library/LaunchDaemons/[filename]
(in my case, sudo chown 0:0 /System/Library/LaunchDaemons/com.nvidia.cuda.launchd.plist) (this .plist file specifies how to load CUDA.kext at login).
After all, to enable the daemons who will load CUDA.kext, use launchctl:
sudo launchctl load -w /System/Library/LaunchDaemons/com.nvidia.cuda.launchd.plist
And, now all works well for me!
(EDITED to write right step)