From f71d302c6377be5496a9c501c4c6c86aed56bcef Mon Sep 17 00:00:00 2001 From: PyTorch MergeBot Date: Thu, 21 Dec 2023 14:43:07 +0000 Subject: [PATCH] Revert "[Easy][BE]: Enable clang-tidy check for duplicate includes (#116193)" This reverts commit 71cb13869b4eced76589f47e26bd64cdc2d54aa2. Reverted https://github.com/pytorch/pytorch/pull/116193 on behalf of https://github.com/jeanschmidt due to Breaking internal test (bolt_nn_espresso_operator_test_eureka-scheduler) and job (build-rdk-diff-windows-debug-cuda11) @malfet and @albanD, please help the author get this PR merged by providing more information ([comment](https://github.com/pytorch/pytorch/pull/116193#issuecomment-1866391726)) --- .clang-tidy | 1 - aten/src/ATen/core/interned_strings.cpp | 1 + torch/csrc/Dtype.cpp | 2 ++ torch/csrc/Module.cpp | 1 + torch/csrc/Size.cpp | 1 + torch/csrc/utils/python_dispatch.cpp | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index ae6fb3e30e36e..1abd49de546a6 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -53,7 +53,6 @@ modernize-*, performance-*, readability-container-size-empty, readability-delete-null-pointer, -readability-duplicate-include readability-string-compare, ' HeaderFilterRegex: '^(aten/|c10/|torch/).*$' diff --git a/aten/src/ATen/core/interned_strings.cpp b/aten/src/ATen/core/interned_strings.cpp index 177ab51fffbbc..93239a9507c9c 100644 --- a/aten/src/ATen/core/interned_strings.cpp +++ b/aten/src/ATen/core/interned_strings.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace c10 { diff --git a/torch/csrc/Dtype.cpp b/torch/csrc/Dtype.cpp index 8eee2a02faec5..d8110c5eafe8a 100644 --- a/torch/csrc/Dtype.cpp +++ b/torch/csrc/Dtype.cpp @@ -11,6 +11,8 @@ #include #include +#include + PyObject* THPDtype_New(at::ScalarType scalar_type, const std::string& name) { HANDLE_TH_ERRORS AT_ASSERT(name.length() < DTYPE_NAME_LEN); diff --git a/torch/csrc/Module.cpp b/torch/csrc/Module.cpp index b738e64619ab2..bd69351bc16b7 100644 --- a/torch/csrc/Module.cpp +++ b/torch/csrc/Module.cpp @@ -87,6 +87,7 @@ #include #include +#include #include #include #ifdef USE_CUDA diff --git a/torch/csrc/Size.cpp b/torch/csrc/Size.cpp index 0e739c7f6a32a..a13d512e4013a 100644 --- a/torch/csrc/Size.cpp +++ b/torch/csrc/Size.cpp @@ -12,6 +12,7 @@ #include #include +#include struct THPSize { PyTupleObject tuple; diff --git a/torch/csrc/utils/python_dispatch.cpp b/torch/csrc/utils/python_dispatch.cpp index 3908bbe15825f..c887c822334bc 100644 --- a/torch/csrc/utils/python_dispatch.cpp +++ b/torch/csrc/utils/python_dispatch.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include