-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[BE] Handle errors in set_num_threads
#113684
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
Conversation
and `set_num_interop_threads` Before that, call `torch.set_num_threads(2**65)` resulted in segmentation fault, afterwards it becomes a good old runtime error: ``` % python -c "import torch;torch.set_num_threads(2**65)" Traceback (most recent call last): File "<string>", line 1, in <module> RuntimeError: Overflow when unpacking long ```
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113684
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 557ed18 with merge base 20eaa49 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Let me add a quick regression test before landing... |
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.
Sounds good once we have test!
@pytorchbot merge |
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
@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 |
and `set_num_interop_threads` Before that, call `torch.set_num_threads(2**65)` resulted in segmentation fault, afterwards it becomes a good old runtime error: ``` % python -c "import torch;torch.set_num_threads(2**65)" Traceback (most recent call last): File "<string>", line 1, in <module> RuntimeError: Overflow when unpacking long ``` Similar to #60073 Cherry pick of #113684 into release/2.1 (cherry picked from commit 78f3937)
and `set_num_interop_threads` Before that, call `torch.set_num_threads(2**65)` resulted in segmentation fault, afterwards it becomes a good old runtime error: ``` % python -c "import torch;torch.set_num_threads(2**65)" Traceback (most recent call last): File "<string>", line 1, in <module> RuntimeError: Overflow when unpacking long ``` Similar to #60073 Cherry pick of #113684 into release/2.1 (cherry picked from commit 78f3937)
and
set_num_interop_threads
Before that, call
torch.set_num_threads(2**65)
resulted in segmentation fault, afterwards it becomes a good old runtime error:Similar to #60073
cc @albanD