Downgraded performance after upgraded to Windows 11

I had my machine learning model working perfectly on Windows 10.
When I upgraded to Windows 11, the model became too slow even though Cuda is present. I have not changed anything in the code…

I reinstalled Cuda and Pytorch again! Cuda version is cuda_11.7 (installed for Windows 11) and Pytorch is installed via the official command: “conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia”
Have I missed anything?! Where might be the issue?

You would need to profile the code e.g. via Nsight Systems to narrow down where the bottleneck is. Since apparently nothing changed besides the Windows version it’s hard to even speculate what might be causing the slowdown.

Thank you for your reply

I have found the problem in another part of the code, in the “DataLoader(…num_workers=12)”. Wrongly setting the “num_workers” caused the delay, not Pytorch setup as I expected.

Sorry, and thank you for your time.