This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Fix rank-reduced cases for extract/insert slice in DropUnitDims
Needs ReviewPublic

Authored by qedawkins on Apr 3 2023, 5:41 PM.

Details

Summary

Inferring the reshape reassociation indices for extract/insert slice
ops based on the read sizes of the original slicing op will generate
an invalid expand/collapse shape op for already rank-reduced
cases. Instead just infer from the shape of the slice.

Diff Detail

Event Timeline

qedawkins created this revision.Apr 3 2023, 5:41 PM
qedawkins requested review of this revision.Apr 3 2023, 5:41 PM
mravishankar added inline comments.Apr 17 2023, 11:41 PM
mlir/lib/Dialect/Linalg/Utils/Utils.cpp
1112 ↗(On Diff #510652)

I dont think this needs to change to int64_t.

qedawkins updated this revision to Diff 515458.Apr 20 2023, 1:23 PM

Leave utility function alone