Skip to content

Commit

Permalink
Fix transposed padding (#3342)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Aug 16, 2024
1 parent b8f69be commit 05b2ff4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/include/migraphx/op/pad.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ struct pad
{
rdims[i] += pads[i] + pads[i + num_dims];
}
shape s{s0.type(), rdims};
return s;
return s0.with_lens(rdims);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/targets/gpu/jit/pad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct pad_compiler : compiler<pad_compiler>

auto vinputs = inputs;
vinputs.push_back(inputs.front().with_lens(offset_lens));
auto rinputs = reduce_dims(vinputs);
auto rinputs = reduce_dims(normalize_permutation(vinputs));

auto rinput_lens = rinputs.front().lens();
auto roffset_lens = rinputs.back().lens();
Expand Down

0 comments on commit 05b2ff4

Please sign in to comment.