From 4ca40aeb83db53424b6f5ec3820019f79c15df46 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Mon, 13 Sep 2021 10:53:06 -0700 Subject: [PATCH] Disable more of the pragma warning stuff (#64899) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64899 ghstack-source-id: 137882055 Test Plan: sandcastle, ossci Reviewed By: malfet, ngimel Differential Revision: D30893691 fbshipit-source-id: 67ec8cc9f212aa16a201771603236e429944b561 --- aten/src/ATen/core/TensorBase.h | 6 ------ aten/src/ATen/templates/TensorBody.h | 13 ++----------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/aten/src/ATen/core/TensorBase.h b/aten/src/ATen/core/TensorBase.h index e91e9e1..352aef9 100644 --- a/aten/src/ATen/core/TensorBase.h +++ b/aten/src/ATen/core/TensorBase.h @@ -755,12 +755,6 @@ private: TensorBase __dispatch_contiguous(c10::MemoryFormat) const; }; -// For "multiple ... operators specified" warnings, closing brace of class -// declaration must be included between pragma push & pop -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - inline int64_t get_device(const TensorBase& self) { return self.get_device(); } diff --git a/aten/src/ATen/templates/TensorBody.h b/aten/src/ATen/templates/TensorBody.h index eb6402f..a8d1b7a 100644 --- a/aten/src/ATen/templates/TensorBody.h +++ b/aten/src/ATen/templates/TensorBody.h @@ -167,11 +167,8 @@ class TORCH_API Tensor: public TensorBase { // Also MSVC will wrongly issue the following warning with the aforementioned fix // warning C4522: 'at::Tensor': multiple assignment operators specified // Let's just skip the warning. - - #ifdef _MSC_VER - #pragma warning( push ) - #pragma warning( disable : 4522 ) - #endif + // + // TODO: temporarily disabled Tensor& operator=(const TensorBase& x) & { impl_ = x.getIntrusivePtr(); @@ -560,12 +557,6 @@ class TORCH_API Tensor: public TensorBase { } }; -// For "multiple ... operators specified" warnings, closing brace of class -// declaration must be included between pragma push & pop -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - namespace detail { // Helper creator for Tensor class which doesn't requires the users to pass // in an intrusive_ptr instead it just converts the argument passed to -- 2.7.4