[invoke_subgraph] Support integer outputs in the subgraph#160777
Closed
anijain2305 wants to merge 1 commit intogh/anijain2305/850/basefrom
Closed
[invoke_subgraph] Support integer outputs in the subgraph#160777anijain2305 wants to merge 1 commit intogh/anijain2305/850/basefrom
anijain2305 wants to merge 1 commit intogh/anijain2305/850/basefrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/160777
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit a425e3d with merge base fa75ba9 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
zou3519
reviewed
Aug 22, 2025
| ref[0].sum().backward() | ||
| res[0].sum().backward() | ||
| self.assertEqual(x.grad, x_clone.grad) | ||
|
|
Contributor
There was a problem hiding this comment.
- symints should be allowed to be outputs of the graph
- any non-symbolic expressions (constants) should not be outputs of the graph. Instead, Dynamo should figure out how to propagate them along.
For example, if there's a function like the following:
def f(x):
return x.sin(), 1
then the subgraph should just look like the following:
def subgraph(x):
return torch.ops.aten.sin.default(x)
This is to avoid giving Inductor and/or AOTAutograd anything that looks crazy (a constant that they can't handle)
Contributor
Author
|
Closing in favor of #161354 |
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 (oldest at bottom):