Commit 65bb60ea authored by Shucai Xiao's avatar Shucai Xiao
Browse files

Merge branch 'sub_gpu_implementation' into gru_operator

parents eae8d5c4 89120fa1
...@@ -515,92 +515,6 @@ struct test_sub2 ...@@ -515,92 +515,6 @@ struct test_sub2
} }
}; };
struct test_sub_broadcast
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 2, 3}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {2, 2}});
auto by = p.add_instruction(migraphx::op::broadcast{0, x->get_shape()}, y);
p.add_instruction(migraphx::op::sub{}, x, by);
return p;
}
};
struct test_sub_broadcast2
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 3, 4}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {3}});
auto by = p.add_instruction(migraphx::op::broadcast{1, x->get_shape()}, y);
p.add_instruction(migraphx::op::sub{}, x, by);
return p;
}
};
struct test_sub_broadcast3
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 4, 5}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {4}});
auto by = p.add_instruction(migraphx::op::broadcast{1, x->get_shape()}, y);
p.add_instruction(migraphx::op::sub{}, x, by);
return p;
}
};
struct test_sub_broadcast4
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 3, 5}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {3}});
auto by = p.add_instruction(migraphx::op::broadcast{1, x->get_shape()}, y);
p.add_instruction(migraphx::op::sub{}, x, by);
return p;
}
};
struct test_sub_broadcast5
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 4, 8}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {4}});
auto by = p.add_instruction(migraphx::op::broadcast{1, x->get_shape()}, y);
p.add_instruction(migraphx::op::sub{}, x, by);
return p;
}
};
struct test_sub_broadcast6
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::float_type, {3}};
auto x = p.add_parameter("x", {migraphx::shape::float_type, {2, 2, 3}});
auto y = p.add_parameter("y", {migraphx::shape::float_type, {2, 2}});
auto z = p.add_parameter("z", {migraphx::shape::float_type, {2, 2, 3}});
auto by = p.add_instruction(migraphx::op::broadcast{0, x->get_shape()}, y);
auto diff = p.add_instruction(migraphx::op::sub{}, x, by);
p.add_instruction(migraphx::op::sub{}, diff, z);
return p;
}
};
struct test_softmax struct test_softmax
{ {
migraphx::program create_program() const migraphx::program create_program() const
...@@ -1623,12 +1537,6 @@ int main() ...@@ -1623,12 +1537,6 @@ int main()
verify_program<test_triadd_broadcast>(); verify_program<test_triadd_broadcast>();
verify_program<test_sub>(); verify_program<test_sub>();
verify_program<test_sub2>(); verify_program<test_sub2>();
verify_program<test_sub_broadcast>();
verify_program<test_sub_broadcast2>();
verify_program<test_sub_broadcast3>();
verify_program<test_sub_broadcast4>();
verify_program<test_sub_broadcast5>();
verify_program<test_sub_broadcast6>();
verify_program<test_softmax>(); verify_program<test_softmax>();
verify_program<test_softmax2>(); verify_program<test_softmax2>();
verify_program<test_conv>(); verify_program<test_conv>();
......
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