Skip to content

Commit fee10a3

Browse files
committed
Format
1 parent 02e2f71 commit fee10a3

File tree

699 files changed

+14219
-13005
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

699 files changed

+14219
-13005
lines changed

lib/compiler/include/compiler/allowed_machine_views.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#ifndef _FLEXFLOW_COMPILER_ALLOWED_MACHINE_VIEWS_H
22
#define _FLEXFLOW_COMPILER_ALLOWED_MACHINE_VIEWS_H
33

4+
#include "compiler/machine_mapping/machine_view.dtg.h"
45
#include "op-attrs/operator_task_space.dtg.h"
56
#include "pcg/machine_compute_specification.dtg.h"
6-
#include "compiler/machine_mapping/machine_view.dtg.h"
77

88
namespace FlexFlow {
99

lib/compiler/include/compiler/cost_estimator/communication_edge.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ struct CommunicationEdge {
2121

2222
MachineSpaceCoordinate const &get_src() const;
2323
MachineSpaceCoordinate const &get_dst() const;
24+
2425
private:
2526
MachineSpaceCoordinate src;
2627
MachineSpaceCoordinate dst;
28+
2729
private:
28-
std::tuple<
29-
decltype(src) const &,
30-
decltype(dst) const &
31-
> tie() const;
30+
std::tuple<decltype(src) const &, decltype(dst) const &> tie() const;
3231

3332
friend struct ::std::hash<CommunicationEdge>;
3433
};
@@ -45,6 +44,6 @@ struct hash<::FlexFlow::CommunicationEdge> {
4544
size_t operator()(::FlexFlow::CommunicationEdge const &) const;
4645
};
4746

48-
}
47+
} // namespace std
4948

5049
#endif

lib/compiler/include/compiler/cost_estimator/cost_estimator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#include "compiler/cost_estimator/op_cost_estimate_key.dtg.h"
55
#include "compiler/cost_estimator/op_cost_metrics.dtg.h"
66
#include "compiler/cost_estimator/tensor_set_movement.dtg.h"
7+
#include "compiler/machine_mapping/machine_view.dtg.h"
78
#include "op-attrs/parallel_tensor_shape.dtg.h"
89
#include "op-attrs/pcg_operator_attrs.dtg.h"
9-
#include "compiler/machine_mapping/machine_view.dtg.h"
1010
#include <vector>
1111

