Automated testing discovered that `image::read_png` sometimes can not be initialized on Windows
See original GitHub issue🐛 Describe the bug
See https://github.com/pytorch/pytorch.github.io/runs/4042987825?check_suite_focus=true
Several Windows configuration tests of torchvision failed with No such operator image::decode_png
Versions
0.11.1
cc @peterjc123 @nbcsm @guyang3532 @maxluk @gunandrose4u @mszhanyi
Issue Analytics
- State:
- Created 2 years ago
- Comments:26 (26 by maintainers)
Top Results From Across the Web
Troubleshoot the Regression suite automation tool
Typically, this error happens when the test environment has not been configured to trust the certificate that RSAT is using for authentication.
Read more >6 Common Test Automation Mistakes And How To Avoid Them
Success in software test automation is less about getting it right and more about avoiding mistakes. Here are six common errors and how...
Read more >Setting up your own test automation environment
This module should have proven fun, and should have given you enough of an insight into writing and running automated tests for you...
Read more >Using xUnit to Test your C# Code - Auth0
Test Automation Basics. Testing ensures that your application is doing what it's meant to do. It seems a trivial statement, but sometimes this...
Read more >Automation in Selenium: Page Object Model and Page Factory
Proper test automation is the key to quality software. ... elements need to be initialized using Page Factory before the web element variables...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the cause of this problem is quite clear. First, In PyTorch, we use
LoadLibraryEx
and thenLoadLibrary
to load in the dependencies, but in torchvision, it relies ontorch.ops.load_library
, which usesctypes.CDLL
. (It usesLoadLibrary
as the underlying API.) The behavior is inconsistent. Second, in PyTorch, we useAddDllDirectory
andPATH
for dependency resolving, but we do nothing whentorch.ops.load_library
is called. Actually, we should do the same, that is to add the directory containing the DLLs for dependency search.Links:
torch.ops.load_library
: https://github.com/pytorch/pytorch/blob/master/torch/_ops.py#L84-L111It was easier when packaging the wheels, but statically compiling it into the image extension should fix these kind of issues indeed. However, OpenCV and other libraries also opt to dynamically link to libpng and other libraries.