[lint] preparatory changes for mass clang-format

These were all the manual changes that were needed to preserve behavior
across autoformatting.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/78969

Approved by: https://github.com/ezyang
diff --git a/torch/csrc/lazy/core/shape_inference.h b/torch/csrc/lazy/core/shape_inference.h
index 4566225..41477b7 100644
--- a/torch/csrc/lazy/core/shape_inference.h
+++ b/torch/csrc/lazy/core/shape_inference.h
@@ -11,7 +11,9 @@
 
 namespace torch{
 namespace lazy {
-
+// Turn clang-format off, as we rely on the whole signature being on one line
+// for codegen.
+// clang-format off
 TORCH_API std::vector<torch::lazy::Shape> compute_shape__adaptive_avg_pool2d(const at::Tensor & self, at::IntArrayRef output_size);
 TORCH_API std::vector<torch::lazy::Shape> compute_shape__adaptive_avg_pool2d_backward(const at::Tensor & grad_output, const at::Tensor & self);
 TORCH_API std::vector<torch::lazy::Shape> compute_shape_abs(const at::Tensor & self);
@@ -93,6 +95,6 @@
 TORCH_API std::vector<Shape> compute_shape_select(const Output& input, const int64_t& dim, const int64_t& start, const int64_t& end, const int64_t& stride);
 TORCH_API std::vector<Shape> compute_shape_squeeze(const Output& input, const int& dim);
 TORCH_API std::vector<Shape> compute_shape_unsqueeze(const Output& input, const int& dim);
-
+// clang-format on
 } // namespace lazy
 } // namespace torch
diff --git a/torch/csrc/profiler/execution_graph_observer.cpp b/torch/csrc/profiler/execution_graph_observer.cpp
index e8796d7..2a9deb4 100644
--- a/torch/csrc/profiler/execution_graph_observer.cpp
+++ b/torch/csrc/profiler/execution_graph_observer.cpp
@@ -3,6 +3,7 @@
 #define WIN32_LEAN_AND_MEAN
 #endif
 #include <windows.h>
+
 #include <processthreadsapi.h>
 #else
 #include <unistd.h>
diff --git a/torch/csrc/utils.h b/torch/csrc/utils.h
index 7e08ddf..e014a56 100644
--- a/torch/csrc/utils.h
+++ b/torch/csrc/utils.h
@@ -148,8 +148,12 @@
 template <typename T>
 struct THPUtils_typeTraits {};
 
+// Disabling clang-format because the order of these includes matters.
+// This is mega-sus.
+// clang-format off
 #include <torch/csrc/generic/utils.h>
 #include <torch/csrc/THGenerateByteType.h>
+// clang-format on
 
 std::vector<int64_t> THPUtils_unpackLongs(PyObject *arg);
 PyObject * THPUtils_dispatchStateless(PyObject *tensor, const char *name, PyObject *args, PyObject *kwargs);
diff --git a/torch/csrc/utils/structseq.cpp b/torch/csrc/utils/structseq.cpp
index cae02dc..b410bbf 100644
--- a/torch/csrc/utils/structseq.cpp
+++ b/torch/csrc/utils/structseq.cpp
@@ -14,9 +14,10 @@
 
 #include <torch/csrc/utils/structseq.h>
 #include <torch/csrc/utils/six.h>
-#include <structmember.h>
 #include <sstream>
 
+#include <structmember.h>
+
 namespace torch {
 namespace utils {