From 60936e4c296e79f56cac2431a560970bb4529d03 Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Thu, 17 Aug 2023 19:17:33 +0100 Subject: [PATCH] Remove some unnecessary includes from headers (#106914) In almost all cases this is only included for writing the output formatter, which only uses `std::ostream` so including `` is sufficient. The istream header is ~1000 lines so the difference is non-trivial. Pull Request resolved: https://github.com/pytorch/pytorch/pull/106914 Approved by: https://github.com/lezcano --- .github/ci_commit_pins/xla.txt | 2 +- aten/src/ATen/DLConvertor.cpp | 3 --- aten/src/ATen/autocast_mode.cpp | 1 - aten/src/ATen/core/Range.cpp | 2 +- aten/src/ATen/core/dispatch/Dispatcher.h | 4 ++++ aten/src/ATen/core/function_schema_inl.h | 3 ++- aten/src/ATen/core/interned_strings.cpp | 1 - aten/src/ATen/core/union_type.cpp | 3 ++- aten/src/ATen/cpu/vec/vec256/vec256_int.h | 1 - aten/src/ATen/cpu/vec/vec256/vec256_qint.h | 1 - aten/src/ATen/cpu/vec/vec512/vec512.h | 2 +- aten/src/ATen/functorch/TensorWrapper.cpp | 2 ++ c10/util/logging_is_not_google_glog.h | 2 +- functorch/csrc/dim/minpybind.h | 2 +- torch/csrc/Module.cpp | 1 + torch/csrc/dynamo/compiled_autograd.h | 1 - torch/csrc/functorch/init.cpp | 2 ++ torch/csrc/jit/api/module.cpp | 2 ++ torch/csrc/jit/codegen/fuser/codegen.h | 2 -- torch/csrc/jit/codegen/fuser/tensor_desc.h | 2 +- torch/csrc/jit/frontend/concrete_module_type.cpp | 2 ++ torch/csrc/jit/frontend/source_range.h | 3 ++- torch/csrc/jit/frontend/tracer.h | 1 - torch/csrc/jit/ir/alias_analysis.cpp | 1 + torch/csrc/jit/ir/ir.h | 2 +- torch/csrc/jit/jit_log.cpp | 1 + torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h | 1 - torch/csrc/jit/mobile/register_ops_common_utils.h | 2 -- torch/csrc/jit/operator_upgraders/upgraders.h | 1 - torch/csrc/jit/operator_upgraders/upgraders_entry.h | 3 --- torch/csrc/jit/operator_upgraders/utils.h | 2 -- torch/csrc/jit/passes/liveness.cpp | 1 + .../jit/passes/onnx/pattern_conversion/pattern_conversion.cpp | 2 ++ torch/csrc/jit/passes/remove_inplace_ops.cpp | 1 + torch/csrc/jit/runtime/argument_spec.cpp | 2 ++ torch/csrc/jit/runtime/argument_spec.h | 2 +- torch/csrc/jit/runtime/print_handler.cpp | 1 + torch/csrc/jit/runtime/print_handler.h | 4 +--- torch/csrc/jit/runtime/static/impl.cpp | 1 + torch/csrc/jit/serialization/python_print.h | 1 - torch/csrc/jit/tensorexpr/bounds_inference.cpp | 2 ++ torch/csrc/jit/tensorexpr/bounds_overlap.cpp | 2 ++ torch/csrc/jit/tensorexpr/ir_printer.cpp | 2 ++ torch/csrc/jit/tensorexpr/ir_printer.h | 2 +- torch/csrc/jit/tensorexpr/ir_verifier.h | 2 -- torch/csrc/jit/tensorexpr/loopnest.cpp | 1 + torch/csrc/jit/tensorexpr/loopnest_randomization.cpp | 1 + torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp | 1 + torch/csrc/jit/tensorexpr/registerizer.cpp | 1 + torch/csrc/jit/tensorexpr/types.h | 2 +- torch/csrc/lazy/core/debug_util.h | 1 - torch/csrc/profiler/unwind/action.h | 2 +- torch/csrc/profiler/unwind/eh_frame_hdr.h | 2 +- torch/csrc/profiler/unwind/unwinder.h | 1 - torch/csrc/utils/throughput_benchmark.h | 2 +- torch/custom_class.h | 1 - torch/lib/libshm/socket.h | 2 -- 57 files changed, 53 insertions(+), 47 deletions(-) diff --git a/.github/ci_commit_pins/xla.txt b/.github/ci_commit_pins/xla.txt index c84777ca1e690e..509cbb61824cc1 100644 --- a/.github/ci_commit_pins/xla.txt +++ b/.github/ci_commit_pins/xla.txt @@ -1 +1 @@ -709c75a04d9b35d83a9509e1534a8aa2046b8912 +c3c16ccac41cb2db6ba88fb31342f4af62c7e15a diff --git a/aten/src/ATen/DLConvertor.cpp b/aten/src/ATen/DLConvertor.cpp index 57b9ce050eecf6..f940170639abb4 100644 --- a/aten/src/ATen/DLConvertor.cpp +++ b/aten/src/ATen/DLConvertor.cpp @@ -1,9 +1,6 @@ #include #include -#include -#include - using namespace std; namespace at { diff --git a/aten/src/ATen/autocast_mode.cpp b/aten/src/ATen/autocast_mode.cpp index da09e1f6c0c652..bb4bad9f578793 100644 --- a/aten/src/ATen/autocast_mode.cpp +++ b/aten/src/ATen/autocast_mode.cpp @@ -1,6 +1,5 @@ #include -#include #include #include #include diff --git a/aten/src/ATen/core/Range.cpp b/aten/src/ATen/core/Range.cpp index bed964f6809fe9..06a79a9c7d0637 100644 --- a/aten/src/ATen/core/Range.cpp +++ b/aten/src/ATen/core/Range.cpp @@ -1,6 +1,6 @@ #include -#include +#include namespace at { diff --git a/aten/src/ATen/core/dispatch/Dispatcher.h b/aten/src/ATen/core/dispatch/Dispatcher.h index b794f37404b0fc..4ca8f08ceed7dc 100644 --- a/aten/src/ATen/core/dispatch/Dispatcher.h +++ b/aten/src/ATen/core/dispatch/Dispatcher.h @@ -18,6 +18,10 @@ #include #include +#ifndef NDEBUG +#include +#endif + namespace c10 { TORCH_API bool show_dispatch_trace(); diff --git a/aten/src/ATen/core/function_schema_inl.h b/aten/src/ATen/core/function_schema_inl.h index 3daefc1de2e5a5..a6959c661af155 100644 --- a/aten/src/ATen/core/function_schema_inl.h +++ b/aten/src/ATen/core/function_schema_inl.h @@ -1,5 +1,6 @@ #pragma once -#include +#include +#include // note: windows build doesn't find symbols in operator files unless // this is a header file diff --git a/aten/src/ATen/core/interned_strings.cpp b/aten/src/ATen/core/interned_strings.cpp index ff9361f462a1ab..2457b45c1a3712 100644 --- a/aten/src/ATen/core/interned_strings.cpp +++ b/aten/src/ATen/core/interned_strings.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include diff --git a/aten/src/ATen/core/union_type.cpp b/aten/src/ATen/core/union_type.cpp index fee0d8b4bcc38d..1bffd7b076374e 100644 --- a/aten/src/ATen/core/union_type.cpp +++ b/aten/src/ATen/core/union_type.cpp @@ -7,7 +7,8 @@ #include #include #include -#include +#include +#include #include namespace c10 { diff --git a/aten/src/ATen/cpu/vec/vec256/vec256_int.h b/aten/src/ATen/cpu/vec/vec256/vec256_int.h index de543651a0540d..ade140ecc93f6b 100644 --- a/aten/src/ATen/cpu/vec/vec256/vec256_int.h +++ b/aten/src/ATen/cpu/vec/vec256/vec256_int.h @@ -7,7 +7,6 @@ #include #include #include -#include namespace at { namespace vec { diff --git a/aten/src/ATen/cpu/vec/vec256/vec256_qint.h b/aten/src/ATen/cpu/vec/vec256/vec256_qint.h index 58068953c81ac4..c153da26072b07 100644 --- a/aten/src/ATen/cpu/vec/vec256/vec256_qint.h +++ b/aten/src/ATen/cpu/vec/vec256/vec256_qint.h @@ -14,7 +14,6 @@ #include #include -#include // This file defines Vectorized<> for the quantized types. // diff --git a/aten/src/ATen/cpu/vec/vec512/vec512.h b/aten/src/ATen/cpu/vec/vec512/vec512.h index 6ac1d841873682..88deea313a200a 100644 --- a/aten/src/ATen/cpu/vec/vec512/vec512.h +++ b/aten/src/ATen/cpu/vec/vec512/vec512.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace at { namespace vec { diff --git a/aten/src/ATen/functorch/TensorWrapper.cpp b/aten/src/ATen/functorch/TensorWrapper.cpp index 6d0f7f8aef93a3..a8411570801db0 100644 --- a/aten/src/ATen/functorch/TensorWrapper.cpp +++ b/aten/src/ATen/functorch/TensorWrapper.cpp @@ -11,6 +11,8 @@ #include #include +#include + namespace at { namespace functorch { diff --git a/c10/util/logging_is_not_google_glog.h b/c10/util/logging_is_not_google_glog.h index d92f163453e93e..3b1b869756eb57 100644 --- a/c10/util/logging_is_not_google_glog.h +++ b/c10/util/logging_is_not_google_glog.h @@ -4,9 +4,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/functorch/csrc/dim/minpybind.h b/functorch/csrc/dim/minpybind.h index f4a0c65595db7c..de82b5af95a437 100644 --- a/functorch/csrc/dim/minpybind.h +++ b/functorch/csrc/dim/minpybind.h @@ -8,7 +8,7 @@ #define PY_SSIZE_T_CLEAN #include #include -#include +#include #include #define PY_BEGIN try { diff --git a/torch/csrc/Module.cpp b/torch/csrc/Module.cpp index 0511f599ddb143..e628cc3867c5d4 100644 --- a/torch/csrc/Module.cpp +++ b/torch/csrc/Module.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/torch/csrc/dynamo/compiled_autograd.h b/torch/csrc/dynamo/compiled_autograd.h index e9d5117711c54c..24d49260c7dc4b 100644 --- a/torch/csrc/dynamo/compiled_autograd.h +++ b/torch/csrc/dynamo/compiled_autograd.h @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/torch/csrc/functorch/init.cpp b/torch/csrc/functorch/init.cpp index 6acd309771d66c..a94801cf7ac4f7 100644 --- a/torch/csrc/functorch/init.cpp +++ b/torch/csrc/functorch/init.cpp @@ -18,6 +18,8 @@ #include #include +#include + // This file contains functorch's Python bindings. namespace torch { diff --git a/torch/csrc/jit/api/module.cpp b/torch/csrc/jit/api/module.cpp index 8a396602f74e01..19f67e2f54d115 100644 --- a/torch/csrc/jit/api/module.cpp +++ b/torch/csrc/jit/api/module.cpp @@ -19,6 +19,8 @@ #include #include +#include + namespace torch::jit { namespace { diff --git a/torch/csrc/jit/codegen/fuser/codegen.h b/torch/csrc/jit/codegen/fuser/codegen.h index 2b96264549ff60..fc0b34e55fe7ed 100644 --- a/torch/csrc/jit/codegen/fuser/codegen.h +++ b/torch/csrc/jit/codegen/fuser/codegen.h @@ -6,9 +6,7 @@ #include #include -#include #include -#include #include namespace torch { diff --git a/torch/csrc/jit/codegen/fuser/tensor_desc.h b/torch/csrc/jit/codegen/fuser/tensor_desc.h index 65f456e27ad542..ffc405244a71ef 100644 --- a/torch/csrc/jit/codegen/fuser/tensor_desc.h +++ b/torch/csrc/jit/codegen/fuser/tensor_desc.h @@ -7,7 +7,7 @@ #include #include -#include +#include #include namespace torch { diff --git a/torch/csrc/jit/frontend/concrete_module_type.cpp b/torch/csrc/jit/frontend/concrete_module_type.cpp index 5e6aeb306a4d60..b18917d0dc01f9 100644 --- a/torch/csrc/jit/frontend/concrete_module_type.cpp +++ b/torch/csrc/jit/frontend/concrete_module_type.cpp @@ -3,6 +3,8 @@ #include #include +#include + namespace torch::jit { ClassTypePtr ConcreteModuleTypeBuilder::createTypeFromThis() const { diff --git a/torch/csrc/jit/frontend/source_range.h b/torch/csrc/jit/frontend/source_range.h index d278d1ab2cb352..2e544e189dd73d 100644 --- a/torch/csrc/jit/frontend/source_range.h +++ b/torch/csrc/jit/frontend/source_range.h @@ -3,10 +3,11 @@ #include #include -#include #include #include #include +#include +#include #include namespace torch { diff --git a/torch/csrc/jit/frontend/tracer.h b/torch/csrc/jit/frontend/tracer.h index 7c355857e5b1cb..97cdbb237c641a 100644 --- a/torch/csrc/jit/frontend/tracer.h +++ b/torch/csrc/jit/frontend/tracer.h @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/torch/csrc/jit/ir/alias_analysis.cpp b/torch/csrc/jit/ir/alias_analysis.cpp index 87031ec5867fb1..f49dc2c40d09ca 100644 --- a/torch/csrc/jit/ir/alias_analysis.cpp +++ b/torch/csrc/jit/ir/alias_analysis.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace torch::jit { diff --git a/torch/csrc/jit/ir/ir.h b/torch/csrc/jit/ir/ir.h index 91da53c0daeeb5..ad8f081c23ba5d 100644 --- a/torch/csrc/jit/ir/ir.h +++ b/torch/csrc/jit/ir/ir.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/torch/csrc/jit/jit_log.cpp b/torch/csrc/jit/jit_log.cpp index d520ee2fa7ec4b..716efb7b0c28e7 100644 --- a/torch/csrc/jit/jit_log.cpp +++ b/torch/csrc/jit/jit_log.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h b/torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h index 403d336534f1b8..b6abe86c0fdca7 100644 --- a/torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h +++ b/torch/csrc/jit/mobile/model_tracer/MobileModelRunner.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/torch/csrc/jit/mobile/register_ops_common_utils.h b/torch/csrc/jit/mobile/register_ops_common_utils.h index c9e40ff7268c28..b0ecaf055f5ee3 100644 --- a/torch/csrc/jit/mobile/register_ops_common_utils.h +++ b/torch/csrc/jit/mobile/register_ops_common_utils.h @@ -7,8 +7,6 @@ #include #include -#include - namespace torch { namespace jit { diff --git a/torch/csrc/jit/operator_upgraders/upgraders.h b/torch/csrc/jit/operator_upgraders/upgraders.h index a6c4b81b15f55a..e84602160f5876 100644 --- a/torch/csrc/jit/operator_upgraders/upgraders.h +++ b/torch/csrc/jit/operator_upgraders/upgraders.h @@ -1,7 +1,6 @@ #pragma once #include #include -#include #include #include #include diff --git a/torch/csrc/jit/operator_upgraders/upgraders_entry.h b/torch/csrc/jit/operator_upgraders/upgraders_entry.h index e29f854a5028bb..e732ca21d04621 100644 --- a/torch/csrc/jit/operator_upgraders/upgraders_entry.h +++ b/torch/csrc/jit/operator_upgraders/upgraders_entry.h @@ -1,11 +1,8 @@ #pragma once #include #include -#include -#include #include #include -#include namespace torch { namespace jit { diff --git a/torch/csrc/jit/operator_upgraders/utils.h b/torch/csrc/jit/operator_upgraders/utils.h index 98550330d08613..ddf6e817b5d090 100644 --- a/torch/csrc/jit/operator_upgraders/utils.h +++ b/torch/csrc/jit/operator_upgraders/utils.h @@ -2,8 +2,6 @@ #include #include #include -#include -#include #include #include diff --git a/torch/csrc/jit/passes/liveness.cpp b/torch/csrc/jit/passes/liveness.cpp index 2aed7cbe3aab0a..7aa6ac045749a8 100644 --- a/torch/csrc/jit/passes/liveness.cpp +++ b/torch/csrc/jit/passes/liveness.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace torch { diff --git a/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_conversion.cpp b/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_conversion.cpp index 25b97ef908ec16..a1a3d8356d1d02 100644 --- a/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_conversion.cpp +++ b/torch/csrc/jit/passes/onnx/pattern_conversion/pattern_conversion.cpp @@ -7,6 +7,8 @@ #include +#include + // EDITING THIS FILE? READ THIS FIRST! // see Note [Edit Pattern Conversion] in pattern_conversion.h diff --git a/torch/csrc/jit/passes/remove_inplace_ops.cpp b/torch/csrc/jit/passes/remove_inplace_ops.cpp index 2c58c5089686a8..cf93fd8a24d0af 100644 --- a/torch/csrc/jit/passes/remove_inplace_ops.cpp +++ b/torch/csrc/jit/passes/remove_inplace_ops.cpp @@ -1,4 +1,5 @@ #include +#include namespace torch { namespace jit { diff --git a/torch/csrc/jit/runtime/argument_spec.cpp b/torch/csrc/jit/runtime/argument_spec.cpp index 48db6ac397875f..2b04ec31864819 100644 --- a/torch/csrc/jit/runtime/argument_spec.cpp +++ b/torch/csrc/jit/runtime/argument_spec.cpp @@ -1,6 +1,8 @@ #include #include +#include + namespace torch { namespace jit { diff --git a/torch/csrc/jit/runtime/argument_spec.h b/torch/csrc/jit/runtime/argument_spec.h index b73b136bca5cc0..02b443eb4e451b 100644 --- a/torch/csrc/jit/runtime/argument_spec.h +++ b/torch/csrc/jit/runtime/argument_spec.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include C10_CLANG_DIAGNOSTIC_PUSH() diff --git a/torch/csrc/jit/runtime/print_handler.cpp b/torch/csrc/jit/runtime/print_handler.cpp index 9452589f9e390c..8288b93a6bb451 100644 --- a/torch/csrc/jit/runtime/print_handler.cpp +++ b/torch/csrc/jit/runtime/print_handler.cpp @@ -1,5 +1,6 @@ #include +#include #include #include diff --git a/torch/csrc/jit/runtime/print_handler.h b/torch/csrc/jit/runtime/print_handler.h index 2f1f3ee92e0697..ba1da4f22ed261 100644 --- a/torch/csrc/jit/runtime/print_handler.h +++ b/torch/csrc/jit/runtime/print_handler.h @@ -2,9 +2,7 @@ #include -#include -#include -#include +#include namespace torch { namespace jit { diff --git a/torch/csrc/jit/runtime/static/impl.cpp b/torch/csrc/jit/runtime/static/impl.cpp index e770b971992fb9..08e864386aa9db 100644 --- a/torch/csrc/jit/runtime/static/impl.cpp +++ b/torch/csrc/jit/runtime/static/impl.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #ifndef AT_PER_OPERATOR_HEADERS #include diff --git a/torch/csrc/jit/serialization/python_print.h b/torch/csrc/jit/serialization/python_print.h index 94fb83d7aab774..dd9f3d4e06507a 100644 --- a/torch/csrc/jit/serialization/python_print.h +++ b/torch/csrc/jit/serialization/python_print.h @@ -2,7 +2,6 @@ #include #include #include -#include #include namespace torch { diff --git a/torch/csrc/jit/tensorexpr/bounds_inference.cpp b/torch/csrc/jit/tensorexpr/bounds_inference.cpp index 360818bbae7426..fe4a26662db677 100644 --- a/torch/csrc/jit/tensorexpr/bounds_inference.cpp +++ b/torch/csrc/jit/tensorexpr/bounds_inference.cpp @@ -10,6 +10,8 @@ #include +#include + namespace torch::jit::tensorexpr { using namespace analysis; diff --git a/torch/csrc/jit/tensorexpr/bounds_overlap.cpp b/torch/csrc/jit/tensorexpr/bounds_overlap.cpp index ef24566f8a42e2..dbcdfd10ee5fde 100644 --- a/torch/csrc/jit/tensorexpr/bounds_overlap.cpp +++ b/torch/csrc/jit/tensorexpr/bounds_overlap.cpp @@ -3,6 +3,8 @@ #include #include +#include + namespace torch::jit::tensorexpr::analysis { // Returns true if the given expression is guaranteed to be positive. diff --git a/torch/csrc/jit/tensorexpr/ir_printer.cpp b/torch/csrc/jit/tensorexpr/ir_printer.cpp index 5ed247b6881a2e..fc9e8116072c3c 100644 --- a/torch/csrc/jit/tensorexpr/ir_printer.cpp +++ b/torch/csrc/jit/tensorexpr/ir_printer.cpp @@ -6,6 +6,8 @@ #include +#include + namespace torch::jit::tensorexpr { std::string IRPrinter::dtypeToCppString(const Dtype& dtype) { diff --git a/torch/csrc/jit/tensorexpr/ir_printer.h b/torch/csrc/jit/tensorexpr/ir_printer.h index 661d3a463d137e..8eff1abd1b2629 100644 --- a/torch/csrc/jit/tensorexpr/ir_printer.h +++ b/torch/csrc/jit/tensorexpr/ir_printer.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/torch/csrc/jit/tensorexpr/ir_verifier.h b/torch/csrc/jit/tensorexpr/ir_verifier.h index 90bca0eedeafb6..03b6d9a1f0cce4 100644 --- a/torch/csrc/jit/tensorexpr/ir_verifier.h +++ b/torch/csrc/jit/tensorexpr/ir_verifier.h @@ -1,7 +1,5 @@ #pragma once -#include - #include #include diff --git a/torch/csrc/jit/tensorexpr/loopnest.cpp b/torch/csrc/jit/tensorexpr/loopnest.cpp index e23c0285634dc2..1b08286fbd9f41 100644 --- a/torch/csrc/jit/tensorexpr/loopnest.cpp +++ b/torch/csrc/jit/tensorexpr/loopnest.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include #include diff --git a/torch/csrc/jit/tensorexpr/loopnest_randomization.cpp b/torch/csrc/jit/tensorexpr/loopnest_randomization.cpp index 80a9cb7203fcd8..110d4151a364c3 100644 --- a/torch/csrc/jit/tensorexpr/loopnest_randomization.cpp +++ b/torch/csrc/jit/tensorexpr/loopnest_randomization.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp b/torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp index 45025db8ca3f81..1d687a6c2b30e3 100644 --- a/torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp +++ b/torch/csrc/jit/tensorexpr/mem_dependency_checker.cpp @@ -3,6 +3,7 @@ #include #include +#include namespace torch::jit::tensorexpr::analysis { diff --git a/torch/csrc/jit/tensorexpr/registerizer.cpp b/torch/csrc/jit/tensorexpr/registerizer.cpp index caf325d732d78d..939f82c616dc90 100644 --- a/torch/csrc/jit/tensorexpr/registerizer.cpp +++ b/torch/csrc/jit/tensorexpr/registerizer.cpp @@ -1,4 +1,5 @@ #include +#include namespace torch::jit::tensorexpr { namespace registerizer { diff --git a/torch/csrc/jit/tensorexpr/types.h b/torch/csrc/jit/tensorexpr/types.h index e4c95424f67e21..ee1b8e213adb40 100644 --- a/torch/csrc/jit/tensorexpr/types.h +++ b/torch/csrc/jit/tensorexpr/types.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include diff --git a/torch/csrc/lazy/core/debug_util.h b/torch/csrc/lazy/core/debug_util.h index 50ba1dae8c9ed3..ef4b81e1ca9c5d 100644 --- a/torch/csrc/lazy/core/debug_util.h +++ b/torch/csrc/lazy/core/debug_util.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include diff --git a/torch/csrc/profiler/unwind/action.h b/torch/csrc/profiler/unwind/action.h index 6672625a3da338..e1ed407384fc90 100644 --- a/torch/csrc/profiler/unwind/action.h +++ b/torch/csrc/profiler/unwind/action.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include enum { A_UNDEFINED = 0x0, diff --git a/torch/csrc/profiler/unwind/eh_frame_hdr.h b/torch/csrc/profiler/unwind/eh_frame_hdr.h index 89a08480c3250c..9800166675093f 100644 --- a/torch/csrc/profiler/unwind/eh_frame_hdr.h +++ b/torch/csrc/profiler/unwind/eh_frame_hdr.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include diff --git a/torch/csrc/profiler/unwind/unwinder.h b/torch/csrc/profiler/unwind/unwinder.h index 7d31de56e5af79..87cb7e90532828 100644 --- a/torch/csrc/profiler/unwind/unwinder.h +++ b/torch/csrc/profiler/unwind/unwinder.h @@ -2,7 +2,6 @@ #include #include #include -#include #include struct UnwindState { diff --git a/torch/csrc/utils/throughput_benchmark.h b/torch/csrc/utils/throughput_benchmark.h index e540022e0f50ff..d7c716a2df02f3 100644 --- a/torch/csrc/utils/throughput_benchmark.h +++ b/torch/csrc/utils/throughput_benchmark.h @@ -7,7 +7,7 @@ #include -#include +#include #include #include #include diff --git a/torch/custom_class.h b/torch/custom_class.h index 1277ca61a94cc1..a7f5dd50dd605c 100644 --- a/torch/custom_class.h +++ b/torch/custom_class.h @@ -12,7 +12,6 @@ #include #include #include -#include #include namespace torch { diff --git a/torch/lib/libshm/socket.h b/torch/lib/libshm/socket.h index ee36f460b6ed9c..aeb0a8bb9d4e76 100644 --- a/torch/lib/libshm/socket.h +++ b/torch/lib/libshm/socket.h @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include