Skip to content

Add -Werror=non-virtual-dtor (reland) #81012

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
wants to merge 4 commits into from
Closed

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Jul 6, 2022

This PR relands #80584, but instead of adding suppression in CMakeLists.txt suppresses it directly in llvm_codegen.cpp and just for a single header.

In general, it's better to avoid set_target_properties pattern for suppressing warnings, as it makes build brittle and hard to debug/understand

Test plan: wait for ciflow/binaries_wheel to finish

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 6, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit d69e815 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 6, 2022
@malfet malfet added the ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR label Jul 6, 2022
@malfet malfet requested review from huydhn and a team July 6, 2022 22:54
@@ -784,6 +784,11 @@ if(NOT MSVC)
string(APPEND CMAKE_CXX_FLAGS " -Wall")
string(APPEND CMAKE_CXX_FLAGS " -Wextra")
string(APPEND CMAKE_CXX_FLAGS " -Werror=return-type")
if(NOT USE_CUDNN)
Copy link
Contributor

Choose a reason for hiding this comment

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

For this flag, I will create a follow-up task to fix the issue upstream in cudnn_frontend where the warning comes from. After that is fixed, I think we can remove this not-so-good check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But can we perhaps suppress one or two files like that?

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, PR on the 3rd party cudnn_frontend NVIDIA/cudnn-frontend#33. When this is accepted and merged, this check can be removed

huydhn added a commit to huydhn/cudnn-frontend that referenced this pull request Jul 7, 2022
This resolves the downstream issue in pytorch when we try to enable
this check. More information can be found at pytorch/pytorch#81012
@malfet
Copy link
Contributor Author

malfet commented Jul 7, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Merge failed due to Matched rule superuser, but PR #81012 was not reviewed yet by any of: four4fish, henryliu-bluehills, sidneyfletcher, fuqianz, Mortimerp9, ...
Raised by https://github.com/pytorch/pytorch/actions/runs/2627095697

@malfet
Copy link
Contributor Author

malfet commented Jul 7, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2022

Hey @malfet.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@malfet malfet deleted the malfet/reland-80584 branch July 7, 2022 05:36
facebook-github-bot pushed a commit that referenced this pull request Jul 8, 2022
Summary:
This PR relands #80584, but instead of adding suppression in CMakeLists.txt suppresses it directly in `llvm_codegen.cpp` and just for a single header.

In general, it's better to avoid `set_target_properties` pattern for suppressing warnings, as it makes build brittle and hard to debug/understand

Pull Request resolved: #81012
Approved by: https://github.com/huydhn, https://github.com/kit1980

Test Plan:
contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/2beb57a823f6bbe1824371291686727aab71815d

Test plan from GitHub:
wait for `ciflow/binaries_wheel` to finish

Reviewed By: mehtanirav

Differential Revision: D37687572

Pulled By: malfet

fbshipit-source-id: fc53f1faab6c99a7b9166c2ea8c934d7f2fd4eac
jjsjann123 pushed a commit to jjsjann123/nvfuser that referenced this pull request Oct 29, 2022
This PR relands #80584, but instead of adding suppression in CMakeLists.txt suppresses it directly in `llvm_codegen.cpp` and just for a single header.

In general, it's better to avoid `set_target_properties` pattern for suppressing warnings, as it makes build brittle and hard to debug/understand

Test plan: wait for `ciflow/binaries_wheel` to finish
Pull Request resolved: pytorch/pytorch#81012
Approved by: https://github.com/huydhn, https://github.com/kit1980
jjsjann123 pushed a commit to jjsjann123/nvfuser that referenced this pull request Nov 10, 2022
This PR relands #80584, but instead of adding suppression in CMakeLists.txt suppresses it directly in `llvm_codegen.cpp` and just for a single header.

In general, it's better to avoid `set_target_properties` pattern for suppressing warnings, as it makes build brittle and hard to debug/understand

Test plan: wait for `ciflow/binaries_wheel` to finish
Pull Request resolved: pytorch/pytorch#81012
Approved by: https://github.com/huydhn, https://github.com/kit1980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants