Unverified Commit 5b888363 authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Merge pull request #99 from ROCmSoftwarePlatform/gpu_slice_test

add the slice test example on gpu.
parents f958d56f ee80cee9
......@@ -216,6 +216,21 @@ struct test_scale
}
};
struct test_slice
{
migraph::program create_program() const
{
migraph::program p;
migraph::shape s{migraph::shape::int32_type, {2, 2, 4}};
auto x = p.add_parameter("x", s);
auto y = p.add_parameter("y", {migraph::shape::int32_type, {2, 2, 2}});
auto slice0 = p.add_instruction(migraph::op::slice{{2}, {0}, {2}}, x);
p.add_instruction(migraph::op::add{}, y, slice0);
return p;
}
};
struct test_triadd
{
migraph::program create_program() const
......@@ -840,4 +855,5 @@ int main()
verify_program<test_conv_bn>();
verify_program<test_conv_bn_relu_pooling>();
verify_program<test_conv_bn_relu_pooling2>();
verify_program<test_slice>();
}
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