Skip to content

Fix memory.view insertion except for output nodes#3602

Closed
dulinriley wants to merge 1 commit intopytorch:mainfrom
dulinriley:export-D57299853
Closed

Fix memory.view insertion except for output nodes#3602
dulinriley wants to merge 1 commit intopytorch:mainfrom
dulinriley:export-D57299853

Conversation

@dulinriley
Copy link
Contributor

Summary:
The previous implementation of ignoring view_copy on outputs was incorrect
in that it only checked node.next instead of all users of the node.
node.next just selects the next node in topological order, which may or
may not be the output if there is more than one output. In the case of more
than one output, the next node may not be related at all!

Check if any of the users of the node are an output instead.

Reviewed By: metascroy, mcremon-meta

Differential Revision: D57299853

@pytorch-bot
Copy link

pytorch-bot bot commented May 14, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 81ab3fb with merge base c69861d (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 14, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57299853

dulinriley added a commit to dulinriley/executorch that referenced this pull request May 14, 2024
Summary:

The previous implementation of ignoring `view_copy` on outputs was incorrect
in that it only checked `node.next` instead of all users of the node.
`node.next` just selects the next node in topological order, which may or
may not be the output if there is more than one output. In the case of more
than one output, the next node may not be related at all!

Check if any of the users of the node are an output instead.

Reviewed By: metascroy, mcremon-meta

Differential Revision: D57299853
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57299853

Summary:

The previous implementation of ignoring `view_copy` on outputs was incorrect
in that it only checked `node.next` instead of all users of the node.
`node.next` just selects the next node in topological order, which may or
may not be the output if there is more than one output. In the case of more
than one output, the next node may not be related at all!

Check if any of the users of the node are an output instead.

Reviewed By: metascroy, mcremon-meta

Differential Revision: D57299853
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D57299853

dulinriley added a commit to dulinriley/executorch that referenced this pull request May 14, 2024
Summary:

The previous implementation of ignoring `view_copy` on outputs was incorrect
in that it only checked `node.next` instead of all users of the node.
`node.next` just selects the next node in topological order, which may or
may not be the output if there is more than one output. In the case of more
than one output, the next node may not be related at all!

Check if any of the users of the node are an output instead.

Reviewed By: metascroy, mcremon-meta

Differential Revision: D57299853
dulinriley added a commit to dulinriley/executorch that referenced this pull request May 14, 2024
Summary:

The previous implementation of ignoring `view_copy` on outputs was incorrect
in that it only checked `node.next` instead of all users of the node.
`node.next` just selects the next node in topological order, which may or
may not be the output if there is more than one output. In the case of more
than one output, the next node may not be related at all!

Check if any of the users of the node are an output instead.

Reviewed By: metascroy, mcremon-meta

Differential Revision: D57299853
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b64182d.

@dulinriley dulinriley deleted the export-D57299853 branch May 14, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants