Commit 03e4e07
Add support for Replicate op in distributed training
This is primarily (though not entirely) changes in task-spec, as
realm-execution currently just uses multiple point-to-point copies to
perform the Replicate.
The key task-spec changes are:
- copy_insertion does not insert copies around `Replicate`s,
since copies are already done as part of the replicate
- Since eventually `Replicate`s should be executed as a single
collective call, shard_expansion no longer fully shard-expands
`Replicate`s, limiting the expansion to the granularity of (what will
eventually be) the collective call. To implement this, slots in the
dynamic graph now need to optionally have a shard specified, since
these partially shard-expanded task still need to output fully
shard-expanded tensors/values.
In realm-execution:
- There's a new redop registry for reduction ops
- There's an abstration for broadcast and reduction collectives
(currently the actual implementation is just naive point-to-point
operations, but the interface/abstraction allows this implementation
to be easily swapped out for something more performant once it's
added)
- Machine information caching in RealmContext is simplified
Additional changes made as part of this PR:
- Commutativity tests for task-spec passes were added, and corresponding
fixes made to the passes to satisfy the new tests
- Most unordered_ containers are replaced by their ordered counterparts,
for more predictable/deterministic behavior, particularly when
distributed
- A number of additional tests for task-spec passes were added to
prevent regressions and check edge cases
- proj was updated to print more datastructures in json by default, for
easier debugging
Co-authored-by: Elliott Slaughter <slaughter@cs.stanford.edu>
Co-authored-by: Seema Mirchandaney <seemah@stanford.edu>1 parent dfab204 commit 03e4e07
1,290 files changed
Lines changed: 18406 additions & 8693 deletions
File tree
- bin
- run-model/src/run-model
- sp-ization-benchmarking
- include/sp-ization-benchmarking
- src/sp-ization-benchmarking
- lib
- compiler
- include/compiler
- cost_estimator
- machine_mapping
- abstracted_tensor_set_movement
- machine_mapping_problem_tree
- memory_optimization
- series_parallel
- computation_graph
- pcg
- task_graph_simulator
- src/compiler
- cost_estimator
- machine_mapping
- abstracted_tensor_set_movement
- machine_mapping_problem_tree
- memory_optimization
- series_parallel
- computation_graph
- pcg
- task_graph_simulator
- unity_algorithm
- test/src
- compiler
- machine_mapping
- memory_optimization
- series_parallel/pcg
- task_graph_simulator
- internal
- kernels
- include/kernels
- src/kernels
- local-execution
- include/local-execution
- cost_estimator
- src/local-execution
- cost_estimator
- test/src/local-execution
- op-attrs
- include/op-attrs
- ff_ordered
- ops
- src/op-attrs
- ff_ordered
- ops
- test/src/op-attrs
- ff_ordered
- ops
- pcg
- include/pcg
- computation_graph
- file_format/v1/graphs
- mapped_parallel_computation_graph
- parallel_computation_graph
- src/pcg
- file_format/v1
- graphs
- mapped_parallel_computation_graph
- parallel_computation_graph
- test/src/pcg
- mapped_parallel_computation_graph
- parallel_computation_graph
- realm-execution
- include/realm-execution
- redops
- tasks
- serializer
- src/realm-execution
- redops
- tasks
- serializer
- test/src/realm-execution
- substitutions
- include/substitutions
- apply_substitution
- operator_pattern
- output_graph
- tensor_pattern
- unlabelled
- src/substitutions
- apply_substitution
- operator_pattern
- output_graph
- unlabelled
- test/src/substitutions
- apply_substitution
- unlabelled
- task-spec
- include/task-spec
- dynamic_graph
- src/task-spec
- dynamic_graph
- ops/impl
- test/src/task-spec/dynamic_graph
- utils
- benchmark/src/internal
- include/utils
- archetypes
- bidict
- algorithms
- binary_relation
- cli
- containers
- dot
- fmt
- full_binary_tree
- graph
- dataflow_graph
- algorithms
- transitive_reduced_dataflow_graph
- digraph
- algorithms
- complete_bipartite_composite
- instances
- kwarg_dataflow_graph
- algorithms
- transitive_reduced_kwarg_dataflow_graph
- labelled_dataflow_graph/algorithms
- labelled_kwarg_dataflow_graph
- algorithms
- labelled_open_dataflow_graph/algorithms
- labelled_open_kwarg_dataflow_graph
- algorithms
- multidigraph
- algorithms
- node
- open_dataflow_graph
- algorithms
- open_kwarg_dataflow_graph
- algorithms
- series_parallel
- binary_sp_decomposition_tree
- generic_binary_sp_decomposition_tree
- sp_ization
- undirected
- algorithms
- views
- json
- many_to_one
- nonempty_set
- nonempty_unordered_set
- one_to_many
- orthotope
- src/utils
- archetypes
- bidict
- algorithms
- binary_relation
- containers
- fmt
- full_binary_tree
- graph
- dataflow_graph
- algorithms
- transitive_reduced_dataflow_graph
- digraph
- algorithms
- complete_bipartite_composite
- inverse_line_graph
- instances
- kwarg_dataflow_graph/algorithms
- transitive_reduced_kwarg_dataflow_graph
- labelled_kwarg_dataflow_graph/algorithms
- labelled_open_kwarg_dataflow_graph/algorithms
- multidigraph
- algorithms
- node
- open_dataflow_graph
- algorithms
- open_kwarg_dataflow_graph/algorithms
- series_parallel
- binary_sp_decomposition_tree
- generic_binary_sp_decomposition_tree
- sp_ization
- undirected
- algorithms
- views
- hash
- many_to_one
- nonempty_set
- one_to_many
- orthotope
- test
- common
- include/test/utils
- doctest
- fmt
- rapidcheck
- src/test/utils/doctest/fmt
- src/utils
- bidict
- algorithms
- binary_relation
- containers
- dot
- fmt
- graph
- dataflow_graph
- algorithms
- transitive_reduced_dataflow_graph
- digraph/algorithms
- complete_bipartite_composite
- inverse_line_graph
- instances
- kwarg_dataflow_graph/algorithms
- labelled_kwarg_dataflow_graph/algorithms
- multidigraph
- algorithms
- open_dataflow_graph/algorithms
- open_kwarg_dataflow_graph/algorithms
- series_parallel
- binary_sp_decomposition_tree
- generic_binary_sp_decomposition_tree
- sp_ization
- undirected
- algorithms
- views
- many_to_one
- nonnegative_int
- one_to_many
- orthotope
- positive_int
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
| 334 | + | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
| 20 | + | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
0 commit comments