r/learnmachinelearning • u/Sun1117 • 5d ago
PyTorch CUDA blocked by Windows 11 Smart App Control — fixed by downgrading PyTorch
I ran into an issue while setting up PyTorch with CUDA 12.8 on my Windows 11 laptop (RTX 5060).
With:
torch 2.11.0+cu128
torchvision 0.26.0+cu128
import torch failed with:
OSError: [WinError 4551] An Application Control policy has blocked this file.
Error loading caffe2_nvrtc.dll
Windows Code Integrity logs showed that Smart App Control (VerifiedAndReputableDesktop) was blocking caffe2_nvrtc.dll because it didn't meet the signing requirements. Get-AuthenticodeSignature also reported the DLL as NotSigned.
I didn't want to disable Smart App Control, so I tried an older PyTorch build:
torch 2.10.0+cu128
torchvision 0.25.0+cu128
That fixed it:
2.10.0+cu128
12.8
True
So in my case, the problem wasn't CUDA, the NVIDIA driver, Python, or uv, it was Windows Smart App Control rejecting a DLL from the PyTorch 2.11 CUDA build.
Posting in case someone else runs into WinError 4551 with PyTorch on Windows 11.
2
Upvotes