diff --git a/aten/src/ATen/core/DeprecatedTypePropertiesRegistry.h b/aten/src/ATen/core/DeprecatedTypePropertiesRegistry.h index a21f1abbe97f..63f9da6d8b70 100644 --- a/aten/src/ATen/core/DeprecatedTypePropertiesRegistry.h +++ b/aten/src/ATen/core/DeprecatedTypePropertiesRegistry.h @@ -5,6 +5,7 @@ #include #include +#include namespace at { diff --git a/aten/src/ATen/core/TensorBase.h b/aten/src/ATen/core/TensorBase.h index effcc9289ed1..af55eff20836 100644 --- a/aten/src/ATen/core/TensorBase.h +++ b/aten/src/ATen/core/TensorBase.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/aten/src/ATen/core/boxing/KernelFunction_impl.h b/aten/src/ATen/core/boxing/KernelFunction_impl.h index 77fa0f0e1bba..0d6149c8090a 100644 --- a/aten/src/ATen/core/boxing/KernelFunction_impl.h +++ b/aten/src/ATen/core/boxing/KernelFunction_impl.h @@ -3,6 +3,7 @@ #include #include +#include #include namespace c10 { diff --git a/aten/src/ATen/cuda/cub.cuh b/aten/src/ATen/cuda/cub.cuh index 9663f354f764..062c365a4e1a 100644 --- a/aten/src/ATen/cuda/cub.cuh +++ b/aten/src/ATen/cuda/cub.cuh @@ -6,8 +6,6 @@ #include #include -#include - #include #if USE_GLOBAL_CUB_WRAPPED_NAMESPACE() diff --git a/c10/util/C++17.h b/c10/util/C++17.h index ab3f1beee7d7..b1bfe63ff952 100644 --- a/c10/util/C++17.h +++ b/c10/util/C++17.h @@ -8,17 +8,6 @@ #include #include -#if !defined(__clang__) && !defined(_MSC_VER) && defined(__GNUC__) && \ - __GNUC__ < 5 -#error \ - "You're trying to build PyTorch with a too old version of GCC. We need GCC 5 or later." -#endif - -#if defined(__clang__) && __clang_major__ < 4 -#error \ - "You're trying to build PyTorch with a too old version of Clang. We need Clang 4 or later." -#endif - #if (defined(_MSC_VER) && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)) || \ (!defined(_MSC_VER) && __cplusplus < 201703L) #error You need C++17 to compile PyTorch diff --git a/c10/util/Float8_e4m3fn.h b/c10/util/Float8_e4m3fn.h index bb6c0be9d076..a952b8330e73 100644 --- a/c10/util/Float8_e4m3fn.h +++ b/c10/util/Float8_e4m3fn.h @@ -15,7 +15,6 @@ /// and inspired by Half implementation from pytorch/c10/util/Half.h #include -#include #include #include #include diff --git a/c10/util/Float8_e4m3fnuz.h b/c10/util/Float8_e4m3fnuz.h index 6e066a5240f8..e51630d1bd71 100644 --- a/c10/util/Float8_e4m3fnuz.h +++ b/c10/util/Float8_e4m3fnuz.h @@ -18,7 +18,6 @@ /// the existing Float8_e4m3fn implementation. #include -#include #include #include #include diff --git a/c10/util/Float8_e5m2fnuz.h b/c10/util/Float8_e5m2fnuz.h index 5418705737c6..f43a912c01bd 100644 --- a/c10/util/Float8_e5m2fnuz.h +++ b/c10/util/Float8_e5m2fnuz.h @@ -18,7 +18,6 @@ /// the existing Float8_e4m3fn implementation. #include -#include #include #include diff --git a/c10/util/TypeList.h b/c10/util/TypeList.h index f1422e99e4d8..a540a0c5c674 100644 --- a/c10/util/TypeList.h +++ b/c10/util/TypeList.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include @@ -501,10 +500,8 @@ struct map_types_to_values final { template struct map_types_to_values> final { template - static std::tuple>...> call( - Func&& func) { - return std::tuple>...>{ - std::forward(func)(type_())...}; + static auto call(Func&& func) { + return std::tuple{std::forward(func)(type_())...}; } }; } // namespace detail diff --git a/torch/csrc/jit/frontend/lexer.h b/torch/csrc/jit/frontend/lexer.h index 5ab926993c1f..ff59fa98ee7c 100644 --- a/torch/csrc/jit/frontend/lexer.h +++ b/torch/csrc/jit/frontend/lexer.h @@ -1,6 +1,5 @@ #pragma once #include -#include #include #include #include