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
1c71060e
"...resnet50_tensorflow.git" did not exist on "30826f6b0fa4de8099519ff7175065beb417cab5"
Commit
1c71060e
authored
Jan 24, 2019
by
Khalique
Browse files
added onnx pad test
parent
f1ab5ed2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
test/gpu/miopen.cpp
test/gpu/miopen.cpp
+10
-3
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+8
-0
No files found.
test/gpu/miopen.cpp
View file @
1c71060e
...
...
@@ -940,11 +940,17 @@ struct test_pad
{
migraphx
::
program
p
;
migraphx
::
shape
s0
{
migraphx
::
shape
::
int32_type
,
{
1
,
96
,
165
,
165
}};
std
::
vector
<
int64_t
>
pads
=
{
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
};
std
::
vector
<
int64_t
>
pads0
=
{
0
,
0
,
0
,
0
,
0
,
0
,
1
,
1
};
std
::
vector
<
int64_t
>
pads1
=
{
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
};
std
::
vector
<
int64_t
>
pads2
=
{
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
};
std
::
vector
<
int64_t
>
pads3
=
{
1
,
0
,
1
,
0
,
1
,
0
,
2
,
0
};
auto
l0
=
p
.
add_parameter
(
"x"
,
s0
);
p
.
add_instruction
(
migraphx
::
op
::
pad
{
pads
},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
pad
{
pads0
},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
pad
{
pads1
},
l0
);
p
.
add_instruction
(
migraphx
::
op
::
pad
{
pads2
},
l0
);
return
p
;
}
}
}
;
struct
test_gather
{
...
...
@@ -1047,6 +1053,7 @@ struct test_conv_bn_relu_pooling2
int
main
()
{
verify_program
<
test_pad
>
();
verify_program
<
test_abs
>
();
verify_program
<
test_concat
>
();
verify_program
<
test_concat2
>
();
...
...
test/onnx/onnx_test.cpp
View file @
1c71060e
...
...
@@ -561,4 +561,12 @@ TEST_CASE(group_conv_test)
migraphx
::
parse_onnx
(
"group_conv_test.onnx"
);
}
TEST_CASE
(
pad_test
)
{
migraphx
::
program
p
;
auto
l0
=
p
.
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
,
2
}});
p
.
add_instruction
(
migraphx
::
op
::
pad
{{
1
,
1
,
1
,
1
}},
l0
);
migraphx
::
parse_onnx
(
"pad_test.onnx"
);
}
int
main
(
int
argc
,
const
char
*
argv
[])
{
test
::
run
(
argc
,
argv
);
}
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