-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[Profiler][Trivial] Add hashing struct for pairs and tuples. #87668
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
Conversation
There is a fairly simple and commonly used hash_combine in c10/util; however in order to use it in a map we need to wrap it in a hashing struct. By defining template functions we also get recursive unpacking for free. (A later PR will want to hash a `tuple<tuple<T0, T1>, tuple<T0, T1>>`) Differential Revision: [D40666359](https://our.internmc.facebook.com/intern/diff/D40666359/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87668
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit 05377b7: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a labelIf your changes are user facing and intended to be a part of release notes, please use a label starting with If not, please add the For more information, see https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work. |
There is a fairly simple and commonly used hash_combine in c10/util; however in order to use it in a map we need to wrap it in a hashing struct. By defining template functions we also get recursive unpacking for free. (A later PR will want to hash a `tuple<tuple<T0, T1>, tuple<T0, T1>>`) Differential Revision: [D40666359](https://our.internmc.facebook.com/intern/diff/D40666359/) [ghstack-poisoned]
…#87668) There is a fairly simple and commonly used hash_combine in c10/util; however in order to use it in a map we need to wrap it in a hashing struct. By defining template functions we also get recursive unpacking for free. (A later PR will want to hash a `tuple<tuple<T0, T1>, tuple<T0, T1>>`) Differential Revision: [D40666359](https://our.internmc.facebook.com/intern/diff/D40666359/) Pull Request resolved: pytorch#87668 Approved by: https://github.com/slgong-fb
…#87668) There is a fairly simple and commonly used hash_combine in c10/util; however in order to use it in a map we need to wrap it in a hashing struct. By defining template functions we also get recursive unpacking for free. (A later PR will want to hash a `tuple<tuple<T0, T1>, tuple<T0, T1>>`) Differential Revision: [D40666359](https://our.internmc.facebook.com/intern/diff/D40666359/) Pull Request resolved: pytorch#87668 Approved by: https://github.com/slgong-fb
Stack from ghstack (oldest at bottom):
data_flow.cpp#87670There is a fairly simple and commonly used hash_combine in c10/util; however in order to use it in a map we need to wrap it in a hashing struct. By defining template functions we also get recursive unpacking for free. (A later PR will want to hash a
tuple<tuple<T0, T1>, tuple<T0, T1>>)Differential Revision: D40666359