Commit 1c71060e authored by Khalique's avatar Khalique
Browse files

added onnx pad test

parent f1ab5ed2
...@@ -940,11 +940,17 @@ struct test_pad ...@@ -940,11 +940,17 @@ struct test_pad
{ {
migraphx::program p; migraphx::program p;
migraphx::shape s0{migraphx::shape::int32_type, {1, 96, 165, 165}}; 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); 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 struct test_gather
{ {
...@@ -1047,6 +1053,7 @@ struct test_conv_bn_relu_pooling2 ...@@ -1047,6 +1053,7 @@ struct test_conv_bn_relu_pooling2
int main() int main()
{ {
verify_program<test_pad>();
verify_program<test_abs>(); verify_program<test_abs>();
verify_program<test_concat>(); verify_program<test_concat>();
verify_program<test_concat2>(); verify_program<test_concat2>();
......
...@@ -561,4 +561,12 @@ TEST_CASE(group_conv_test) ...@@ -561,4 +561,12 @@ TEST_CASE(group_conv_test)
migraphx::parse_onnx("group_conv_test.onnx"); 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); } int main(int argc, const char* argv[]) { test::run(argc, argv); }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment