Commit ccc91470 authored by Khalique's avatar Khalique
Browse files

formatting

parent 195753c4
...@@ -346,35 +346,27 @@ TEST_CASE(gather) ...@@ -346,35 +346,27 @@ TEST_CASE(gather)
} }
} }
template<class T> template <class T>
void test_softmax_variations(T, bool is_logsoftmax) void test_softmax_variations(T, bool is_logsoftmax)
{ {
{ {
migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, T{0}, input);
T{0},
input);
} }
{ {
migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, T{1}, input);
T{1},
input);
} }
{ {
migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, T{2}, input);
T{2},
input);
} }
{ {
migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}};
expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, T{3}, input);
T{3},
input);
} }
{ {
...@@ -390,23 +382,15 @@ void test_softmax_variations(T, bool is_logsoftmax) ...@@ -390,23 +382,15 @@ void test_softmax_variations(T, bool is_logsoftmax)
{ {
migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}}; migraphx::shape input{migraphx::shape::float_type, {2, 3, 4, 5}};
if(is_logsoftmax) if(is_logsoftmax)
expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, expect_shape(migraphx::shape{migraphx::shape::float_type, {2, 3, 4, 5}}, T{4}, input);
T{4},
input);
else else
throws_shape(T{4}, input); throws_shape(T{4}, input);
} }
} }
TEST_CASE(softmax) TEST_CASE(softmax) { test_softmax_variations(migraphx::op::softmax{}, false); }
{
test_softmax_variations(migraphx::op::softmax{}, false);
}
TEST_CASE(logsoftmax) TEST_CASE(logsoftmax) { test_softmax_variations(migraphx::op::logsoftmax{}, true); }
{
test_softmax_variations(migraphx::op::logsoftmax{}, true);
}
// 2 inputs arguments // 2 inputs arguments
TEST_CASE(matmul) TEST_CASE(matmul)
......
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