Skip to content

Conversation

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 19, 2022

🔗 Helpful Links

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

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

✅ No Failures, 5 Pending

As of commit 0587d31:
💚 Looks good so far! There are no failures yet. 💚

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

def wrap(self, num):
return PySymInt(sympy.Integer(num), self.shape_env, constant=num)

def clone(self):
return PySymInt(self.expr, self.shape_env, constant=self.constant)

def _update_expr(self):
self._expr = self.shape_env.simplify(self._expr)
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think this will noticeably slow down compilation times 🤔. I hope simplify() is a fast no-op

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have a bunch of caches, so it'll never get run twice.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure about that? We'd have to audit all expr call sites no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What do you mean? I'm saying that self.shape_env.simplify sits behind a LRU cache, so if we hit it twice it should mostly be a no-op.

@albanD albanD removed their request for review October 19, 2022 14:12
@@ -3801,25 +3801,6 @@ def forward(x):
]
self.common(forward, args)

@unittest.skip("https://github.com/pytorch/torchdynamo/issues/1297")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this since redundant test.

@@ -45,7 +45,7 @@ def __init__(self, shape_env=None):
self.shape_env = shape_env
self.var_to_val = self.shape_env.var_to_val
self.guards = []
self.replacements: Dict[sympy.Symbol, Expr] = {}
self.replacements: Dict[sympy.Symbol, Expr] = self.shape_env.replacements
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want an alias, or a copy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Alias

Copy link
Contributor

Choose a reason for hiding this comment

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

might be worth a comment, as the Dict type annot is mutable

@ezyang
Copy link
Contributor

ezyang commented Oct 19, 2022

I'm not qualified to review the inductor code

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 19, 2022
@Chillee
Copy link
Collaborator Author

Chillee commented Oct 19, 2022

@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

@github-actions
Copy link
Contributor

Hey @Chillee.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@facebook-github-bot facebook-github-bot deleted the gh/chillee/156/head branch June 8, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: inductor release notes: fx release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants