Page MenuHomePhabricator

[mlir][tensor] Keep size-1 dim for non-rank-reducing extract_slice

Authored by antiagainst on Feb 10 2022, 9:28 AM.



This commit fixes a crash for cases like:

%0 = tensor.extract_slice %arg0[0, 0] [%c1, %size] [1, 1] :
  tensor<?x?xf32> to tensor<?x?xf32>

Previous the first size-1 dimension will be dropped, thus causing
an mismatch in tensor rank.

Depends On D117020

Diff Detail

Event Timeline

antiagainst created this revision.Feb 10 2022, 9:28 AM
antiagainst requested review of this revision.Feb 10 2022, 9:28 AM

This by itself is fine, but it might be hiding an error on the caller side. Can you tell me where the call site is when the crash happens.

antiagainst planned changes to this revision.Feb 23 2022, 6:36 PM
mravishankar resigned from this revision.May 9 2022, 3:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 9 2022, 3:37 PM
antiagainst abandoned this revision.Tue, Jun 14, 8:49 AM