Skip to content

Revert "Revert "Put Python Dispatcher cache in dict, clear it on new registrations. (#88329)""#88489

Closed
ezyang wants to merge 2 commits intogh/ezyang/1498/basefrom
gh/ezyang/1498/head
Closed

Revert "Revert "Put Python Dispatcher cache in dict, clear it on new registrations. (#88329)""#88489
ezyang wants to merge 2 commits intogh/ezyang/1498/basefrom
gh/ezyang/1498/head

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Nov 4, 2022

Stack from ghstack (oldest at bottom):

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache. I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.

…registrations. (#88329)""

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache.  I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 4, 2022

🔗 Helpful Links

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

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

✅ No Failures

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

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

… it on new registrations. (#88329)"""

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache.  I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Nov 4, 2022
…registrations. (#88329)""

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache.  I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.

ghstack-source-id: ab122b9
Pull Request resolved: #88489
@albanD albanD added the topic: not user facing topic category label Nov 4, 2022
setattr(self, attr, r)
final_key = resolve_key(self, key)
r = self.py_kernels.get(final_key, final_key)
self._dispatch_cache[key] = r
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This incorrectly was final_key in the previous diff

@ezyang ezyang added ciflow/trunk Trigger trunk jobs on your pull request ciflow/inductor labels Nov 4, 2022
@ezyang
Copy link
Contributor Author

ezyang commented Nov 4, 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

kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
…registrations. (pytorch#88329)"" (pytorch#88489)

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache.  I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.
Pull Request resolved: pytorch#88489
Approved by: https://github.com/albanD
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
…registrations. (pytorch#88329)"" (pytorch#88489)

The bug was that I was accidentally caching at the wrong key name, so
we were never actually hitting the cache.  I've renamed the resolved
key to final_key to avoid shadowing in this way.

This reverts commit 410ce96.
Pull Request resolved: pytorch#88489
Approved by: https://github.com/albanD
@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1498/head branch June 8, 2023 16:28
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 Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants