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
04b3214a
Commit
04b3214a
authored
Jan 16, 2019
by
Shucai Xiao
Browse files
Add a test for parsing shape operator.
parent
0d8a9768
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+12
-0
test/onnx/shape_test.onnx
test/onnx/shape_test.onnx
+14
-0
No files found.
test/onnx/onnx_test.cpp
View file @
04b3214a
...
...
@@ -400,6 +400,18 @@ TEST_CASE(reshape_test)
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
shape_test
)
{
migraphx
::
program
p
;
migraphx
::
shape
s
{
migraphx
::
shape
::
float_type
,
{
3
,
4
,
5
,
6
}};
auto
l0
=
p
.
add_parameter
(
"x"
,
s
);
migraphx
::
shape
s_shape
{
migraphx
::
shape
::
int64_type
,
{
4
}};
p
.
add_literal
(
s_shape
,
l0
->
get_shape
().
lens
());
auto
prog
=
migraphx
::
parse_onnx
(
"shape_test.onnx"
);
EXPECT
(
p
==
prog
);
}
TEST_CASE
(
gather_test
)
{
migraphx
::
program
p
;
...
...
test/onnx/shape_test.onnx
0 → 100644
View file @
04b3214a
shape-example:I
xy"Shape
test_shapeZ
x
b
y
B
\ No newline at end of file
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