Commit 588646f2 authored by Paul's avatar Paul
Browse files

Formatting

parent e2f6771f
...@@ -43,7 +43,6 @@ bool no_allocate(const migraph::program& p) ...@@ -43,7 +43,6 @@ bool no_allocate(const migraph::program& p)
return std::none_of(p.begin(), p.end(), [](auto&& ins) { return ins.name() == "allocate"; }); return std::none_of(p.begin(), p.end(), [](auto&& ins) { return ins.name() == "allocate"; });
} }
void test1() void test1()
{ {
migraph::program p; migraph::program p;
...@@ -410,10 +409,10 @@ void test28() ...@@ -410,10 +409,10 @@ void test28()
{ {
migraph::program p; migraph::program p;
auto output = p.add_parameter("output", {migraph::shape::float_type, {8}}); auto output = p.add_parameter("output", {migraph::shape::float_type, {8}});
auto a1 = add_alloc(p, {migraph::shape::float_type, {8}}); auto a1 = add_alloc(p, {migraph::shape::float_type, {8}});
auto p1 = p.add_instruction(pass_op{}, a1); auto p1 = p.add_instruction(pass_op{}, a1);
auto a2 = add_alloc(p, {migraph::shape::float_type, {40}}); auto a2 = add_alloc(p, {migraph::shape::float_type, {40}});
auto p2 = p.add_instruction(pass_op{}, a2, p1); auto p2 = p.add_instruction(pass_op{}, a2, p1);
p.add_instruction(pass_op{}, p2, output); p.add_instruction(pass_op{}, p2, output);
p.compile(memory_coloring_target{}); p.compile(memory_coloring_target{});
CHECK(p.get_parameter_shape("scratch").bytes() == 192); CHECK(p.get_parameter_shape("scratch").bytes() == 192);
...@@ -424,10 +423,10 @@ void test29() ...@@ -424,10 +423,10 @@ void test29()
{ {
migraph::program p; migraph::program p;
auto output = p.add_parameter("output", {migraph::shape::float_type, {8}}); auto output = p.add_parameter("output", {migraph::shape::float_type, {8}});
auto a1 = add_alloc(p, {migraph::shape::float_type, {8}}); auto a1 = add_alloc(p, {migraph::shape::float_type, {8}});
auto p1 = p.add_instruction(pass_op{}, a1); auto p1 = p.add_instruction(pass_op{}, a1);
auto a2 = add_alloc(p, {migraph::shape::float_type, {40}}); auto a2 = add_alloc(p, {migraph::shape::float_type, {40}});
auto p2 = p.add_instruction(pass_op{}, a2, p1); auto p2 = p.add_instruction(pass_op{}, a2, p1);
p.move_instruction(output, p2); p.move_instruction(output, p2);
p.add_instruction(pass_op{}, p2, output); p.add_instruction(pass_op{}, p2, output);
p.compile(memory_coloring_target{}); p.compile(memory_coloring_target{});
...@@ -439,10 +438,10 @@ void test30() ...@@ -439,10 +438,10 @@ void test30()
{ {
migraph::program p; migraph::program p;
auto output = p.add_parameter("x", {migraph::shape::float_type, {8}}); auto output = p.add_parameter("x", {migraph::shape::float_type, {8}});
auto a1 = add_alloc(p, {migraph::shape::float_type, {8}}); auto a1 = add_alloc(p, {migraph::shape::float_type, {8}});
auto p1 = p.add_instruction(pass_op{}, a1); auto p1 = p.add_instruction(pass_op{}, a1);
auto a2 = add_alloc(p, {migraph::shape::float_type, {40}}); auto a2 = add_alloc(p, {migraph::shape::float_type, {40}});
auto p2 = p.add_instruction(pass_op{}, a2, p1); auto p2 = p.add_instruction(pass_op{}, a2, p1);
p.move_instruction(output, p2); p.move_instruction(output, p2);
p.add_instruction(pass_op{}, p2, output); p.add_instruction(pass_op{}, p2, output);
p.compile(memory_coloring_target{}); p.compile(memory_coloring_target{});
...@@ -454,9 +453,9 @@ void test31() ...@@ -454,9 +453,9 @@ void test31()
{ {
migraph::program p; migraph::program p;
auto output = p.add_parameter("output", {migraph::shape::float_type, {8}}); auto output = p.add_parameter("output", {migraph::shape::float_type, {8}});
auto a1 = add_alloc(p, {migraph::shape::float_type, {8}}); auto a1 = add_alloc(p, {migraph::shape::float_type, {8}});
auto p1 = p.add_instruction(pass_op{}, a1); auto p1 = p.add_instruction(pass_op{}, a1);
auto a2 = add_alloc(p, {migraph::shape::float_type, {40}}); auto a2 = add_alloc(p, {migraph::shape::float_type, {40}});
p.move_instruction(output, a2); p.move_instruction(output, a2);
p.add_instruction(pass_op{}, a2, p1); p.add_instruction(pass_op{}, a2, p1);
p.compile(memory_coloring_target{}); p.compile(memory_coloring_target{});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment