If I'm not mistaken you have to specify the platform you want to use. If you pass NULL to clGetDeviceID you'll get an invalid platform error. If you choose nvidia the nvidia gpu will be used.