Reverting to earlier CUDA - version report stubborn


I’m trying to revert versions of CUDA from 9 to 7. The removal of 9 and install of 7 seems to have gone ok but CUDAdrv.version() is still reporting v"9.0.0".
I have Pkg.rm() twice each for CUDAdrv and CUDAnative and cleaned out any .julia/.cache and .julia/v.0.6/CUDA*, followed by Pkg.add() again, but I’m missing something since CUDAdrv.version is still echoing cuda 9. I’m guessing there is something else to be cleaned out?


CUDAdrv.version() is querying libcuda for the CUDA version, which returns the CUDA compatibility level of the kernel module. This is mostly independent from the CUDA toolkit installation (providing, eg., and also nvcc etc).
You probably still have the more recent kernel module installed or loaded.


Right. So I made a valiant attempt to go back to an earlier version using available openSUSE repos but ultimately failed since the OS refused to insert the earlier module. Rather than struggle with that issue I returned to the more advanced driver and I find I can compile a matrix multiplication from the samples using nvcc so I think for now I will stick with the odd mix of driver 9 and cuda 7. No doubt there are more surprises to come, but I can experiment until I have a better card.


One of those surprises is that CUDAnative.jl won’t work anymore. Some details: NVIDIA ships their PTX->SASS compiler both as part of the driver (where you can load a module with PTX code, as we do with CUDAnative.jl using CUDAdrv.jl), and as a part of nvcc to generate fat binaries early-on. That’s why you can use your CUDA 8 nvcc to generate SASS for sm_21, but CUDAnative.jl won’t be able to compile the sm_21 PTX to SASS (or, I hope, will refuse to do so because it knows it’ll fail).