Commit 766427c9 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 108599df
...@@ -31,7 +31,7 @@ struct reduce_mean ...@@ -31,7 +31,7 @@ struct reduce_mean
auto lens = s.lens(); auto lens = s.lens();
for(auto axis : axes) for(auto axis : axes)
{ {
if (axis < 0 or axis >= lens.size()) if(axis < 0 or axis >= lens.size())
MIGRAPHX_THROW("REDUCE_MEAN: axis out of range"); MIGRAPHX_THROW("REDUCE_MEAN: axis out of range");
lens[axis] = 1; lens[axis] = 1;
} }
......
...@@ -31,7 +31,7 @@ struct reduce_sum ...@@ -31,7 +31,7 @@ struct reduce_sum
auto lens = s.lens(); auto lens = s.lens();
for(auto axis : axes) for(auto axis : axes)
{ {
if (axis < 0 or axis >= lens.size()) if(axis < 0 or axis >= lens.size())
MIGRAPHX_THROW("REDUCE_SUM: axis out of range"); MIGRAPHX_THROW("REDUCE_SUM: axis out of range");
lens[axis] = 1; lens[axis] = 1;
} }
......
...@@ -1823,5 +1823,4 @@ TEST_CASE(reduce_mean_test12) ...@@ -1823,5 +1823,4 @@ TEST_CASE(reduce_mean_test12)
EXPECT(results_vector == gold); EXPECT(results_vector == gold);
} }
int main(int argc, const char* argv[]) { test::run(argc, argv); } int main(int argc, const char* argv[]) { test::run(argc, argv); }
...@@ -394,22 +394,30 @@ TEST_CASE(test_argmax) ...@@ -394,22 +394,30 @@ TEST_CASE(test_argmax)
{ {
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {1, 3, 4, 5}}, migraphx::op::argmax{0}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {1, 3, 4, 5}},
migraphx::op::argmax{0},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 1, 4, 5}}, migraphx::op::argmax{1}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 1, 4, 5}},
migraphx::op::argmax{1},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 1, 5}}, migraphx::op::argmax{2}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 1, 5}},
migraphx::op::argmax{2},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 4, 1}}, migraphx::op::argmax{3}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 4, 1}},
migraphx::op::argmax{3},
input);
} }
{ {
...@@ -422,22 +430,30 @@ TEST_CASE(test_argmin) ...@@ -422,22 +430,30 @@ TEST_CASE(test_argmin)
{ {
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {1, 3, 4, 5}}, migraphx::op::argmin{0}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {1, 3, 4, 5}},
migraphx::op::argmin{0},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 1, 4, 5}}, migraphx::op::argmin{1}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 1, 4, 5}},
migraphx::op::argmin{1},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 1, 5}}, migraphx::op::argmin{2}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 1, 5}},
migraphx::op::argmin{2},
input);
} }
{ {
migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::half_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 4, 1}}, migraphx::op::argmin{3}, input); expect_shape(migraphx::shape{migraphx::shape::int64_type, {2, 3, 4, 1}},
migraphx::op::argmin{3},
input);
} }
{ {
......
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