Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2e98307
add unit tests for machine mapping and dp algorithm
wmdi Jul 19, 2023
8304b3d
add unit test for unity algorithm
wmdi Jul 19, 2023
8131070
Merge remote-tracking branch 'lockshaw/repo-refactor' into repo-refactor
wmdi Jul 21, 2023
dd33af6
fix compile errors from filter and support_interator_tag
wmdi Jul 20, 2023
766eafa
minor fixes for compiler
wmdi Jul 25, 2023
bf609d8
Merge remote-tracking branch 'lockshaw/repo-refactor' into repo-refactor
wmdi Jul 25, 2023
aa915a4
Merge branch 'repo-refactor' into repo-refactor
lockshaw Jul 26, 2023
908a66c
Merge branch 'repo-refactor' of github.com:wmdi/FlexFlow into repo-re…
wmdi Jul 26, 2023
57994af
clean up generator codes and minor fix
wmdi Aug 2, 2023
2be3f16
format
wmdi Aug 2, 2023
4c7e56e
format
wmdi Aug 2, 2023
edb1c58
serial parallel composition
wmdi Aug 9, 2023
70e2b49
remove commited out codes
wmdi Aug 10, 2023
6283528
view MultiDiGraph as labelled
wmdi Aug 11, 2023
a240092
make machine mapping immutable
wmdi Aug 11, 2023
a8988d9
minor fix & format
wmdi Aug 11, 2023
e6bc14a
move general codes into proper places
wmdi Aug 14, 2023
04a9525
format
wmdi Aug 14, 2023
8bad012
Merge remote-tracking branch 'upstream/repo-refactor' into repo-refactor
wmdi Aug 16, 2023
60b6f59
minor fix & format
wmdi Aug 17, 2023
8fd7ef0
minor fix
wmdi Aug 18, 2023
60e3945
update substitutions to align with latest changes
wmdi Aug 19, 2023
6bb76df
format
wmdi Aug 19, 2023
4d5d8de
draft substitutions
wmdi Aug 21, 2023
fc807b4
format
wmdi Aug 21, 2023
55e8de3
further draft substitution
wmdi Aug 21, 2023
4f0e4d2
format
wmdi Aug 21, 2023
550eb3c
Merge remote-tracking branch 'upstream/repo-refactor' into substitutions
wmdi Aug 22, 2023
cc5837b
minor fix
wmdi Aug 23, 2023
d1aa92f
refactor the pattern graph to be OutputLabelledOpenMultiDiGraph
wmdi Aug 25, 2023
a5e111e
format
wmdi Aug 25, 2023
2fb2c7d
minor fix
wmdi Aug 28, 2023
a1bffc5
updates
wmdi Aug 28, 2023
ee9f7ca
readme for substitutions
wmdi Aug 29, 2023
08dd3fe
format
wmdi Aug 30, 2023
82e2c2c
check substitution validity
wmdi Aug 30, 2023
ae97d59
initialize tests for substitutions
wmdi Aug 31, 2023
e0559cb
Merge remote-tracking branch 'upstream/repo-refactor' into substitutions
wmdi Sep 1, 2023
c2513c6
fix
wmdi Sep 1, 2023
c2b6b04
format
wmdi Sep 1, 2023
21b8549
remove output tensor computation
wmdi Sep 4, 2023
e3b633f
implement get_operator_attrs
wmdi Sep 8, 2023
3041dc7
get parallel operator attributes & minor fix
wmdi Sep 8, 2023
ea1e8e5
format
wmdi Sep 8, 2023
1508050
match open graphs
wmdi Sep 13, 2023
58a7c62
Merge remote-tracking branch 'upstream/repo-refactor' into substitutions
wmdi Sep 15, 2023
322d945
minor fix
wmdi Sep 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/fmt
Submodule fmt updated 70 files
+0 −8 .github/dependabot.yml
+2 −3 .github/pull_request_template.md
+0 −30 .github/workflows/cifuzz.yml
+1 −9 .github/workflows/doc.yml
+13 −30 .github/workflows/linux.yml
+2 −17 .github/workflows/macos.yml
+0 −65 .github/workflows/scorecard.yml
+4 −12 .github/workflows/windows.yml
+41 −98 CMakeLists.txt
+1 −668 ChangeLog.rst
+1 −1 LICENSE.rst
+28 −42 README.rst
+145 −200 doc/api.rst
+6 −5 doc/build.py
+8 −134 doc/syntax.rst
+1 −1 include/fmt/args.h
+327 −466 include/fmt/chrono.h
+37 −18 include/fmt/color.h
+104 −27 include/fmt/compile.h
+1,139 −738 include/fmt/core.h
+152 −91 include/fmt/format-inl.h
+788 −1,081 include/fmt/format.h
+71 −44 include/fmt/os.h
+50 −22 include/fmt/ostream.h
+174 −201 include/fmt/printf.h
+145 −158 include/fmt/ranges.h
+37 −331 include/fmt/std.h
+33 −62 include/fmt/xchar.h
+29 −40 src/fmt.cc
+5 −1 src/format.cc
+62 −99 src/os.cc
+3 −3 support/Vagrantfile
+1 −0 support/bazel/.bazelrc
+1 −1 support/bazel/.bazelversion
+2 −2 support/bazel/BUILD.bazel
+4 −5 support/bazel/README.md
+1 −1 support/build.gradle
+54 −0 support/cmake/cxx14.cmake
+0 −7 support/rst2md.py
+3 −15 test/CMakeLists.txt
+1 −1 test/add-subdirectory-test/CMakeLists.txt
+1 −1 test/args-test.cc
+26 −386 test/chrono-test.cc
+2 −2 test/compile-error-test/CMakeLists.txt
+0 −1 test/compile-fp-test.cc
+40 −22 test/compile-test.cc
+239 −119 test/core-test.cc
+0 −2 test/enforce-checks-test.cc
+1 −1 test/find-package-test/CMakeLists.txt
+91 −27 test/format-impl-test.cc
+329 −285 test/format-test.cc
+1 −1 test/fuzzing/CMakeLists.txt
+0 −2 test/gtest-extra-test.cc
+6 −1 test/gtest-extra.h
+7 −1 test/gtest/CMakeLists.txt
+1 −1 test/gtest/gmock-gtest-all.cc
+2 −2 test/mock-allocator.h
+88 −36 test/module-test.cc
+56 −15 test/os-test.cc
+47 −16 test/ostream-test.cc
+7 −1 test/posix-mock-test.cc
+2 −0 test/posix-mock.h
+37 −13 test/printf-test.cc
+35 −138 test/ranges-test.cc
+1 −1 test/scan-test.cc
+14 −17 test/scan.h
+1 −1 test/static-export-test/CMakeLists.txt
+20 −198 test/std-test.cc
+6 −2 test/util.h
+55 −118 test/xchar-test.cc
12 changes: 6 additions & 6 deletions lib/compiler/src/graph_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SerialParallelDecomposition
std::vector<MultiDiEdge>
get_sorted_node_input_edges(ParallelComputationGraph const &pcg,
Node const &n) {
std::unordered_map<size_t, std::unordered_set<MultiDiEdge>> incoming_edges =
std::unordered_map<NodePort, std::unordered_set<MultiDiEdge>> incoming_edges =
get_incoming_edges_by_idx(pcg, n);

std::vector<MultiDiEdge> result;
Expand All @@ -36,11 +36,11 @@ std::unordered_map<MultiDiEdge, ParallelTensorShape>

auto outgoing_edges = get_outgoing_edges_by_idx(pcg, n);

for (std::size_t i = 0; i < output_tensor_shapes.size(); i++) {
if (contains_key(outgoing_edges, i)) {
for (MultiDiEdge const &e : outgoing_edges.at(i)) {
result.insert({e, output_tensor_shapes[i]});
}
int i = 0;

for (auto const &[node_port, edges] : outgoing_edges) {
for (MultiDiEdge const &e : edges) {
result.insert({e, output_tensor_shapes[i++]});
}
}
}
Expand Down
250 changes: 0 additions & 250 deletions lib/compiler/src/substitution_logic.cc

This file was deleted.

6 changes: 4 additions & 2 deletions lib/compiler/src/unity_algorithm.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "compiler/unity_algorithm.h"
#include "graph_utils.h"
#include "substitutions_implementation.h"
#include "substitutions/substitution.h"
#include "utils/deduplicated_priority_queue.h"

namespace FlexFlow {
Expand All @@ -14,7 +14,9 @@ std::unordered_set<Substitution>

std::unordered_set<ParallelComputationGraph>
apply_substitution(ParallelComputationGraph const &pcg,
Substitution const &);
Substitution const &) {
NOT_IMPLEMENTED();
}

Strategy
graph_optimize(ComputationGraph &cg,
Expand Down
19 changes: 13 additions & 6 deletions lib/compiler/test/test_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "compiler/machine_mapping.h"
#include "compiler/sub_parallel_computation_graph.h"
#include "pcg/computation_graph.h"
#include "rapidcheck.h"

using namespace FlexFlow;
Expand Down Expand Up @@ -38,7 +39,7 @@ ParallelComputationGraph
}

rc::Gen<int> small_integer_generator() {
return gen::inRange(1, 4);
return rc::gen::inRange(1, 4);
}

namespace rc {
Expand All @@ -51,23 +52,26 @@ Gen<MultiDiGraph> serialParallelMultiDiGraph() {
template <>
struct Arbitrary<ComputationGraph> {
static Gen<ComputationGraph> arbitrary() {
return gen::map(serialParallelMultiDiGraph, test_computataion_graph);
return gen::map(gen::cast<MultiDiGraphView>(serialParallelMultiDiGraph()),
test_computataion_graph);
}
};

template <>
struct Arbitrary<ParallelComputationGraph> {
static Gen<ParallelComputationGraph> arbitrary() {
return gen::map(serialParallelMultiDiGraph,
test_parallel_computataion_graph);
return gen::map(gen::cast<MultiDiGraphView>(serialParallelMultiDiGraph()),
test_parallel_computation_graph);
}
};

template <>
struct Arbitrary<variant<Serial, Node>> {
static Gen<variant<Serial, Node>> arbitrary() {
return gen::mapcat(gen::arbitrary<bool>(), [](bool is_node) {
return is_node ? gen::arbitrary<Node>() : gen::arbitrary<Serial>();
return is_node
? gen::cast<variant<Serial, Node>>(gen::arbitrary<Node>())
: gen::cast<variant<Serial, Node>>(gen::arbitrary<Serial>());
});
}
};
Expand All @@ -76,7 +80,10 @@ template <>
struct Arbitrary<variant<Parallel, Node>> {
static Gen<variant<Parallel, Node>> arbitrary() {
return gen::mapcat(gen::arbitrary<bool>(), [](bool is_node) {
return is_node ? gen::arbitrary<Node>() : gen::arbitrary<Parallel>();
return is_node
? gen::cast<variant<Parallel, Node>>(gen::arbitrary<Node>())
: gen::cast<variant<Parallel, Node>>(
gen::arbitrary<Parallel>());
});
}
};
Expand Down
1 change: 1 addition & 0 deletions lib/substitutions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ff_add_library(
DEPS
utils
op-attrs
pcg
)

add_subdirectory(ffi)
Expand Down
Loading