Commit 18e0c3fb authored by Paul's avatar Paul
Browse files

Format

parent 9c6eab14
...@@ -1122,7 +1122,7 @@ TEST_CASE(transpose_unsqueeze_concat) ...@@ -1122,7 +1122,7 @@ TEST_CASE(transpose_unsqueeze_concat)
{ {
migraphx::module m1; migraphx::module m1;
{ {
auto l0 = m1.add_parameter("0", migraphx::shape{migraphx::shape::float_type, {1, 2, 1, 1}}); auto l0 = m1.add_parameter("0", migraphx::shape{migraphx::shape::float_type, {1, 2, 1, 1}});
auto lt0 = auto lt0 =
m1.add_instruction(migraphx::make_op("transpose", {{"permutation", {0, 2, 3, 1}}}), l0); m1.add_instruction(migraphx::make_op("transpose", {{"permutation", {0, 2, 3, 1}}}), l0);
auto l1 = m1.add_parameter("1", migraphx::shape{migraphx::shape::float_type, {1, 2, 1, 1}}); auto l1 = m1.add_parameter("1", migraphx::shape{migraphx::shape::float_type, {1, 2, 1, 1}});
...@@ -1135,15 +1135,14 @@ TEST_CASE(transpose_unsqueeze_concat) ...@@ -1135,15 +1135,14 @@ TEST_CASE(transpose_unsqueeze_concat)
std::vector<migraphx::instruction_ref> unsqueezed_args; std::vector<migraphx::instruction_ref> unsqueezed_args;
int64_t axis = 3; int64_t axis = 3;
std::transform(args.begin(), std::transform(
args.end(), args.begin(),
std::back_inserter(unsqueezed_args), args.end(),
[&](migraphx::instruction_ref arg) { std::back_inserter(unsqueezed_args),
return m1.add_instruction( [&](migraphx::instruction_ref arg) {
migraphx::make_op("unsqueeze", {{"axes", {axis}}}), arg); return m1.add_instruction(migraphx::make_op("unsqueeze", {{"axes", {axis}}}), arg);
}); });
m1.add_instruction(migraphx::make_op("concat", {{"axis", axis}}), m1.add_instruction(migraphx::make_op("concat", {{"axis", axis}}), unsqueezed_args);
unsqueezed_args);
} }
// TODO: This could be simplified to a single transpose after concat // TODO: This could be simplified to a single transpose after concat
migraphx::module m2 = m1; migraphx::module m2 = m1;
......
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