Skip to content

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented Jun 28, 2023

Mark destructors as overrides, which fixes:

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 parameters by value and moving them, rather than by reference, see clang-tidy pass-by-value rule.

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.
@pytorch-bot
Copy link

pytorch-bot bot commented Jun 28, 2023

🔗 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 (image):

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.

@pytorch-bot pytorch-bot bot added the release notes: mobile release notes category label Jun 28, 2023
@malfet malfet requested review from a team and swolchok June 28, 2023 00:31
@malfet malfet added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module topic: not user facing topic category labels Jun 28, 2023
@malfet
Copy link
Contributor Author

malfet commented Jun 28, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 28, 2023
@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

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
@malfet malfet deleted the malfet/be-fix-override-and-pass-by-value branch January 20, 2024 03:02
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants