-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Delete tagged names #26365
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
Delete tagged names #26365
Conversation
Test Plan: - [namedtensor ci]
Test Plan: - [namedtensor ci]
aten/src/ATen/NamedTensorUtils.cpp
Outdated
| } | ||
| auto it = std::find_if(other_names.begin(), other_names.end(), | ||
| [&](const Dimname& candidate) { return name.can_refer_to(candidate); }); | ||
| [&](const Dimname& candidate) { return name == candidate; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can use std::find() without the lambda?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed, that made the code a lot nicer. Thank you for catching it!
Test Plan: - [namedtensor ci]
Test Plan: - [namedtensor ci]
Test Plan: - [namedtensor ci]
Summary: Pull Request resolved: pytorch/pytorch#26365 Test Plan: - [namedtensor ci] Differential Revision: D17484759 Pulled By: zou3519 fbshipit-source-id: 44068c1e9d84adf36c5ab5e7006a153b948914d6
Summary: Pull Request resolved: pytorch#26365 Test Plan: - [namedtensor ci] Differential Revision: D17484759 Pulled By: zou3519 fbshipit-source-id: 44068c1e9d84adf36c5ab5e7006a153b948914d6
Stack from ghstack:
Test Plan:
Differential Revision: D17484759