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
8597b67b
Unverified
Commit
8597b67b
authored
Feb 05, 2019
by
Paul Fultz II
Committed by
GitHub
Feb 05, 2019
Browse files
Merge pull request #166 from ROCmSoftwarePlatform/reshape_tests
Reshape tests
parents
c180f601
bb3a181e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
test/op_shape_test.cpp
test/op_shape_test.cpp
+18
-1
No files found.
test/op_shape_test.cpp
View file @
8597b67b
...
@@ -108,10 +108,27 @@ TEST_CASE(reshape_shape)
...
@@ -108,10 +108,27 @@ TEST_CASE(reshape_shape)
expect_shape
(
output
,
migraphx
::
op
::
reshape
{
new_shape
},
input
);
expect_shape
(
output
,
migraphx
::
op
::
reshape
{
new_shape
},
input
);
}
}
for
(
auto
&&
new_shape
:
std
::
vector
<
std
::
vector
<
int64_t
>>
{{
8
,
3
,
2
,
2
},
{
1
,
3
,
-
1
,
-
1
}})
for
(
auto
&&
new_shape
:
std
::
vector
<
std
::
vector
<
int64_t
>>
{{
8
,
3
,
2
,
2
},
{
1
,
3
,
-
1
,
-
1
},
{
3
,
0
,
0
},
{
3
,
2
,
0
}})
{
{
throws_shape
(
migraphx
::
op
::
reshape
{
new_shape
},
input
);
throws_shape
(
migraphx
::
op
::
reshape
{
new_shape
},
input
);
}
}
std
::
vector
<
std
::
pair
<
std
::
vector
<
int64_t
>
,
migraphx
::
shape
>>
minus1_tests
{
{{
2
,
-
1
,
3
},
{
migraphx
::
shape
::
float_type
,
{
2
,
4
,
3
}}},
{{
0
,
-
1
,
0
},
{
migraphx
::
shape
::
float_type
,
{
24
,
1
,
1
}}},
{{
2
,
-
1
,
0
},
{
migraphx
::
shape
::
float_type
,
{
2
,
12
,
1
}}},
{{
0
,
0
,
-
1
},
{
migraphx
::
shape
::
float_type
,
{
24
,
1
,
1
}}},
{{
2
,
0
,
-
1
},
{
migraphx
::
shape
::
float_type
,
{
2
,
1
,
12
}}},
{{
-
1
,
2
,
3
},
{
migraphx
::
shape
::
float_type
,
{
4
,
2
,
3
}}},
{{
-
1
,
0
,
3
},
{
migraphx
::
shape
::
float_type
,
{
8
,
1
,
3
}}},
{{
-
1
,
0
,
0
},
{
migraphx
::
shape
::
float_type
,
{
24
,
1
,
1
}}},
{{
-
1
,
3
,
0
},
{
migraphx
::
shape
::
float_type
,
{
8
,
3
,
1
}}}};
for
(
auto
&
it
:
minus1_tests
)
{
expect_shape
(
it
.
second
,
migraphx
::
op
::
reshape
{
it
.
first
},
input
);
}
}
}
TEST_CASE
(
flatten_shape
)
TEST_CASE
(
flatten_shape
)
...
...
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