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
272bf6b1
Commit
272bf6b1
authored
Nov 07, 2018
by
Khalique
Browse files
add transpose onnx parsing
parent
8cae675e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+13
-0
test/onnx/transpose_test.onnx
test/onnx/transpose_test.onnx
+0
-0
No files found.
test/onnx/onnx_test.cpp
View file @
272bf6b1
...
...
@@ -146,6 +146,18 @@ void globalmaxpool_test()
EXPECT
(
p
==
prog
);
}
void
transpose_test
()
{
migraph
::
program
p
;
auto
input
=
p
.
add_parameter
(
"0"
,
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
2
,
2
,
3
}});
std
::
vector
<
int64_t
>
perm
{
0
,
3
,
1
,
2
};
p
.
add_instruction
(
migraph
::
op
::
transpose
{
perm
},
input
);
auto
prog
=
migraph
::
parse_onnx
(
"transpose_test.onnx"
);
EXPECT
(
p
==
prog
);
}
int
main
()
{
pytorch_conv_bias_test
();
...
...
@@ -156,4 +168,5 @@ int main()
imagescaler_test
();
globalavgpool_test
();
globalmaxpool_test
();
transpose_test
();
}
test/onnx/transpose_test.onnx
0 → 100644
View file @
272bf6b1
File added
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