Skip to content
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

Remove incorrect THP{Cpp,}Function_traverse PyObject traversals #102860

Closed
wants to merge 2 commits into from

Conversation

@soulitzer soulitzer requested a review from albanD as a code owner June 2, 2023 18:30
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 2, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/102860

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 84a5842:
💚 Looks good so far! There are no failures yet. 💚

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

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.

Thanks!
Did you confirm that the test does fail without the change?

@@ -77,6 +77,14 @@ PyObject* THPCppFunction_call(

int THPCppFunction_traverse(PyObject* self, visitproc visit, void* arg) {
auto& fn = *((THPCppFunction*)self)->cdata;
if ((((THPCppFunction*)self)->cdata).use_count() > 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definitely makes the diff easier to read but I think it's better to guard the calls below rather than early returning.

@soulitzer soulitzer added release notes: autograd release notes category topic: bug fixes topic category ciflow/trunk Trigger trunk jobs on your pull request labels Jun 2, 2023
@soulitzer
Copy link
Contributor Author

@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

alimoezzi pushed a commit to alimoezzi/pytorch that referenced this pull request Jun 3, 2023
@facebook-github-bot facebook-github-bot deleted the gh/soulitzer/213/head branch June 8, 2023 18:50
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: autograd release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants