Skip to content

grad_fn getter for optional strings#55225

Closed
peterbell10 wants to merge 14 commits intogh/peterbell10/54/basefrom
gh/peterbell10/54/head
Closed

grad_fn getter for optional strings#55225
peterbell10 wants to merge 14 commits intogh/peterbell10/54/basefrom
gh/peterbell10/54/head

Conversation

@peterbell10
Copy link
Copy Markdown
Collaborator

@peterbell10 peterbell10 commented Apr 2, 2021

Stack from ghstack:

Differential Revision: D28118113

@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Apr 2, 2021

💊 CI failures summary and remediations

As of commit e4faa44 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

peterbell10 added a commit that referenced this pull request Apr 2, 2021
ghstack-source-id: 8b088bc
Pull Request resolved: #55225
Copy link
Copy Markdown
Contributor

@soulitzer soulitzer left a comment

Choose a reason for hiding this comment

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

Small comment LGTM otherwise. Thanks for the addition!

Comment thread test/test_autograd.py Outdated
out = torch.div(a, 2., rounding_mode="trunc")
self.assertEqual(out.grad_fn._saved_rounding_mode, "trunc") # c10::optional<std::string> -> str?
out = torch.div(a, 2., rounding_mode=None)
self.assertEqual(out.grad_fn._saved_rounding_mode, None) # c10::optional<std::string> -> str?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Maybe use assertNone for consistency

peterbell10 added a commit that referenced this pull request Apr 2, 2021
ghstack-source-id: 164654b
Pull Request resolved: #55225
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@mruberry merged this pull request in 7c8d006.

@facebook-github-bot facebook-github-bot deleted the gh/peterbell10/54/head branch May 5, 2021 14:16
krshrimali pushed a commit to krshrimali/pytorch that referenced this pull request May 19, 2021
Summary: Pull Request resolved: pytorch#55225

Test Plan: Imported from OSS

Reviewed By: astaff

Differential Revision: D28118113

Pulled By: mruberry

fbshipit-source-id: 711723922cff3afa220e03d926cee5884e167706
jasperzhong pushed a commit to jasperzhong/swift that referenced this pull request Nov 25, 2021
ghstack-source-id: 268f144
Pull Request resolved: pytorch/pytorch#55225
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
Summary: Pull Request resolved: pytorch#55225

Test Plan: Imported from OSS

Reviewed By: astaff

Differential Revision: D28118113

Pulled By: mruberry

fbshipit-source-id: 711723922cff3afa220e03d926cee5884e167706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants