thanks a lot for your quick answer. it works now
What was the issue before since you’ve tried several things?
In the end i had to restart my laptop and after rebooting and reopen visual studio code the cuda appears. I can’r really say what solves the issue as I really tried several thinks like reinstalling torch, removing cuda toolkit etc.
most likely the command with parameters --upgrade --force-reinstall solved the issue plus restarting the entire system
I too had this problem and uninstalling torch, and re-installing with the aforementioned commend solved the problem and the cuda is working and the system’s using gpu