8000 [BE] Handle errors in `set_num_threads` by malfet · Pull Request #113684 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
wants to merge 2 commits into from
Closed

[BE] Handle errors in set_num_threads #113684

wants to merge 2 commits into from

Conversation

malfet
Copy link
Contributor
@malfet malfet commented Nov 14, 2023

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

cc @albanD

 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
```
Copy link
pytorch-bot bot commented Nov 14, 2023

🔗 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 Failures

As of commit 557ed18 with merge base 20eaa49 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@malfet malfet added this to the 2.1.2 milestone Nov 14, 2023
@malfet malfet added topic: bug fixes topic category module: python frontend For issues relating to PyTorch's Python frontend labels Nov 14, 2023
@malfet
Copy link
Contributor Author
malfet commented Nov 14, 2023

Let me add a quick regression test before landing...

Copy link
Collaborator
@albanD albanD left a 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!

@malfet
Copy link
Contributor Author
malfet commented Nov 15, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 15, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@malfet malfet added release notes: python_frontend python frontend release notes category and removed module: python frontend For issues relating to PyTorch's Python frontend labels Nov 15, 2023
@malfet
Copy link
Contributor Author
malfet commented Nov 15, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

8000

@malfet malfet deleted the malfet-patch-38 branch November 15, 2023 14:45
malfet added a commit that referenced this pull request Nov 22, 2023
 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)
atalman pushed a commit that referenced this pull request Nov 23, 2023
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: python_frontend python frontend release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0