Cuda with different Ubuntu Versions

I did a series of tests with different versions of ubuntu

I considered ubuntu 8.04, 9.04, 9.10, and Cuda versions 2.1, 2.3 and 3.1 with the appropriate nVidia drivers (180, 190 and 256) respectively.

    Everything worked fine with the corresponding OS. (2.1 with nVidia 180 in 8.04, 2.3 with 190 in 9.04 and 3.1 with 256 in 9.10). nVidia 256 had some issues with 8.04. So i installed nVidia 260 in 8.04 to install cuda 3.1
    Higher versions of cuda worked in lower versions of Ubuntu with the appropriate drivers.
    Lower versions of cuda didnt work in higher versions of Ubuntu. But I could make it work after tweaking the config in cuda related with gcc.

Now my doubt

Is it

( a ) Like a particular cuda version required a minimum version of nVidia driver and supports a maximum version of gcc( Like cuda 3.1 requires atleast nVidia 256 and will not support gcc more than the version shipped with ubuntu 9.10) and is not dependent on the Ubuntu version

OR

( b ) Always recommended to use the appropriate cuda release for a particular Ubuntu version. (like use cuda 3.1 with nVidia 256 in Ubuntu 9.10 and cuda 2.1 with nVidia 180 in ubuntu 8.04)??

I assumed it to be ( a ). Which one is actually correct or am i totally wrong ?

Thanks

I did a series of tests with different versions of ubuntu

I considered ubuntu 8.04, 9.04, 9.10, and Cuda versions 2.1, 2.3 and 3.1 with the appropriate nVidia drivers (180, 190 and 256) respectively.

    Everything worked fine with the corresponding OS. (2.1 with nVidia 180 in 8.04, 2.3 with 190 in 9.04 and 3.1 with 256 in 9.10). nVidia 256 had some issues with 8.04. So i installed nVidia 260 in 8.04 to install cuda 3.1
    Higher versions of cuda worked in lower versions of Ubuntu with the appropriate drivers.
    Lower versions of cuda didnt work in higher versions of Ubuntu. But I could make it work after tweaking the config in cuda related with gcc.

Now my doubt

Is it

( a ) Like a particular cuda version required a minimum version of nVidia driver and supports a maximum version of gcc( Like cuda 3.1 requires atleast nVidia 256 and will not support gcc more than the version shipped with ubuntu 9.10) and is not dependent on the Ubuntu version

OR

( b ) Always recommended to use the appropriate cuda release for a particular Ubuntu version. (like use cuda 3.1 with nVidia 256 in Ubuntu 9.10 and cuda 2.1 with nVidia 180 in ubuntu 8.04)??

I assumed it to be ( a ). Which one is actually correct or am i totally wrong ?

Thanks

Both, but (a) is more important.

CUDA works only if it has appropriate driver version - e.g. CUDA 3.2 does not work with 256.x. This is answer (a)

At the same time, CUDA and NVIDIA drivers are installed in particular system, with particular versions of libraries, etc.

CUDA and drivers are binary-only (small simplification) and they were compiled using particular compiler and libraries.

This means that as long as libraries and binary formats do not change much, CUDA should work with future versions of system. For example I am currently using CUDA 3.1 (intended for Ubuntu 9.10) on Debian unstable, which is more like Ubuntu 10.10.

Binary compatibility is described as ABI - Application Binary Interface. API describes names of functions, types of parameters, their order, etc. ABI describes size of structures, padding, order of fields in structure, mangling of names of methods, etc. As long as ABI is stable (which is not always the case for Linux kernel), your answer (a) applies. Distributions try to keep ABI stable - if it changes, it requires recompilation of large parts of programs in distribution.

I hope I answered your question - if not (or if I was not clear) let me know.

Both, but (a) is more important.

CUDA works only if it has appropriate driver version - e.g. CUDA 3.2 does not work with 256.x. This is answer (a)

At the same time, CUDA and NVIDIA drivers are installed in particular system, with particular versions of libraries, etc.

CUDA and drivers are binary-only (small simplification) and they were compiled using particular compiler and libraries.

This means that as long as libraries and binary formats do not change much, CUDA should work with future versions of system. For example I am currently using CUDA 3.1 (intended for Ubuntu 9.10) on Debian unstable, which is more like Ubuntu 10.10.

Binary compatibility is described as ABI - Application Binary Interface. API describes names of functions, types of parameters, their order, etc. ABI describes size of structures, padding, order of fields in structure, mangling of names of methods, etc. As long as ABI is stable (which is not always the case for Linux kernel), your answer (a) applies. Distributions try to keep ABI stable - if it changes, it requires recompilation of large parts of programs in distribution.

I hope I answered your question - if not (or if I was not clear) let me know.

Thank you :) That made things clear …

Thank you :) That made things clear …