Skip to content
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

remove redundant dynamic_dim #107815

Closed
wants to merge 1 commit into from

Conversation

avikchaudhuri
Copy link
Contributor

@avikchaudhuri avikchaudhuri commented Aug 23, 2023

@pytorch-bot pytorch-bot bot added the release notes: fx release notes category label Aug 23, 2023
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 23, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 2fa0a8e with merge base 3875563 (image):

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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: D48618472

buf += f"\n```\ndef specify_constraints{str(signature)}:"
buf += f"\n{indent}return ["
print_results(
grouped_dynamic_results,
indent * 2,
lambda result: f"{remove_default_lower_bound(result)},",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should remove_default_lower_bound be deleted then?

Copy link
Contributor

Choose a reason for hiding this comment

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

OOC, why is remove_default_lower_bound not called any more?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved its functionality upstream.

a = torch.randn(3)
b = torch.randn(3)
with self.assertRaisesRegex(
torch._dynamo.exc.UserError, "\\[\n.*\n.*dynamic_dim.*==.*dynamic_dim.*\n.*\\]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional nit:

This regex is overly specific, and it can become a "change detector". A better way is to detect that there is no patterns like "dynamic_dim(t, idx)," on its own line.

@@ -1885,6 +1888,24 @@ def forced_specializations(self):
if s in self._marked_dynamic
])

def remove_redundant_dynamic_results(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

a bit of comment explaining its behavior would be nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, added

buf += f"\n```\ndef specify_constraints{str(signature)}:"
buf += f"\n{indent}return ["
print_results(
grouped_dynamic_results,
indent * 2,
lambda result: f"{remove_default_lower_bound(result)},",
Copy link
Contributor

Choose a reason for hiding this comment

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

OOC, why is remove_default_lower_bound not called any more?

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@avikchaudhuri
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 23, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@facebook-github-bot
Copy link
Contributor

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

avikchaudhuri added a commit to avikchaudhuri/pytorch that referenced this pull request Aug 23, 2023
Summary: Pull Request resolved: pytorch#107815

Test Plan: added test

Differential Revision: D48618472

fbshipit-source-id: cfbeac2d3241380d331c07d3b37907798cb5b1df
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

@avikchaudhuri
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch rebase origin/main returned non-zero exit code 1

Rebasing (1/1)
Auto-merging test/dynamo/test_export.py
Auto-merging torch/fx/experimental/symbolic_shapes.py
CONFLICT (content): Merge conflict in torch/fx/experimental/symbolic_shapes.py
error: could not apply 90ebb6f2ca3... remove redundant dynamic_dim (#107815)
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 90ebb6f2ca3... remove redundant dynamic_dim (#107815)
Details for Dev Infra team Raised by workflow job

Summary: Pull Request resolved: pytorch#107815

Test Plan: added test

Reviewed By: tugsbayasgalan

Differential Revision: D48618472

fbshipit-source-id: 0078811f405fd8ad5827edffcdcd3943091db62b
@facebook-github-bot
Copy link
Contributor

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

@avikchaudhuri
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged module: dynamo release notes: fx release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants