Commit 4b7a267a authored by Paul's avatar Paul
Browse files

Merge from develop

parents 92803edf af00eea8
#include <migraphx/schedule.hpp> #include <migraphx/schedule.hpp>
#include <migraphx/operators.hpp> #include <migraphx/op/identity.hpp>
#include <migraphx/generate.hpp> #include <migraphx/generate.hpp>
#include <migraphx/instruction.hpp> #include <migraphx/instruction.hpp>
#include <migraphx/iterator_for.hpp> #include <migraphx/iterator_for.hpp>
......
.
0 Placeholder*
shape:*
dtype0
.
1 Placeholder*
dtype0*
shape:
.
2 Placeholder*
dtype0*
shape:
4
pack1Pack012*
T0*
axis*
N"
\ No newline at end of file
...@@ -129,6 +129,28 @@ TEST_CASE(identity_test) ...@@ -129,6 +129,28 @@ TEST_CASE(identity_test)
EXPECT(p == prog); EXPECT(p == prog);
} }
TEST_CASE(pack_test)
{
migraphx::program p;
auto l0 = p.add_parameter("0", migraphx::shape{migraphx::shape::float_type, {2}});
auto l1 = p.add_parameter("1", migraphx::shape{migraphx::shape::float_type, {2}});
auto l2 = p.add_parameter("2", migraphx::shape{migraphx::shape::float_type, {2}});
std::vector<migraphx::instruction_ref> args{l0, l1, l2};
std::vector<migraphx::instruction_ref> unsqueezed_args;
int64_t axis = 1;
std::transform(args.begin(),
args.end(),
std::back_inserter(unsqueezed_args),
[&](migraphx::instruction_ref arg) {
return p.add_instruction(migraphx::op::unsqueeze{{axis}}, arg);
});
p.add_instruction(migraphx::op::concat{static_cast<size_t>(axis)}, unsqueezed_args);
auto prog = migraphx::parse_tf("pack_test.pb", false);
EXPECT(p == prog);
}
TEST_CASE(pooling_test) TEST_CASE(pooling_test)
{ {
migraphx::program p; migraphx::program p;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <utility> #include <utility>
#include <migraphx/operation.hpp> #include <migraphx/operation.hpp>
#include <migraphx/operators.hpp> #include <migraphx/op/concat.hpp>
#include <migraphx/config.hpp> #include <migraphx/config.hpp>
namespace migraphx { namespace migraphx {
......
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