Skip to content

Conversation

pianpwk
Copy link
Contributor

@pianpwk pianpwk commented Apr 12, 2024

The process for populating range_constraints follows separate methods for non-strict (make_constraints), and strict (_process_constraints). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, without duplicating the work that Dynamo already does.

Copy link

pytorch-bot bot commented Apr 12, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 339f3fa with merge base 6822507 (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
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

pianpwk added a commit that referenced this pull request Apr 12, 2024
Summary: Pull Request resolved: #123985

Differential Revision: D56086223
facebook-github-bot pushed a commit that referenced this pull request Apr 13, 2024
Summary: Pull Request resolved: #123985

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

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

facebook-github-bot pushed a commit that referenced this pull request Apr 18, 2024
Summary:

The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (i.e. produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, with an option to skip the work that Dynamo has already done.

Test Plan: existing tests, all export calls now go through make_constraints

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

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

pianpwk added a commit that referenced this pull request Apr 19, 2024
Summary:
Pull Request resolved: #123985

The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (i.e. produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, with an option to skip the work that Dynamo has already done.

Test Plan: existing tests, all export calls now go through make_constraints

Differential Revision: D56086223
@pianpwk pianpwk requested a review from jeffdaily as a code owner April 22, 2024 18:09
pianpwk added a commit that referenced this pull request Apr 22, 2024
Summary:
Pull Request resolved: #123985

The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (i.e. produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, with an option to skip the work that Dynamo has already done.

Test Plan: existing tests, all export calls now go through make_constraints

Differential Revision: D56086223
Copy link
Contributor

@avikchaudhuri avikchaudhuri left a comment

Choose a reason for hiding this comment

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

Accepting to unblock, but not a fan of the flag. See inline comment for a suggestion on how to remove it.

num_lifted_inputs: int,
equalities_inputs: Optional[EqualityConstraint] = None,
original_signature: Optional[inspect.Signature] = None,
skip_produce_guards: Optional[bool] = False,
Copy link
Contributor

Choose a reason for hiding this comment

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

With a bit of renaming and refactoring can we get rid of this flag? Specifically I'm thinking maybe we should split make_constraints into a produce_guards and make_constraints instead? And then make non-strict export call the part inside not skip_produce_guards explicitly (the new produce_guards) before calling make_constraints and have strict just call the latter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes this makes complete sense.

@facebook-github-bot
Copy link
Contributor

@pianpwk has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

pianpwk added a commit that referenced this pull request Apr 23, 2024
Summary:
The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, without duplicating the work that Dynamo already does.


Reviewed By: avikchaudhuri

Differential Revision: D56086223

Pulled By: pianpwk
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

pianpwk added a commit that referenced this pull request Apr 24, 2024
Summary:
The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, without duplicating the work that Dynamo already does.


Reviewed By: avikchaudhuri

Differential Revision: D56086223

Pulled By: pianpwk
@facebook-github-bot
Copy link
Contributor

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

Summary:
The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, without duplicating the work that Dynamo already does.

Pull Request resolved: #123985

Reviewed By: avikchaudhuri

Differential Revision: D56086223

Pulled By: pianpwk
@pianpwk pianpwk changed the title [export] try to kill _process_constraints() [export] kill _process_constraints() Apr 25, 2024
@facebook-github-bot
Copy link
Contributor

@pytorchbot merge -f 'Landed internally'

(Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pytorch-bot bot pushed a commit that referenced this pull request May 3, 2024
The process for populating range_constraints follows separate methods for non-strict (`make_constraints`), and strict (`_process_constraints`). The strict method is somewhat more convoluted, and the analysis that Dynamo performs for strict is already present as part of the non-strict process in make_constraints (produce_guards(), running the export constraint solver).

This PR kills _process_constraints() and replaces calls with make_constraints, without duplicating the work that Dynamo already does.
Pull Request resolved: #123985
Approved by: https://github.com/avikchaudhuri
@github-actions github-actions bot deleted the export-D56086223 branch June 3, 2024 01:57
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