Commit 7aee6388 authored by Khalique Ahmed's avatar Khalique Ahmed
Browse files

formatting

parent 225cd3a4
...@@ -166,7 +166,7 @@ static void remove_contiguous_noops(const std::string& op_name, module& m) ...@@ -166,7 +166,7 @@ static void remove_contiguous_noops(const std::string& op_name, module& m)
{ {
for(auto ins : iterator_for(m)) for(auto ins : iterator_for(m))
{ {
if (ins->name() != op_name) if(ins->name() != op_name)
continue; continue;
if(ins->inputs().front()->get_shape() != ins->get_shape()) if(ins->inputs().front()->get_shape() != ins->get_shape())
continue; continue;
......
...@@ -149,8 +149,8 @@ TEST_CASE(two_transpose_gather) ...@@ -149,8 +149,8 @@ TEST_CASE(two_transpose_gather)
auto ctd = m2.add_instruction(migraphx::make_op("contiguous"), td); auto ctd = m2.add_instruction(migraphx::make_op("contiguous"), td);
auto sd = m2.add_instruction(migraphx::make_op("softmax", {{"axis", 2}}), ctd); auto sd = m2.add_instruction(migraphx::make_op("softmax", {{"axis", 2}}), ctd);
auto csd = m2.add_instruction(migraphx::make_op("contiguous"), sd); auto csd = m2.add_instruction(migraphx::make_op("contiguous"), sd);
auto bd = auto bd = m2.add_instruction(
m2.add_instruction(migraphx::make_op("transpose", {{"permutation", {0, 3, 1, 2}}}), csd); migraphx::make_op("transpose", {{"permutation", {0, 3, 1, 2}}}), csd);
auto cbd = m2.add_instruction(migraphx::make_op("contiguous"), bd); auto cbd = m2.add_instruction(migraphx::make_op("contiguous"), bd);
auto r = m2.add_instruction(migraphx::make_op("gather", {{"axis", 2}}), cbd, ind); auto r = m2.add_instruction(migraphx::make_op("gather", {{"axis", 2}}), cbd, ind);
auto cr = m2.add_instruction(migraphx::make_op("contiguous"), r); auto cr = m2.add_instruction(migraphx::make_op("contiguous"), r);
......
...@@ -179,8 +179,8 @@ TEST_CASE(quant_dot_trans) ...@@ -179,8 +179,8 @@ TEST_CASE(quant_dot_trans)
auto tl1_alpha_int32 = auto tl1_alpha_int32 =
m.add_instruction(make_precompile_op("mul"), alpha_broadcast, tl1_convert, mul_alloc); m.add_instruction(make_precompile_op("mul"), alpha_broadcast, tl1_convert, mul_alloc);
// convert mul_res to int8 // convert mul_res to int8
auto tl1_alpha_int8_alloc = m.add_instruction(migraphx::make_op( auto tl1_alpha_int8_alloc = m.add_instruction(
"hip::allocate", {{"shape", migraphx::to_value(ts1)}})); migraphx::make_op("hip::allocate", {{"shape", migraphx::to_value(ts1)}}));
auto tl1_alpha_int8 = auto tl1_alpha_int8 =
m.add_instruction(make_precompile_op(migraphx::make_op( m.add_instruction(make_precompile_op(migraphx::make_op(
"convert", {{"target_type", tl1->get_shape().type()}})), "convert", {{"target_type", tl1->get_shape().type()}})),
...@@ -381,8 +381,8 @@ TEST_CASE(quant_dot_trans_pad) ...@@ -381,8 +381,8 @@ TEST_CASE(quant_dot_trans_pad)
auto tl1_alpha_int32 = auto tl1_alpha_int32 =
m.add_instruction(make_precompile_op("mul"), alpha_broadcast, tl1_convert, mul_alloc); m.add_instruction(make_precompile_op("mul"), alpha_broadcast, tl1_convert, mul_alloc);
// convert mul_res to int8 // convert mul_res to int8
auto tl1_alpha_int8_alloc = m.add_instruction(migraphx::make_op( auto tl1_alpha_int8_alloc = m.add_instruction(
"hip::allocate", {{"shape", migraphx::to_value(ts1)}})); migraphx::make_op("hip::allocate", {{"shape", migraphx::to_value(ts1)}}));
migraphx::instruction_ref pta{}; migraphx::instruction_ref pta{};
if(int8_x4) if(int8_x4)
...@@ -391,9 +391,8 @@ TEST_CASE(quant_dot_trans_pad) ...@@ -391,9 +391,8 @@ TEST_CASE(quant_dot_trans_pad)
migraphx::make_op("hip::allocate", {{"shape", migraphx::to_value(ps1)}})); migraphx::make_op("hip::allocate", {{"shape", migraphx::to_value(ps1)}}));
} }
auto tl1_alpha_int8 = auto tl1_alpha_int8 = m.add_instruction(
m.add_instruction(make_precompile_op(migraphx::make_op( make_precompile_op(migraphx::make_op("convert", {{"target_type", ts1.type()}})),
"convert", {{"target_type", ts1.type()}})),
tl1_alpha_int32, tl1_alpha_int32,
tl1_alpha_int8_alloc); tl1_alpha_int8_alloc);
......
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