I am working on writing OpenCL programs running on a MacBook Pro with built-in Nvidia GPU. I know that OpenCL kernels can run on the CPU, or the integrated Intel GPU. But if I want to configure it to run on the Nvidia GPU, do I need to install CUDA and other Nvidia stuff? Thanks!
No, you do not. OpenCL and Metal will run automatically on the Nvidia GPU. If you want to take advantage of Nvidia's CUDA architecture (which I highly recommend for software that takes advantage of it, like the Adobe CC suite), you need to install the CUDA driver. You do not need to install the Nvidia web driver because your machine has a built-in Nvidia card (the driver is built-in to MacOS).
If you want to use CUDA on High Sierra, you may well have to install both CUDA and the nVidia Web Drivers. On older versions of MacOS you only need to install CUDA. Apple rewrote the DisplayServer to use Metal for High Sierra, which is possibly the cause.
(I say 'may well', because this has certainly been my experience on a 2013 rMBP with a GT650M).