previously I had cuda 12.8 and I uninstalled it, then I wanted to install cuda version 12.6, and when I checked nvcc --version it detected cuda 12.6, but when i check nvidia-smi, there detected cuda 12.8, does it have a solution? or it’s okay ?
From a previous mini rant:
Good grief, how many times till Nvidia listen and at least think about the wording of Cuda Version: xx.x in nvidia-smi. For better or worse lots of people seem to think this indicates the Cuda version they HAVE and not (as I believe - forgive me if I have it wrong) the maximum version this driver would support. Over the years this has caused lots of problems with unscrambling installation issues. Please consider it. Thanks.
In this instance it is saying the installed driver is ok for Cuda versions including 12.8 (I am not sure whether there would be a range of versions with a minimum).
Yes, as @ss_various_email also said, this simply means that your CUDA Driver version supports CUDA toolkit versions up to and including12.8.
So you can safely use CUDA Toolkit12.6 with this driver.
Here’s more about Driver and Toolkit compatibility 1. Why CUDA Compatibility — CUDA Compatibility