This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor] Fold rank-reducing extract_slice with inverse expand_shape
ClosedPublic

Authored by springerm on Dec 2 2022, 12:28 PM.

Diff Detail

Event Timeline

springerm created this revision.Dec 2 2022, 12:28 PM
springerm requested review of this revision.Dec 2 2022, 12:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 2 2022, 12:28 PM
mravishankar accepted this revision.Dec 2 2022, 1:16 PM

Thank you for the revert and resending patch. Appreciate it! I meant to flag it just cause I saw it as a repeating pattern, and it justified being flagged. The patch itself is fine now, but want some clarification on why this interfered with https://reviews.llvm.org/D139118 . AFAICS it shouldnt (or is not meant to)

This revision is now accepted and ready to land.Dec 2 2022, 1:16 PM

In the very first version (when the two new patterns were canonicalization patterns), this used to interfere with populateFoldUnitExtentDimsPatterns, which also includes some canonicalization patterns. In the current revision, these two patterns must be added explicitly via populateReassociativeReshapeFoldingPatterns.