I found this problem too and it happened when I wanted to download Torch again with a new version of torch. I was using some custom Cuda extensions with torch which had some custom setup installation with a setup.py.
After upgrading torch and the Cuda version, I couldn't import this extension with the error:\
"OSError: libtorch_cuda.so: cannot open shared object file: No such
file or directory
( I got some strange error like "cannot found libcudart.so.11" even though I was using pytorch with Cuda 12) \
By default, the setup.py advised by pytorch doesn't rebuild the cuda extension if the extension is already built even if the cuda compiler version of torch changed.\
So you should try to remove the build,.egg-info, and dist* folder of your extension and run its setup installation again and see if the error disappears.