Can CUDA operate with open source Nvidia driver or only with Nvidia proprietary driver?

I am using Ubuntu 16.04. This website [url][/url] mentioned that ubuntu users can now have a simpler way to update it nvidia graphic driver via ppa due to [url][/url]. This is great.

However, i came across this answer from stackoverflow [url][/url] that mentioned that proprietary nvidia driver is still needed when CUDA is required.

Can someone advice me whether CUDA can operate with both open source Nvidia driver and Nvidia proprietary driver, or only with Nvidia proprietary driver? I am currently using nvidia driver 375.39.

CUDA works with proprietary only. It’s a bare-metal framework so it’s going to use the hardware as close as possible vs an abstraction layer. This is why it performs better with the proprietary driver and better than open-cl.

@thedocwarren Clarification. Is open-cl equivalent to open source? If so, then your last sentence contradict your 1st sent sentence. That is, the word “better” will mean it still works with open source version but better. Are you certain or is your reply based on information from other sources. If the latter, can you direct me to your source of information?

I just managed to install CUDA on Ubuntu 16.01 and was able to compile and run one of the NVidia sample (./nbody). My installed NVidia graphic driver is 375.39 (open source). This result shows that CUDA can operate on open source NVidia driver.

Therefore, the statement that CUDA works only with NVidia proprietary graphic driver is incorrect.

I guess my next question is whether I should expect any performance difference between using proprietary and open source NVidea driver with CUDA. I am thinking there should not be. Can any knowledgeable person answer this?

You misunderstand. There is no such thing as an open source NVIDIA driver. 375.39 is our proprietary driver, packaged by your distribution, but that doesn’t make it open source.
There is an open source driver managed by a group of developers that are unrelated to NVIDIA, called Nouveau, and that driver doesn’t support Cuda.

Cuda only works with the proprietary driver, but that is the driver you have installed.

at least according to phoronix in 2015 there was some developer from Nvidia who had started working on CUDA support for Nouveau, not anymore…or was this false news?

@ahuillet. Thanks for clarifying. Just to explained that on Ubuntu, the Additional Drivers window does have the words “(open source)” next to the NVidea drivers. Based on your explanation, I reckon this means that NV drivers that were worked on by the open source OS community/distributor before being released are labelled with (open source). NV drivers with the word (proprietary) would mean the graphic driver directly supplied by manufacturer.

Purely open source graphic driver would be those without NV’s label on it, like Nouveau.