-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[BE] Modernize C++ in MetalPrepackOpContext #104312
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mark destructors as overrides, which fixes:
```cpp
In file included from /Users/nshulga/git/pytorch/pytorch/aten/src/ATen/native/metal/MetalPrepackOpRegister.cpp:3:
/Users/nshulga/git/pytorch/pytorch/aten/src/ATen/native/metal/MetalPrepackOpContext.h:52:3: warning: '~Conv2dOpContext' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
~Conv2dOpContext() {
^
/Users/nshulga/git/pytorch/pytorch/aten/src/ATen/core/ivalue.h:22:17: note: overridden virtual function is here
class TORCH_API CustomClassHolder : public c10::intrusive_ptr_target {};
^
In file included from /Users/nshulga/git/pytorch/pytorch/aten/src/ATen/native/metal/MetalPrepackOpRegister.cpp:3:
/Users/nshulga/git/pytorch/pytorch/aten/src/ATen/native/metal/MetalPrepackOpContext.h:147:3: warning: '~LinearOpContext' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
~LinearOpContext() {
^
/Users/nshulga/git/pytorch/pytorch/aten/src/ATen/core/ivalue.h:22:17: note: overridden virtual function is here
class TORCH_API CustomClassHolder : public c10::intrusive_ptr_target {};
```
Modernize constructors by passing elements by value and moving them,
rather than passing by reference.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/104312
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit d4f67cb with merge base de7b6e5 ( UNSTABLE - The following jobs failed but were 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. |
kit1980
approved these changes
Jun 28, 2023
osalpekar
approved these changes
Jun 28, 2023
Contributor
Author
|
@pytorchbot merge |
Collaborator
Merge startedYour 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 |
malfet
added a commit
that referenced
this pull request
Jun 28, 2023
- Add `ngimel` to the list of reviewers to make "test_revert_rules" pass - Change PR in `test_get_classifications_unstable` from #102784 to #104312 as former do not have unstable jobs after merging. <!-- copilot:poem --> ### <samp>🤖 Generated by Copilot at af26e18</samp> > _Oh we're the crew of the `test_trymerge.py`_ > _We update the rules and the cases on the fly_ > _We heave and we haul on the count of three_ > _We add a new approver for the `super` rule, aye_ cc albanD [ghstack-poisoned]
pytorchmergebot
pushed a commit
that referenced
this pull request
Jun 28, 2023
- Add `ngimel` to the list of reviewers to make "test_revert_rules" pass - Change PR in `test_get_classifications_unstable` from #102784 to #104312 as former do not have unstable jobs after merging. <!-- copilot:poem --> ### <samp>🤖 Generated by Copilot at af26e18</samp> > _Oh we're the crew of the `test_trymerge.py`_ > _We update the rules and the cases on the fly_ > _We heave and we haul on the count of three_ > _We add a new approver for the `super` rule, aye_ Pull Request resolved: #104343 Approved by: https://github.com/jeanschmidt, https://github.com/albanD
nWEIdia
added a commit
to nWEIdia/pytorch
that referenced
this pull request
Jan 27, 2025
(pytorch#104312) to test the API. Since the old PR has cu121, I cannot remove cu121 occurences here. Some other cases, it is just testing remove suffix. So it is fine to not use cu121 but cu124, well let's just use cu126
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
release notes: mobile
release notes category
topic: not user facing
topic category
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mark destructors as overrides, which fixes:
Modernize constructors by passing parameters by value and moving them, rather than by reference, see clang-tidy pass-by-value rule.