pytorch - 💡(How to fix) Fix Windows Application Control (WDAC) blocks loading unsigned torch DLL [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#182008Fetched 2026-05-01 05:32:52
View on GitHub
Comments
3
Participants
2
Timeline
54
Reactions
1
Author
Participants
Timeline (top)
mentioned ×22subscribed ×22labeled ×6commented ×3

Error Message

When we import torch in our application that embeds Python, we sometimes see the following error: [WinError 4551] An Application Control policy has blocked this file. Error loading "<Redacted>\Python311\site-packages\torch\lib\torch.dll" or one of its dependencies.

RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

When we import torch in our application that embeds Python, we sometimes see the following error:

[WinError 4551] An Application Control policy has blocked this file. Error loading "<Redacted>\Python311\site-packages\torch\lib\torch.dll" or one of its dependencies.

This dll file does not have a signature. Would it be possible to start signing these dll files, such that Windows will consistently trust them?

Versions

torch==2.4.1+cu118, sourced from https://download.pytorch.org/whl/cu118

cc @seemethere @malfet @atalman @tinglvv @nWEIdia @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex

extent analysis

TL;DR

Signing the torch.dll file or its dependencies may resolve the Windows Application Control policy blockage.

Guidance

  • Investigate the specific dependencies of torch.dll to identify which ones lack a signature, as the error message indicates it could be one of its dependencies causing the issue.
  • Consider reaching out to the PyTorch team or maintainers to request signed versions of the DLLs, as suggested in the issue.
  • If possible, test the application in an environment with less restrictive Application Control policies to verify if the issue is indeed related to the policy blockage.
  • Review Windows documentation on Application Control policies to understand how to configure or exempt specific DLLs from these policies as a potential workaround.

Notes

The solution depends on the ability to either obtain signed versions of the DLLs or configure the Windows environment to trust unsigned DLLs, which may have security implications.

Recommendation

Apply a workaround by configuring Windows to exempt the specific torch.dll and its dependencies from Application Control policies, as obtaining signed versions may not be immediately feasible.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING