mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] Remove suppression of inconsistent missing overrides (#131524)
This should prevent regressions like the ones fixed by https://github.com/pytorch/pytorch/pull/131204 - Remove global `-Wno-error=inconsistent-missing-override` - Wrap offending includes (protobuf and asmjit) with `C10_DIAGNOSTIC_PUSH_AND_IGNORE` and `C10_DIAGNOSTIC_POP_AND_IGNORED` - Add `override` keyword to `at::namespace::tunable::StreamTimer` and `LLVMCodeGenImpl` Pull Request resolved: https://github.com/pytorch/pytorch/pull/131524 Approved by: https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
83d19620f6
commit
62e566b345
@ -1032,10 +1032,6 @@ if(NOT MSVC)
|
|||||||
|
|
||||||
append_cxx_flag_if_supported("-Wno-error=pedantic" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-error=pedantic" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-error=old-style-cast" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wno-error=old-style-cast" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-error=inconsistent-missing-override"
|
|
||||||
CMAKE_CXX_FLAGS)
|
|
||||||
append_cxx_flag_if_supported(
|
|
||||||
"-Wno-error=inconsistent-missing-destructor-override" CMAKE_CXX_FLAGS)
|
|
||||||
append_cxx_flag_if_supported("-Wconstant-conversion" CMAKE_CXX_FLAGS)
|
append_cxx_flag_if_supported("-Wconstant-conversion" CMAKE_CXX_FLAGS)
|
||||||
append_cxx_flag_if_supported("-Wno-invalid-partial-specialization"
|
append_cxx_flag_if_supported("-Wno-invalid-partial-specialization"
|
||||||
CMAKE_CXX_FLAGS)
|
CMAKE_CXX_FLAGS)
|
||||||
|
@ -18,7 +18,7 @@ namespace at::cuda::tunable {
|
|||||||
class StreamTimer : public ITimer {
|
class StreamTimer : public ITimer {
|
||||||
public:
|
public:
|
||||||
StreamTimer();
|
StreamTimer();
|
||||||
virtual ~StreamTimer();
|
virtual ~StreamTimer() override;
|
||||||
|
|
||||||
void Start() override;
|
void Start() override;
|
||||||
|
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
|
|
||||||
#ifdef USE_FBGEMM
|
#ifdef USE_FBGEMM
|
||||||
#include <fbgemm/Fbgemm.h>
|
#include <fbgemm/Fbgemm.h>
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Winconsistent-missing-destructor-override")
|
||||||
#include <fbgemm/FbgemmFP16.h>
|
#include <fbgemm/FbgemmFP16.h>
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
#include <fbgemm/QuantUtils.h>
|
#include <fbgemm/QuantUtils.h>
|
||||||
|
|
||||||
// The struct for the packed weight matrix (PackBMatrix) and the corresponding
|
// The struct for the packed weight matrix (PackBMatrix) and the corresponding
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
#include "caffe2/utils/proto_wrap.h"
|
#include "caffe2/utils/proto_wrap.h"
|
||||||
|
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Winconsistent-missing-override")
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Winconsistent-missing-destructor-override")
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wsuggest-override")
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated-dynamic-exception-spec")
|
||||||
#include <google/protobuf/stubs/common.h>
|
#include <google/protobuf/stubs/common.h>
|
||||||
#include <google/protobuf/generated_message_util.h>
|
#include <google/protobuf/generated_message_util.h>
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
|
||||||
namespace ONNX_NAMESPACE {
|
namespace ONNX_NAMESPACE {
|
||||||
|
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED(
|
||||||
|
"-Winconsistent-missing-destructor-override")
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wsuggest-override")
|
||||||
|
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED(
|
||||||
|
"-Wdeprecated-dynamic-exception-spec")
|
||||||
#include <onnx/onnx_pb.h>
|
#include <onnx/onnx_pb.h>
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
|
C10_DIAGNOSTIC_POP()
|
||||||
#include <torch/csrc/jit/ir/ir.h>
|
#include <torch/csrc/jit/ir/ir.h>
|
||||||
|
|
||||||
namespace torch::jit {
|
namespace torch::jit {
|
||||||
|
@ -309,7 +309,7 @@ class LLVMCodeGenImpl : public IRVisitor {
|
|||||||
std::optional<std::string> triple,
|
std::optional<std::string> triple,
|
||||||
std::optional<std::string> cpu,
|
std::optional<std::string> cpu,
|
||||||
std::optional<std::string> attrs);
|
std::optional<std::string> attrs);
|
||||||
~LLVMCodeGenImpl() = default;
|
~LLVMCodeGenImpl() override = default;
|
||||||
|
|
||||||
llvm::JITTargetAddress getKernelAddress() const;
|
llvm::JITTargetAddress getKernelAddress() const;
|
||||||
std::unique_ptr<llvm::orc::PytorchLLVMJIT> releaseJIT();
|
std::unique_ptr<llvm::orc::PytorchLLVMJIT> releaseJIT();
|
||||||
|
Reference in New Issue
Block a user