grad_fn getter for optional strings#55225
Closed
peterbell10 wants to merge 14 commits intogh/peterbell10/54/basefrom
Closed
grad_fn getter for optional strings#55225peterbell10 wants to merge 14 commits intogh/peterbell10/54/basefrom
peterbell10 wants to merge 14 commits intogh/peterbell10/54/basefrom
Conversation
[ghstack-poisoned]
This was referenced Apr 2, 2021
Contributor
💊 CI failures summary and remediationsAs of commit e4faa44 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis 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. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
soulitzer
approved these changes
Apr 2, 2021
Contributor
soulitzer
left a comment
There was a problem hiding this comment.
Small comment LGTM otherwise. Thanks for the addition!
| 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? |
Contributor
There was a problem hiding this comment.
nit: Maybe use assertNone for consistency
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Contributor
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Differential Revision: D28118113