mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Revert "add override to Caffe2 (#103795)"
This reverts commit f5f020adb0.
Reverted https://github.com/pytorch/pytorch/pull/103795 on behalf of https://github.com/osalpekar due to Caused some breakages due to jobs using `-Winconsistent-missing-destructor-override` detecting inconsistent usage of override. Specifically the Tensor class destructor not being marked with override ([comment](https://github.com/pytorch/pytorch/pull/103795#issuecomment-1601812803))
This commit is contained in:
parent
13664bb535
commit
626d8548df
10 changed files with 15 additions and 15 deletions
|
|
@ -168,7 +168,7 @@ class TORCH_API Tensor : public NeuralNetData {
|
|||
return D->getKind() == NNDataKind::Tensor;
|
||||
}
|
||||
|
||||
NeuralNetData* clone() override {
|
||||
NeuralNetData* clone() {
|
||||
return new Tensor(name_);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,20 +23,20 @@ class IDEEPContext final : public BaseContext {
|
|||
|
||||
~IDEEPContext() noexcept override {}
|
||||
|
||||
inline void SwitchToDevice(int64_t /*stream_id*/) override {}
|
||||
inline void SwitchToDevice(int64_t /*stream_id*/) {}
|
||||
using BaseContext::SwitchToDevice;
|
||||
|
||||
inline void WaitEvent(const Event& ev) override {
|
||||
inline void WaitEvent(const Event& ev) {
|
||||
ev.Wait(IDEEP, this);
|
||||
}
|
||||
|
||||
inline void Record(Event* ev, const char* err_msg = nullptr) const override {
|
||||
inline void Record(Event* ev, const char* err_msg = nullptr) const {
|
||||
CAFFE_ENFORCE(ev, "Event must not be null.");
|
||||
ev->Record(IDEEP, this, err_msg);
|
||||
}
|
||||
|
||||
|
||||
inline void FinishDeviceComputation() override {}
|
||||
inline void FinishDeviceComputation() {}
|
||||
|
||||
inline rand_gen_type& RandGenerator() {
|
||||
if (!random_generator_.get()) {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class BatchPermutationOp final : public Operator<Context> {
|
|||
: Operator<Context>(std::forward<Args>(args)...) {}
|
||||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
|
||||
bool RunOnDevice() override;
|
||||
bool RunOnDevice();
|
||||
};
|
||||
|
||||
template <typename T, class Context>
|
||||
|
|
@ -29,7 +29,7 @@ class BatchPermutationGradientOp final : public Operator<Context> {
|
|||
: Operator<Context>(def, ws) {}
|
||||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
|
||||
bool RunOnDevice() override;
|
||||
bool RunOnDevice();
|
||||
};
|
||||
|
||||
} // namespace caffe2
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class BatchDenseToSparseOp : public Operator<Context> {
|
|||
template <class... Args>
|
||||
explicit BatchDenseToSparseOp(Args&&... args)
|
||||
: Operator<Context>(std::forward<Args>(args)...) {}
|
||||
bool RunOnDevice() override{
|
||||
bool RunOnDevice() {
|
||||
return DispatchHelper<TensorTypes<int32_t, int64_t>>::call(
|
||||
this, Input(LENGTHS));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class FindOp final : public Operator<Context> {
|
|||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
USE_DISPATCH_HELPER;
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
return DispatchHelper<TensorTypes<int, long>>::call(this, Input(0));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class GluOp final : public Operator<Context> {
|
|||
|
||||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
auto& X = Input(0);
|
||||
|
||||
vector<int64_t> Yshape;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class InstanceNormOp final : public Operator<Context> {
|
|||
"order should be either \"NCHW\" or \"NHWC\".");
|
||||
}
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
const auto& X = Input(INPUT);
|
||||
const auto& gamma = Input(SCALE);
|
||||
const auto& beta = Input(BIAS);
|
||||
|
|
@ -144,7 +144,7 @@ class InstanceNormGradientOp final : public Operator<Context> {
|
|||
"order should be either \"NCHW\" or \"NHWC\".");
|
||||
}
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
const auto& X = Input(INPUT);
|
||||
const auto& gamma = Input(SCALE);
|
||||
const auto& dY = Input(OUTPUT_GRAD);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class ONNXWhileOp final : public Operator<Context> {
|
|||
|
||||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
return DispatchHelper<TensorTypes<int, bool, long>>::call(this, Input(1));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class PackSegmentsOp final : public Operator<Context> {
|
|||
}
|
||||
}
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
return DispatchHelper<TensorTypes<int, long>>::call(this, Input(LENGTHS));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class MaxReduceDimsOp final : public Operator<Context> {
|
|||
|
||||
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
||||
|
||||
bool RunOnDevice() override {
|
||||
bool RunOnDevice() {
|
||||
auto& X = Input(0);
|
||||
|
||||
CAFFE_ENFORCE(
|
||||
|
|
|
|||
Loading…
Reference in a new issue