Nsight system problem

“CUDA driver version on the target (12.7) is not supported by this build of Nsight Systems.
CUDA trace will be collected using libraries for older driver version but some features might be missing or work incorrectly.
Check for updates to see if there is a newer version available.
Tracing CUDA graphs launched from device codes may significantly increase runtime overhead.”
How can I slove this problem. the cuda version I installation is 11.8. Using nvidia-smi commend shows the cuda version: 12.7.

It sounds like you have multiple versions of CUDA installed on your system, and somehow when you are running Nsys you are winding up with the old Nsys and the new CUDA version.

I would say either force the use of the Nsys that is installed in the CUDA 12.7 or install the latest and greatest from the web. Either of those versions should work, even if you somehow pick up the 11.8 CUDA library.