Skip to content

add duplicate constant node pass #2945

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

Closed
wants to merge 1 commit into from

Conversation

pytorchbot
Copy link
Collaborator

Summary:
This diff is the follow up for #2424

In the case like

    consant_0 (tag_10) ----> op_b (tag_10)
    |-------------> op_a (tag_11)

op_b and op_a are in two delegated payload and constant_0 have two options:

In this diff, we're making the default behavior as allowing copying, meaning it will become

    consant_0 (tag_10)------------------> op_b (tag_10)
    consant_0_copy (tag_11) -------------> op_a (tag_11)

The backend can tag the node with no_copy to allert users in cases like constants are too large or etc. In this case, a better approach can be

    consant_0 (tag_10) ----> op_b (tag_10)
                                    |-----(output consant_0) --------> op_a (tag_11)

Differential Revision: D55113232

Summary:
Pull Request resolved: #2570

This diff is the follow up for #2424

In the case like
```
    consant_0 (tag_10) ----> op_b (tag_10)
    |-------------> op_a (tag_11)
```

`op_b` and `op_a` are in two delegated payload and `constant_0` have two options:

In this diff, we're making the default behavior as allowing copying, meaning it will become
```
    consant_0 (tag_10)------------------> op_b (tag_10)
    consant_0_copy (tag_11) -------------> op_a (tag_11)
```

The backend can tag the node with `no_copy` to allert users in cases like constants are too large or etc. In this case, a better approach can be
```
    consant_0 (tag_10) ----> op_b (tag_10)
                                    |-----(output consant_0) --------> op_a (tag_11)
```

Reviewed By: angelayi

Differential Revision: D55113232

fbshipit-source-id: 49559a8cc8225b866a399b4db04ef59fc6860cc1
(cherry picked from commit 7f96f5a)
Copy link

pytorch-bot bot commented Apr 9, 2024

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 2d5c81d with merge base d3326a2 (image):

NEW FAILURE - The following job has failed:

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 Apr 9, 2024
@cccclai cccclai mentioned this pull request Apr 9, 2024
@mergennachin mergennachin self-requested a review April 9, 2024 17:42
Copy link
Contributor

@mergennachin mergennachin left a comment

Choose a reason for hiding this comment

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

@cccclai

This PR is already merged in main and release/0.2, please remove this request.

@cccclai cccclai closed this Apr 10, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants