Unverified Commit 8a89b7f8 authored by Paul Fultz II's avatar Paul Fultz II Committed by GitHub
Browse files

Fix bug with transpose and pad (#497)



* Fix bug with transpose and pad

* Formatting
Co-authored-by: default avatarmvermeulen <5479696+mvermeulen@users.noreply.github.com>
parent dfaab007
......@@ -9,6 +9,7 @@ namespace gpu {
shape hip_pad::compute_shape(std::vector<shape> inputs) const
{
inputs.pop_back();
check_shapes{inputs, *this}.has(1).standard();
return op.compute_shape(inputs);
}
......
......@@ -2238,6 +2238,19 @@ struct test_pad : verify_program<test_pad>
}
};
struct test_pad_transposed : verify_program<test_pad_transposed>
{
migraphx::program create_program() const
{
migraphx::program p;
migraphx::shape s{migraphx::shape::int32_type, {1, 224, 224, 3}};
auto x = p.add_parameter("x", s);
auto t = p.add_instruction(migraphx::op::transpose{{0, 3, 1, 2}}, x);
p.add_instruction(migraphx::op::pad{{0, 0, 2, 2, 0, 0, 3, 3}}, t);
return p;
}
};
struct test_pad_int8 : verify_program<test_pad_int8>
{
migraphx::program create_program() const
......
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