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
920e33a7
Commit
920e33a7
authored
Oct 28, 2022
by
charlie
Browse files
add neg axes test
parent
bbe210f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
test/op_shape_test.cpp
test/op_shape_test.cpp
+11
-0
No files found.
test/op_shape_test.cpp
View file @
920e33a7
...
...
@@ -2031,6 +2031,17 @@ TEST_CASE(test_unsqueeze_dyn)
throws_shape
(
migraphx
::
make_op
(
"unsqueeze"
,
{{
"axes"
,
{
2
,
4
}},
{
"steps"
,
{
2
}}}),
s1
);
}
TEST_CASE
(
test_unsqueeze_dyn_neg_axes
)
{
migraphx
::
shape
s1
{
migraphx
::
shape
::
float_type
,
{{
1
,
4
,
3
},
{
2
,
5
,
0
},
{
3
,
3
,
0
}}};
migraphx
::
shape
s2
{
migraphx
::
shape
::
float_type
,
{{
1
,
4
,
3
},
{
2
,
5
,
0
},
{
1
,
1
,
0
},
{
3
,
3
,
0
}}};
expect_shape
(
s2
,
migraphx
::
make_op
(
"unsqueeze"
,
{{
"axes"
,
{
-
2
}}}),
s1
);
migraphx
::
shape
s3
{
migraphx
::
shape
::
float_type
,
{{
1
,
4
,
3
},
{
2
,
5
,
0
},
{
1
,
1
,
0
},
{
3
,
3
,
0
},
{
1
,
1
,
0
}}};
expect_shape
(
s3
,
migraphx
::
make_op
(
"unsqueeze"
,
{{
"axes"
,
{
-
1
,
-
3
}}}),
s1
);
}
TEST_CASE
(
test_unsqueeze_step
)
{
migraphx
::
shape
s1
{
migraphx
::
shape
::
float_type
,
{
4
,
5
,
12
}};
...
...
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