Skip to content

Commit ac59eba

Browse files
authored
runtime: standardize include style (#5895)
1 parent eaa2948 commit ac59eba

27 files changed

+332
-330
lines changed

csrc/runtime/allocations.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
*/
77
// clang-format on
88

9-
#include <runtime/allocations.h>
10-
11-
#include <expr_evaluator.h>
12-
#include <instrumentation.h>
13-
#include <ir/iostream.h>
14-
#include <multidevice/execution_utils.h>
15-
#include <multidevice/utils.h>
16-
#include <polymorphic_value.h>
17-
#include <runtime/executor.h>
18-
#include <runtime/executor_kernel_arg.h>
19-
#include <runtime/executor_utils.h>
20-
#include <tensor_metadata.h>
9+
#include "runtime/allocations.h"
10+
11+
#include "expr_evaluator.h"
12+
#include "instrumentation.h"
13+
#include "ir/iostream.h"
14+
#include "multidevice/execution_utils.h"
15+
#include "multidevice/utils.h"
16+
#include "polymorphic_value.h"
17+
#include "runtime/executor.h"
18+
#include "runtime/executor_kernel_arg.h"
19+
#include "runtime/executor_utils.h"
20+
#include "tensor_metadata.h"
2121

2222
namespace nvfuser {
2323

csrc/runtime/allocations.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
// clang-format on
88
#pragma once
99

10-
#include <ir/all_nodes.h>
11-
12-
#include <evaluator_common.h>
13-
1410
#include <c10/core/ScalarType.h>
1511

12+
#include "evaluator_common.h"
13+
#include "ir/all_nodes.h"
14+
1615
namespace nvfuser {
1716

1817
struct KernelExecutorEntry;

csrc/runtime/communication_executor.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
*/
77
// clang-format on
88

9-
#include <runtime/communication_executor.h>
10-
11-
#include <fusion_profiler.h>
12-
#include <host_ir/lower_to_communication.h>
13-
#include <instrumentation.h>
14-
#include <multidevice/resharding.h>
15-
#include <multidevice/utils.h>
16-
#include <tensor_metadata.h>
9+
#include "runtime/communication_executor.h"
10+
11+
#include "fusion_profiler.h"
12+
#include "host_ir/lower_to_communication.h"
13+
#include "instrumentation.h"
14+
#include "multidevice/resharding.h"
15+
#include "multidevice/utils.h"
16+
#include "tensor_metadata.h"
1717

1818
namespace nvfuser {
1919

csrc/runtime/communication_executor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// clang-format on
88
#pragma once
99

10-
#include <fusion.h>
11-
#include <host_ir/container.h>
12-
#include <multidevice/communicator.h>
13-
#include <runtime/executor_abstract.h>
14-
#include <runtime/executor_kernel_arg.h>
10+
#include "fusion.h"
11+
#include "host_ir/container.h"
12+
#include "multidevice/communicator.h"
13+
#include "runtime/executor_abstract.h"
14+
#include "runtime/executor_kernel_arg.h"
1515

1616
namespace nvfuser {
1717

csrc/runtime/compiled_kernel.cpp

Lines changed: 75 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,7 @@
66
*/
77
// clang-format on
88

9-
#include <runtime/compiled_kernel.h>
10-
11-
#include <codegen.h>
12-
#include <cuda_utils.h>
13-
#include <debug.h>
14-
#include <device_lower/analysis/bank_conflict.h>
15-
#include <device_lower/lower2device.h>
16-
#include <disjoint_set.h>
17-
#include <driver_api.h>
18-
#include <fusion_profiler.h>
19-
#include <global_allocator.h>
20-
#include <instrumentation.h>
21-
#include <ir/all_nodes.h>
22-
#include <ir/utils.h>
23-
#include <iter_visitor.h>
24-
#include <kernel_db/kernel_db.h>
25-
#include <kernel_ir.h>
26-
#include <multidevice/communication.h>
27-
#include <multidevice/communicator.h>
28-
#include <multidevice/utils.h>
29-
#include <options.h>
30-
#include <polymorphic_value.h>
31-
#include <runtime/allocations.h>
32-
#include <runtime/executor_kernel_arg.h>
33-
#include <runtime/executor_utils.h>
34-
#include <serde/utils.h>
35-
#include <tensor_metadata.h>
36-
#include "base.h"
37-
38-
#include <ATen/core/LegacyTypeDispatch.h>
39-
#include <ATen/cuda/CUDAContext.h>
40-
#include <ATen/cuda/llvm_jit_strings.h>
41-
#include <ATen/native/cuda/jit_utils.h>
42-
#include <c10/core/DeviceGuard.h>
43-
#include <c10/cuda/CUDAFunctions.h>
44-
#include <c10/cuda/CUDAStream.h>
45-
#include <torch/csrc/jit/resource_guard.h>
9+
#include "runtime/compiled_kernel.h"
4610

4711
#include <array>
4812
#include <cmath>
@@ -53,45 +17,80 @@
5317

5418
#include <cuda_runtime.h>
5519

56-
#include <nvfuser_resources/argsort.h>
57-
#include <nvfuser_resources/array.h>
58-
#include <nvfuser_resources/basic_type_traits.h>
59-
#include <nvfuser_resources/bf16_support.h>
60-
#include <nvfuser_resources/bit.h>
61-
#include <nvfuser_resources/block_quantization_kernels.h>
62-
#include <nvfuser_resources/block_reduction.h>
63-
#include <nvfuser_resources/block_sync_atomic.h>
64-
#include <nvfuser_resources/block_sync_default.h>
65-
#include <nvfuser_resources/block_welford_outer.h>
66-
#include <nvfuser_resources/broadcast.h>
67-
#include <nvfuser_resources/casts.h>
68-
#include <nvfuser_resources/cluster.h>
69-
#include <nvfuser_resources/complex_number.h>
70-
#include <nvfuser_resources/cub_utils.h>
71-
#include <nvfuser_resources/fp16_support.h>
72-
#include <nvfuser_resources/fp4_support.h>
73-
#include <nvfuser_resources/fp8_support.h>
74-
#include <nvfuser_resources/fused_reduction.h>
75-
#include <nvfuser_resources/fused_welford_helper.h>
76-
#include <nvfuser_resources/fused_welford_impl.h>
77-
#include <nvfuser_resources/fused_welford_impl_outer.h>
78-
#include <nvfuser_resources/grid_broadcast.h>
79-
#include <nvfuser_resources/grid_dependency_control.h>
80-
#include <nvfuser_resources/grid_reduction.h>
81-
#include <nvfuser_resources/grid_sync.h>
82-
#include <nvfuser_resources/helpers.h>
83-
#include <nvfuser_resources/index_utils.h>
84-
#include <nvfuser_resources/mbarrier.h>
85-
#include <nvfuser_resources/memory.h>
86-
#include <nvfuser_resources/random_numbers.h>
87-
#include <nvfuser_resources/scan.h>
88-
#include <nvfuser_resources/tensor.h>
89-
#include <nvfuser_resources/tensor_memory.h>
90-
#include <nvfuser_resources/topk.h>
91-
#include <nvfuser_resources/tuple.h>
92-
#include <nvfuser_resources/type_traits.h>
93-
#include <nvfuser_resources/warp.h>
94-
#include <nvfuser_resources/welford.h>
20+
#include <ATen/core/LegacyTypeDispatch.h>
21+
#include <ATen/cuda/CUDAContext.h>
22+
#include <ATen/cuda/llvm_jit_strings.h>
23+
#include <ATen/native/cuda/jit_utils.h>
24+
#include <c10/core/DeviceGuard.h>
25+
#include <c10/cuda/CUDAFunctions.h>
26+
#include <c10/cuda/CUDAStream.h>
27+
#include <torch/csrc/jit/resource_guard.h>
28+
29+
#include "base.h"
30+
#include "codegen.h"
31+
#include "cuda_utils.h"
32+
#include "debug.h"
33+
#include "device_lower/analysis/bank_conflict.h"
34+
#include "device_lower/lower2device.h"
35+
#include "disjoint_set.h"
36+
#include "driver_api.h"
37+
#include "fusion_profiler.h"
38+
#include "global_allocator.h"
39+
#include "instrumentation.h"
40+
#include "ir/all_nodes.h"
41+
#include "ir/utils.h"
42+
#include "iter_visitor.h"
43+
#include "kernel_db/kernel_db.h"
44+
#include "kernel_ir.h"
45+
#include "multidevice/communication.h"
46+
#include "multidevice/communicator.h"
47+
#include "multidevice/utils.h"
48+
#include "nvfuser_resources/argsort.h"
49+
#include "nvfuser_resources/array.h"
50+
#include "nvfuser_resources/basic_type_traits.h"
51+
#include "nvfuser_resources/bf16_support.h"
52+
#include "nvfuser_resources/bit.h"
53+
#include "nvfuser_resources/block_quantization_kernels.h"
54+
#include "nvfuser_resources/block_reduction.h"
55+
#include "nvfuser_resources/block_sync_atomic.h"
56+
#include "nvfuser_resources/block_sync_default.h"
57+
#include "nvfuser_resources/block_welford_outer.h"
58+
#include "nvfuser_resources/broadcast.h"
59+
#include "nvfuser_resources/casts.h"
60+
#include "nvfuser_resources/cluster.h"
61+
#include "nvfuser_resources/complex_number.h"
62+
#include "nvfuser_resources/cub_utils.h"
63+
#include "nvfuser_resources/fp16_support.h"
64+
#include "nvfuser_resources/fp4_support.h"
65+
#include "nvfuser_resources/fp8_support.h"
66+
#include "nvfuser_resources/fused_reduction.h"
67+
#include "nvfuser_resources/fused_welford_helper.h"
68+
#include "nvfuser_resources/fused_welford_impl.h"
69+
#include "nvfuser_resources/fused_welford_impl_outer.h"
70+
#include "nvfuser_resources/grid_broadcast.h"
71+
#include "nvfuser_resources/grid_dependency_control.h"
72+
#include "nvfuser_resources/grid_reduction.h"
73+
#include "nvfuser_resources/grid_sync.h"
74+
#include "nvfuser_resources/helpers.h"
75+
#include "nvfuser_resources/index_utils.h"
76+
#include "nvfuser_resources/mbarrier.h"
77+
#include "nvfuser_resources/memory.h"
78+
#include "nvfuser_resources/random_numbers.h"
79+
#include "nvfuser_resources/scan.h"
80+
#include "nvfuser_resources/tensor.h"
81+
#include "nvfuser_resources/tensor_memory.h"
82+
#include "nvfuser_resources/topk.h"
83+
#include "nvfuser_resources/tuple.h"
84+
#include "nvfuser_resources/type_traits.h"
85+
#include "nvfuser_resources/warp.h"
86+
#include "nvfuser_resources/welford.h"
87+
#include "options.h"
88+
#include "polymorphic_value.h"
89+
#include "runtime/allocations.h"
90+
#include "runtime/executor_kernel_arg.h"
91+
#include "runtime/executor_utils.h"
92+
#include "serde/utils.h"
93+
#include "tensor_metadata.h"
9594

9695
namespace nvfuser {
9796

csrc/runtime/compiled_kernel.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212

1313
#include <c10/core/DeviceType.h>
1414

15-
#include <exceptions.h>
16-
#include <expr_evaluator.h>
17-
#include <fusion.h>
18-
#include <ir/cloner.h>
19-
#include <ir/graphviz.h>
20-
#include <ir/interface_nodes.h>
21-
#include <ir/printer.h>
22-
#include <multidevice/communicator.h>
23-
#include <runtime/allocations.h>
24-
#include <runtime/executor_params.h>
25-
#include <runtime/executor_utils.h>
26-
#include <scheduler/scheduler_types.h>
2715
#include "base.h"
16+
#include "exceptions.h"
17+
#include "expr_evaluator.h"
18+
#include "fusion.h"
19+
#include "ir/cloner.h"
20+
#include "ir/graphviz.h"
21+
#include "ir/interface_nodes.h"
22+
#include "ir/printer.h"
23+
#include "multidevice/communicator.h"
24+
#include "runtime/allocations.h"
25+
#include "runtime/executor_params.h"
26+
#include "runtime/executor_utils.h"
27+
#include "scheduler/scheduler_types.h"
2828

2929
namespace nvfuser {
3030

csrc/runtime/cutlass_compiled_kernel.cpp

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,18 @@
66
*/
77
// clang-format on
88

9-
#include <cuda.h>
10-
#include <cuda_runtime.h>
11-
#include <cutlass/codegen.h>
12-
#include <debug.h>
9+
#include "runtime/cutlass_compiled_kernel.h"
10+
1311
#include <dlfcn.h>
14-
#include <fusion.h>
15-
#include <instrumentation.h>
16-
#include <ir/all_nodes.h>
17-
#include <ops/all_ops.h>
18-
#include <options.h>
19-
#include <runtime/compiled_kernel.h>
20-
#include <runtime/cutlass_compiled_kernel.h>
21-
#include <runtime/executor_kernel_arg.h>
22-
#include <runtime/executor_params.h>
23-
#include <scheduler/cutlass.h>
2412
#include <unistd.h>
25-
#include "base.h"
13+
14+
#include <chrono>
15+
#include <filesystem>
16+
#include <fstream>
17+
#include <string>
18+
#include <vector>
19+
20+
#include <cuda_runtime.h>
2621

2722
#include <ATen/ATen.h>
2823
#include <ATen/cuda/CUDAContext.h>
@@ -31,11 +26,19 @@
3126
#include <c10/cuda/CUDAMathCompat.h>
3227
#include <c10/util/Exception.h>
3328

34-
#include <chrono>
35-
#include <filesystem>
36-
#include <fstream>
37-
#include <string>
38-
#include <vector>
29+
#include "base.h"
30+
#include "cuda.h"
31+
#include "cutlass/codegen.h"
32+
#include "debug.h"
33+
#include "fusion.h"
34+
#include "instrumentation.h"
35+
#include "ir/all_nodes.h"
36+
#include "ops/all_ops.h"
37+
#include "options.h"
38+
#include "runtime/compiled_kernel.h"
39+
#include "runtime/executor_kernel_arg.h"
40+
#include "runtime/executor_params.h"
41+
#include "scheduler/cutlass.h"
3942

4043
namespace nvfuser {
4144

csrc/runtime/cutlass_compiled_kernel.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#include <filesystem>
1111
#include <string>
1212

13-
#include <runtime/compiled_kernel.h>
14-
#include <runtime/executor_kernel_arg.h>
15-
#include <runtime/executor_params.h>
16-
#include <scheduler/cutlass.h>
13+
#include "runtime/compiled_kernel.h"
14+
#include "runtime/executor_kernel_arg.h"
15+
#include "runtime/executor_params.h"
16+
#include "scheduler/cutlass.h"
1717

1818
namespace nvfuser {
1919

csrc/runtime/cutlass_executor.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@
66
*/
77
// clang-format on
88

9-
#include <debug.h>
10-
#include <exceptions.h>
11-
#include <fusion.h>
12-
#include <instrumentation.h>
13-
#include <ir/all_nodes.h>
14-
#include <options.h>
15-
#include <runtime/allocations.h>
16-
#include <runtime/cutlass_compiled_kernel.h>
17-
#include <runtime/cutlass_executor.h>
18-
#include <type.h>
9+
#include "runtime/cutlass_executor.h"
1910

2011
#include <c10/cuda/CUDAStream.h>
2112

13+
#include "debug.h"
14+
#include "exceptions.h"
15+
#include "fusion.h"
16+
#include "instrumentation.h"
17+
#include "ir/all_nodes.h"
18+
#include "options.h"
19+
#include "runtime/allocations.h"
20+
#include "runtime/cutlass_compiled_kernel.h"
21+
#include "type.h"
22+
2223
namespace nvfuser {
2324

2425
bool CutlassExecutor::supported(Fusion* fusion) {

0 commit comments

Comments
 (0)