From 46066845d089f00cd3b59a548f83ab914375abcb Mon Sep 17 00:00:00 2001 From: Jorge Pineda Date: Tue, 2 Jul 2024 09:47:03 -0700 Subject: [PATCH 1/2] [ET-VK] Move stdlib includes after ET includes The convention in most files is: 1. Related header 2. Headers of the form ".h" (i.e. this project's other headers, further organize into blocks according to directory) 3. Headers of the form <> (i.e. standard libraries' headers) This change organizes files violating this convention by resolving #3. Differential Revision: [D59282477](https://our.internmc.facebook.com/intern/diff/D59282477/) [ghstack-poisoned] --- backends/vulkan/runtime/api/utils/VecUtils.h | 8 ++++---- backends/vulkan/runtime/api/vk_api/QueryPool.h | 6 +++--- backends/vulkan/runtime/api/vk_api/Runtime.cpp | 7 ++++--- backends/vulkan/runtime/api/vk_api/Runtime.h | 6 +++--- backends/vulkan/runtime/api/vk_api/Shader.cpp | 4 ++-- backends/vulkan/runtime/api/vk_api/Types.h | 6 +++--- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/backends/vulkan/runtime/api/utils/VecUtils.h b/backends/vulkan/runtime/api/utils/VecUtils.h index 7bbd0ba61ec..4030261f88f 100644 --- a/backends/vulkan/runtime/api/utils/VecUtils.h +++ b/backends/vulkan/runtime/api/utils/VecUtils.h @@ -8,15 +8,15 @@ #pragma once +#include + +#include + #include #include #include #include -#include - -#include - namespace vkcompute { namespace utils { diff --git a/backends/vulkan/runtime/api/vk_api/QueryPool.h b/backends/vulkan/runtime/api/vk_api/QueryPool.h index 63f04c921b0..e19bc74ed7e 100644 --- a/backends/vulkan/runtime/api/vk_api/QueryPool.h +++ b/backends/vulkan/runtime/api/vk_api/QueryPool.h @@ -10,15 +10,15 @@ // @lint-ignore-every CLANGTIDY facebook-hte-BadMemberName -#include -#include - #include #include #include #include +#include +#include + #ifndef VULKAN_QUERY_POOL_SIZE #define VULKAN_QUERY_POOL_SIZE 4096u #endif diff --git a/backends/vulkan/runtime/api/vk_api/Runtime.cpp b/backends/vulkan/runtime/api/vk_api/Runtime.cpp index 5ac788c1433..bc0ee1e16af 100644 --- a/backends/vulkan/runtime/api/vk_api/Runtime.cpp +++ b/backends/vulkan/runtime/api/vk_api/Runtime.cpp @@ -6,13 +6,14 @@ * LICENSE file in the root directory of this source tree. */ +#include + +#include + #include #include #include -#include -#include - namespace vkcompute { namespace vkapi { diff --git a/backends/vulkan/runtime/api/vk_api/Runtime.h b/backends/vulkan/runtime/api/vk_api/Runtime.h index 15e8aca8100..a104f4ba814 100644 --- a/backends/vulkan/runtime/api/vk_api/Runtime.h +++ b/backends/vulkan/runtime/api/vk_api/Runtime.h @@ -10,13 +10,13 @@ // @lint-ignore-every CLANGTIDY facebook-hte-BadMemberName -#include -#include - #include #include +#include +#include + namespace vkcompute { namespace vkapi { diff --git a/backends/vulkan/runtime/api/vk_api/Shader.cpp b/backends/vulkan/runtime/api/vk_api/Shader.cpp index 87bf5eca520..6f6d7642934 100644 --- a/backends/vulkan/runtime/api/vk_api/Shader.cpp +++ b/backends/vulkan/runtime/api/vk_api/Shader.cpp @@ -6,10 +6,10 @@ * LICENSE file in the root directory of this source tree. */ -#include - #include +#include + namespace vkcompute { namespace vkapi { diff --git a/backends/vulkan/runtime/api/vk_api/Types.h b/backends/vulkan/runtime/api/vk_api/Types.h index ae52ddfd25c..3f94a634f4c 100644 --- a/backends/vulkan/runtime/api/vk_api/Types.h +++ b/backends/vulkan/runtime/api/vk_api/Types.h @@ -10,13 +10,13 @@ // @lint-ignore-every CLANGTIDY bugprone-branch-clone -#include -#include - #include #include +#include +#include + #ifdef USE_VULKAN_FP16_INFERENCE #define VK_FORMAT_FLOAT4 VK_FORMAT_R16G16B16A16_SFLOAT #else From a89dd7f96e532cd906b85f243b9de87cc6368be1 Mon Sep 17 00:00:00 2001 From: Jorge Pineda Date: Tue, 2 Jul 2024 10:10:35 -0700 Subject: [PATCH 2/2] Update on "[ET-VK] Order stdlib includes after ET includes" The convention in most files is: 1. Related header 2. Headers of the form ".h" (i.e. this project's other headers, further organize into blocks according to directory) 3. Headers of the form <> (i.e. standard libraries' headers) This change organizes files violating this convention by resolving #3. Differential Revision: [D59282477](https://our.internmc.facebook.com/intern/diff/D59282477/) [ghstack-poisoned]