Skip to content

Commit

Permalink
Return undef if original layout contains splitted axes
Browse files Browse the repository at this point in the history
  • Loading branch information
vinx13 committed Apr 9, 2019
1 parent d1056fc commit 89798fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/relay/op/tensor/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,10 @@ Array<Array<Layout> > StridedSliceInferCorrectLayout(

for (size_t i = 0; i < params->begin.size(); i++) {
const LayoutAxis& axis = layout[i];
CHECK(axis.IsPrimal());
if (!axis.IsPrimal()) {
// original layout that contains splitted axes is not supported
return {{Layout::Undef()}, {Layout::Undef()}};
}
auto factor = new_layout.FactorOf(axis);
if (factor == -1) {
new_begin.push_back(params->begin[i]);
Expand Down

0 comments on commit 89798fd

Please sign in to comment.