1212
namespace FlexFlow {

lib/compiler/include/compiler/cost_estimator/parallel_tensor_space_to_machine_space_mapping.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
#define _FLEXFLOW_LIB_COMPILER_INCLUDE_COMPILER_COST_ESTIMATOR_PARALLEL_TENSOR_SPACE_TO_MACHINE_SPACE_MAPPING_H
33

44
#include "compiler/cost_estimator/parallel_tensor_space_to_machine_space_mapping.dtg.h"
5-
#include "pcg/operator_space_to_machine_space_mapping.dtg.h"
65
#include "op-attrs/operator_space_to_parallel_tensor_space_mapping.dtg.h"
6+
#include "pcg/operator_space_to_machine_space_mapping.dtg.h"
77

88
namespace FlexFlow {
99

10-
ParallelTensorSpaceToMachineSpaceMapping
11-
ptensor_machine_map_from_composition(
12-
OperatorSpaceToMachineSpaceMapping const &op_task_to_machine_space_mapping,
10+
ParallelTensorSpaceToMachineSpaceMapping ptensor_machine_map_from_composition(
11+
OperatorSpaceToMachineSpaceMapping const &op_task_to_machine_space_mapping,
1312
OperatorSpaceToParallelTensorSpaceMapping const &op_task_to_parallel);
1413

1514
} // namespace FlexFlow

lib/compiler/include/compiler/cost_estimator/runtime_only_cost_estimator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#include "compiler/cost_estimator/runtime_only_op_cost_estimate_key.dtg.h"
55
#include "compiler/cost_estimator/runtime_only_op_cost_metrics.dtg.h"
66
#include "compiler/cost_estimator/tensor_set_movement.dtg.h"
7+
#include "compiler/machine_mapping/machine_view.dtg.h"
78
#include "op-attrs/parallel_tensor_shape.dtg.h"
89
#include "op-attrs/pcg_operator_attrs.dtg.h"
9-
#include "compiler/machine_mapping/machine_view.dtg.h"
1010
#include <vector>
1111

1212
namespace FlexFlow {

lib/compiler/include/compiler/cost_estimator/tensor_set_movement.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88

99
namespace FlexFlow {
1010

11-
TensorSetMovement
12-
empty_tensor_set_movement();
11+
TensorSetMovement empty_tensor_set_movement();
1312

14-
TensorSetMovement
15-
get_tensor_set_movement_from_pcg_edge(
13+
TensorSetMovement get_tensor_set_movement_from_pcg_edge(
1614
ParallelComputationGraphEdge const &edge,
1715
ParallelComputationGraph const &pcg,
1816
MachineView const &src_mv,

lib/compiler/include/compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_device.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33

44
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_device.dtg.h"
55
#include "compiler/machine_mapping/abstracted_tensor_set_movement/machine_space_stencil.dtg.h"
6+
#include "compiler/machine_mapping/machine_mapping_problem_tree/machine_mapping_problem_tree.dtg.h"
67
#include "compiler/machine_mapping/parallel_layer_guid_oblivious_machine_mapping.dtg.h"
78
#include "op-attrs/operator_task_space.dtg.h"
8-
#include "pcg/machine_space_coordinate.dtg.h"
99
#include "pcg/machine_compute_specification.dtg.h"
10-
#include "compiler/machine_mapping/machine_mapping_problem_tree/machine_mapping_problem_tree.dtg.h"
10+
#include "pcg/machine_space_coordinate.dtg.h"
1111

1212
namespace FlexFlow {
1313

14-
MachineSpaceCoordinate
15-
concretize_abstracted_device(
14+
MachineSpaceCoordinate concretize_abstracted_device(
1615
AbstractedDevice const &abstracted_device,
17-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &machine_space_stencils);
16+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
17+
&machine_space_stencils);
1818

1919
} // namespace FlexFlow
2020

lib/compiler/include/compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_tensor_communication_edge.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
namespace FlexFlow {
1212

1313
std::optional<CommunicationEdge>
14-
concretize_abstracted_single_tensor_communication_edge(
15-
AbstractedSingleTensorCommunicationEdge const &edge,
16-
MachineSpaceStencil const &src_machine_stencil,
17-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &dst_machine_stencils);
18-
14+
concretize_abstracted_single_tensor_communication_edge(
15+
AbstractedSingleTensorCommunicationEdge const &edge,
16+
MachineSpaceStencil const &src_machine_stencil,
17+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
18+
&dst_machine_stencils);
1919

2020
} // namespace FlexFlow
2121

lib/compiler/include/compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_tensor_movement.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,31 @@
22
#define _FLEXFLOW_LIB_COMPILER_INCLUDE_COMPILER_MACHINE_MAPPING_ABSTRACTED_TENSOR_SET_MOVEMENT_ABSTRACTED_SINGLE_TENSOR_MOVEMENT_H
33

44
#include "compiler/cost_estimator/tensor_set_movement.dtg.h"
5-
#include "compiler/machine_mapping/abstracted_tensor_set_movement/machine_space_stencil.dtg.h"
6-
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_tensor_movement.dtg.h"
75
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_tensor_communication.dtg.h"
6+
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_tensor_movement.dtg.h"
7+
#include "compiler/machine_mapping/abstracted_tensor_set_movement/machine_space_stencil.dtg.h"
88

99
namespace FlexFlow {
1010

1111
std::unordered_set<BinaryTreePath>
12-
abstracted_single_tensor_movement_get_dst_layers(AbstractedSingleTensorMovement const &);
12+
abstracted_single_tensor_movement_get_dst_layers(
13+
AbstractedSingleTensorMovement const &);
1314

14-
AbstractedSingleTensorMovement
15-
merge_abstracted_single_tensor_movements(
15+
AbstractedSingleTensorMovement merge_abstracted_single_tensor_movements(
1616
std::unordered_multiset<AbstractedSingleTensorMovement> const &);
1717

1818
AbstractedSingleTensorMovement
19-
abstracted_single_tensor_movement_from_communications(
20-
BinaryTreePath const &src_op_tree_path,
21-
std::unordered_set<AbstractedSingleTensorCommunication> const &communications);
19+
abstracted_single_tensor_movement_from_communications(
20+
BinaryTreePath const &src_op_tree_path,
21+
std::unordered_set<AbstractedSingleTensorCommunication> const
22+
&communications);
2223

2324
TensorSetMovement concretize_abstracted_single_tensor_movement(
2425
AbstractedSingleTensorMovement const &,
25-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &pre_machine_stencils,
26-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &post_machine_stencils);
26+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
27+
&pre_machine_stencils,
28+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
29+
&post_machine_stencils);
2730

2831
} // namespace FlexFlow
2932

lib/compiler/include/compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_tensor_set_movement.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#define _FLEXFLOW_LIB_COMPILER_INCLUDE_COMPILER_MACHINE_MAPPING_ABSTRACTED_TENSOR_SET_MOVEMENT_H
33

44
#include "compiler/cost_estimator/tensor_set_movement.dtg.h"
5-
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_tensor_set_movement.dtg.h"
65
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_single_communication.dtg.h"
6+
#include "compiler/machine_mapping/abstracted_tensor_set_movement/abstracted_tensor_set_movement.dtg.h"
77
#include "compiler/machine_mapping/abstracted_tensor_set_movement/machine_space_stencil.dtg.h"
88
#include "compiler/machine_mapping/machine_mapping.dtg.h"
99
#include "compiler/machine_mapping/machine_mapping_problem_tree/machine_mapping_problem_tree.dtg.h"
@@ -15,9 +15,9 @@ namespace FlexFlow {
1515

1616
AbstractedTensorSetMovement empty_abstracted_tensor_set_movement();
1717

18-
AbstractedTensorSetMovement
19-
abstracted_tensor_set_movement_from_single_tensor_movement(
20-
AbstractedSingleTensorMovement const &);
18+
AbstractedTensorSetMovement
19+
abstracted_tensor_set_movement_from_single_tensor_movement(
20+
AbstractedSingleTensorMovement const &);
2121

2222
std::unordered_set<BinaryTreePath>
2323
get_src_layers(AbstractedTensorSetMovement const &);
@@ -26,8 +26,10 @@ std::unordered_set<BinaryTreePath>
2626

2727
TensorSetMovement concretize_abstracted_tensor_set_movement(
2828
AbstractedTensorSetMovement const &,
29-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &pre_machine_stencils,
30-
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const &post_machine_stencils);
29+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
30+
&pre_machine_stencils,
31+
std::unordered_map<BinaryTreePath, MachineSpaceStencil> const
32+
&post_machine_stencils);
3133

3234
} // namespace FlexFlow
3335

0 commit comments

Comments
 (0)