Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
ccc91470
Commit
ccc91470
authored
May 31, 2019
by
Khalique
Browse files
formatting
parent
195753c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
24 deletions
+8
-24
test/op_shape_test.cpp
test/op_shape_test.cpp
+8
-24
No files found.
test/op_shape_test.cpp
View file @
ccc91470
...
...
@@ -346,35 +346,27 @@ TEST_CASE(gather)
}
}
template
<
class
T
>
template
<
class
T
>
void
test_softmax_variations
(
T
,
bool
is_logsoftmax
)
{
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
0
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
0
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
1
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
1
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
2
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
2
},
input
);
}
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
3
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
3
},
input
);
}
{
...
...
@@ -390,23 +382,15 @@ void test_softmax_variations(T, bool is_logsoftmax)
{
migraphx
::
shape
input
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}};
if
(
is_logsoftmax
)
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
4
},
input
);
expect_shape
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
3
,
4
,
5
}},
T
{
4
},
input
);
else
throws_shape
(
T
{
4
},
input
);
}
}
TEST_CASE
(
softmax
)
{
test_softmax_variations
(
migraphx
::
op
::
softmax
{},
false
);
}
TEST_CASE
(
softmax
)
{
test_softmax_variations
(
migraphx
::
op
::
softmax
{},
false
);
}
TEST_CASE
(
logsoftmax
)
{
test_softmax_variations
(
migraphx
::
op
::
logsoftmax
{},
true
);
}
TEST_CASE
(
logsoftmax
)
{
test_softmax_variations
(
migraphx
::
op
::
logsoftmax
{},
true
);
}
// 2 inputs arguments
TEST_CASE
(
matmul
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment