Skip to content

Commit 9316e0a

Browse files
committed
format
1 parent b58cb23 commit 9316e0a

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

test/gpu/fuse_mlir.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct non_mlir_op
5656
static void run_pass(migraphx::program& p, migraphx::gpu::fuse_mlir fm = {})
5757
{
5858
static migraphx::gpu::context ctx;
59-
fm.ctx = &ctx;
59+
fm.ctx = &ctx;
6060
fm.enable_extra = true;
6161
migraphx::run_passes(p, {fm, migraphx::dead_code_elimination{}});
6262
}

test/module_test.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,13 +1435,13 @@ TEST_CASE(hoist_external_inputs_no_movement_needed)
14351435

14361436
// Fusion chain
14371437
auto dot1 = mm->add_instruction(migraphx::make_op("dot"), external1, external2);
1438-
auto add = add_pointwise(p, "main:pointwise3", {dot1, external3}, single_pointwise("add"));
1438+
auto add = add_pointwise(p, "main:pointwise3", {dot1, external3}, single_pointwise("add"));
14391439

14401440
mm->add_return({add});
14411441

14421442
// Record positions before hoist_external_inputs
14431443
auto dot1_pos_before = std::distance(mm->begin(), dot1);
1444-
auto add_pos_before = std::distance(mm->begin(), add);
1444+
auto add_pos_before = std::distance(mm->begin(), add);
14451445

14461446
mm->hoist_external_inputs(dot1, add);
14471447

@@ -1470,16 +1470,18 @@ TEST_CASE(hoist_external_inputs_multiple_external_branches)
14701470
auto dot1 = mm->add_instruction(migraphx::make_op("dot"), a, b); // {2, 4}
14711471

14721472
// External branch 1
1473-
auto ext1 = add_pointwise(p, "main:pointwise0", {c}, single_pointwise("relu")); // {2, 4}
1473+
auto ext1 = add_pointwise(p, "main:pointwise0", {c}, single_pointwise("relu")); // {2, 4}
14741474
auto ext2 = add_pointwise(p, "main:pointwise1", {ext1}, single_pointwise("neg")); // {2, 4}
14751475

14761476
// External branch 2
1477-
auto ext3 = add_pointwise(p, "main:pointwise2", {d}, single_pointwise("tanh")); // {4, 3}
1477+
auto ext3 = add_pointwise(p, "main:pointwise2", {d}, single_pointwise("tanh")); // {4, 3}
14781478
auto ext4 = add_pointwise(p, "main:pointwise3", {ext3}, single_pointwise("abs")); // {4, 3}
14791479

14801480
// Continue fusion chain using external branches
1481-
auto add1 = add_pointwise(p, "main:pointwise4", {dot1, ext2}, single_pointwise("add")); // {2, 4}
1482-
auto dot2 = mm->add_instruction(migraphx::make_op("dot"), add1, ext4); // {2, 4} x {4, 3} = {2, 3}
1481+
auto add1 =
1482+
add_pointwise(p, "main:pointwise4", {dot1, ext2}, single_pointwise("add")); // {2, 4}
1483+
auto dot2 =
1484+
mm->add_instruction(migraphx::make_op("dot"), add1, ext4); // {2, 4} x {4, 3} = {2, 3}
14831485

14841486
mm->add_return({dot2});
14851487

@@ -1554,16 +1556,17 @@ TEST_CASE(hoist_external_inputs_adjacent_instructions)
15541556
migraphx::program p;
15551557
auto* mm = p.get_main_module();
15561558

1557-
auto a = mm->add_parameter("a", s1); // {2, 3}
1558-
auto b = mm->add_parameter("b", s2); // {3, 4}
1559-
auto c = mm->add_parameter("c", s3); // {4, 5}
1559+
auto a = mm->add_parameter("a", s1); // {2, 3}
1560+
auto b = mm->add_parameter("b", s2); // {3, 4}
1561+
auto c = mm->add_parameter("c", s3); // {4, 5}
15601562

1561-
auto dot1 = mm->add_instruction(migraphx::make_op("dot"), a, b); // {2, 3} x {3, 4} = {2, 4}
1563+
auto dot1 = mm->add_instruction(migraphx::make_op("dot"), a, b); // {2, 3} x {3, 4} = {2, 4}
15621564

15631565
// External operation between dot1 and dot2
1564-
auto external = add_pointwise(p, "main:pointwise0", {c}, single_pointwise("relu")); // {4, 5}
1566+
auto external = add_pointwise(p, "main:pointwise0", {c}, single_pointwise("relu")); // {4, 5}
15651567

1566-
auto dot2 = mm->add_instruction(migraphx::make_op("dot"), dot1, external); // {2, 4} x {4, 5} = {2, 5}
1568+
auto dot2 =
1569+
mm->add_instruction(migraphx::make_op("dot"), dot1, external); // {2, 4} x {4, 5} = {2, 5}
15671570

15681571
mm->add_return({dot2});
15691572

0 commit comments

Comments
 (0)