I had been suffering from various graphics issues with the OOTB macOS drivers for my iMac with GTX780M and have now installed these new drivers + CUDA updates and seems to work pretty well so far.
http://www.nvidia.com/download/driverResults.aspx/114669/en-us
New in Release 367.15.10.35f01:
- Graphics driver updated for Mac OS X El Capitan 10.12.3 (16D32)
- Contains performance improvements and bug fixes for a wide range of applications.
- Includes NVIDIA Driver Manager preference pane.
- Includes BETA support for iMac and MacBook Pro systems with NVIDIA graphics
GeForce 600 Series:GeForce GTX 680
GeForce 200 Series:GeForce GTX 285
GeForce 100 Series:GeForce GT 120
GeForce 8 Series:GeForce 8800 GT
Quadro Series:Quadro K5000 for Mac, Quadro 4000 for Mac
Quadro FX Series:Quadro FX 4800, Quadro FX 5600