Error loading "\lib\site-packages\torch\lib\shm.dll" or one of its dependencie

I had the same issue (Windows 11 Pro, Cuda 12.4, Python 3.11.9)
I was using torch==2.4.1+cu124, torchvision==0.19.1+cu124, torchaudio==2.4.1+cu124.

Going back to torch==2.4.0+cu124, torchvision==0.19.0+cu124, torchaudio==2.4.0+cu124 fixed this for me. Install with:
“pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124
Looking in indexes: https://download.pytorch.org/whl/cu124

1 Like

ok i have had encountering similar errors. after trying different versions of torch, the follow works:

windows 11 / i9-14900HX / RTX4070
numpy 1.24
torch 2.2.2
torchvision 0.17.2
torchaudio 2.2.2
cuda 12.1