This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize] Support TensorExpand/CollapseShape
ClosedPublic

Authored by springerm on Oct 25 2021, 9:22 PM.

Diff Detail

Event Timeline

springerm created this revision.Oct 25 2021, 9:22 PM
springerm requested review of this revision.Oct 25 2021, 9:22 PM
nicolasvasilache accepted this revision.Oct 28 2021, 6:21 AM
nicolasvasilache added inline comments.
mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
1993 ↗(On Diff #382495)

can we use something like:

llvm::map_iterator(
  attr.cast<ArrayAttr>().getAsValueRange<IntegerAttr>(),
  [](const APInt &val) { return !val.getInt(); }))

?

1997 ↗(On Diff #382495)

dyn_cast + assert is an anti-pattern FWIH, you can just cast

This revision is now accepted and ready to land.Oct 28 2021, 6:21 AM
This revision was landed with ongoing or failed builds.Feb 15 2022, 2:57 AM
This revision was automatically updated to reflect the committed changes.