-
Couldn't load subscription status.
- Fork 25.7k
[AOTI] raise PyTorchStreamWriter open failed error code on windows #162799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AOTI] raise PyTorchStreamWriter open failed error code on windows #162799
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162799
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d6f4d81 with merge base 75de5b6 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
2602650 to
7f8c31d
Compare
| struct stat st; | ||
| bool dir_exists = | ||
| (stat(dir_name.c_str(), &st) == 0 && (st.st_mode & S_IFDIR)); | ||
| TORCH_CHECK( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to have a TORCH_CHECK_IO wrapper or wrapper for file not found error. Should be pretty easy to bind to exception type too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Skylion007 these code is existing code, I just move its place to pass the failed UTs: https://github.com/pytorch/pytorch/actions/runs/17673500150/job/50232301673
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair, we should fix in subsequent PR
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ytorch#162799) When I debug AOTI UT: `TestAOTInductorPackage_cpu::test_add`. I found it didn't output the verbose error code, when PyTorchStreamWriter open failed. This PR add the verbose error code output for debug. Local test shows as below: <img width="1124" height="653" alt="image" src="https://github.com/user-attachments/assets/01cb1a51-2982-4106-8b5b-c608ac26a075" /> The error code is 32, we can check the Windows error code 32 at https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- ``` ERROR_SHARING_VIOLATION 32 (0x20) The process cannot access the file because it is being used by another process. ``` This issue is caused by the file is opened by another process. I fixed same issue in zip open as PR: pytorch#162617 But still no idea how to open file with shared access in `std::ofstream`. I will continue to researching it. Pull Request resolved: pytorch#162799 Approved by: https://github.com/jansel
…ytorch#162799) When I debug AOTI UT: `TestAOTInductorPackage_cpu::test_add`. I found it didn't output the verbose error code, when PyTorchStreamWriter open failed. This PR add the verbose error code output for debug. Local test shows as below: <img width="1124" height="653" alt="image" src="https://github.com/user-attachments/assets/01cb1a51-2982-4106-8b5b-c608ac26a075" /> The error code is 32, we can check the Windows error code 32 at https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- ``` ERROR_SHARING_VIOLATION 32 (0x20) The process cannot access the file because it is being used by another process. ``` This issue is caused by the file is opened by another process. I fixed same issue in zip open as PR: pytorch#162617 But still no idea how to open file with shared access in `std::ofstream`. I will continue to researching it. Pull Request resolved: pytorch#162799 Approved by: https://github.com/jansel
…ytorch#162799) When I debug AOTI UT: `TestAOTInductorPackage_cpu::test_add`. I found it didn't output the verbose error code, when PyTorchStreamWriter open failed. This PR add the verbose error code output for debug. Local test shows as below: <img width="1124" height="653" alt="image" src="https://github.com/user-attachments/assets/01cb1a51-2982-4106-8b5b-c608ac26a075" /> The error code is 32, we can check the Windows error code 32 at https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- ``` ERROR_SHARING_VIOLATION 32 (0x20) The process cannot access the file because it is being used by another process. ``` This issue is caused by the file is opened by another process. I fixed same issue in zip open as PR: pytorch#162617 But still no idea how to open file with shared access in `std::ofstream`. I will continue to researching it. Pull Request resolved: pytorch#162799 Approved by: https://github.com/jansel
…ytorch#162799) When I debug AOTI UT: `TestAOTInductorPackage_cpu::test_add`. I found it didn't output the verbose error code, when PyTorchStreamWriter open failed. This PR add the verbose error code output for debug. Local test shows as below: <img width="1124" height="653" alt="image" src="https://github.com/user-attachments/assets/01cb1a51-2982-4106-8b5b-c608ac26a075" /> The error code is 32, we can check the Windows error code 32 at https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- ``` ERROR_SHARING_VIOLATION 32 (0x20) The process cannot access the file because it is being used by another process. ``` This issue is caused by the file is opened by another process. I fixed same issue in zip open as PR: pytorch#162617 But still no idea how to open file with shared access in `std::ofstream`. I will continue to researching it. Pull Request resolved: pytorch#162799 Approved by: https://github.com/jansel
When I debug AOTI UT:
TestAOTInductorPackage_cpu::test_add. I found it didn't output the verbose error code, when PyTorchStreamWriter open failed.This PR add the verbose error code output for debug. Local test shows as below:

The error code is 32, we can check the Windows error code 32 at https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
This issue is caused by the file is opened by another process. I fixed same issue in zip open as PR: #162617 But still no idea how to open file with shared access in
std::ofstream. I will continue to researching it.cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10