This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor] InsertSliceOp verification.
ClosedPublic

Authored by nicolasvasilache on Nov 29 2021, 8:18 AM.

Details

Summary

This revision reintroduces tensor.insert_slice verification which seems
to have vanished over time: a verifier was initially introduced in cf9503c1b752062d9abfb2c7922a50574d9c5de4
but for some reason the invalid.mlir was not properly updated; as time passed the verifier was not called anymore and later the code was deleted.

As a consequence, a non-negligible portion of tests has run astray using invalid
tensor.insert_slice semantics and needed to be fixed.

Also, extract isRankReducedType from TensorOps for better reuse
Originally, this facility was used by both tensor and memref forms but
it got copied around as dialects were split.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Nov 29 2021, 8:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 8:18 AM
rriddle added inline comments.Nov 29 2021, 11:10 AM
mlir/include/mlir/IR/BuiltinTypes.h
384–386

Please document this.

mlir/lib/IR/BuiltinTypes.cpp
598

errMsg looks unused here.

Overall looks fine, except for the one comment above.

mlir/include/mlir/Dialect/Utils/StaticValueUtils.h
34

I am not following the use of this call back

ThomasRaoux accepted this revision.Nov 30 2021, 12:08 PM
This revision is now accepted and ready to land.Nov 30 2021, 12:08 PM
nicolasvasilache marked 3 inline comments as done.

Address and rebase.

This revision was landed with ongoing or failed builds.Nov 30 2021, 12:38 PM
This revision was automatically updated to reflect the committed changes.
mlir/include/mlir/Dialect/Utils/StaticValueUtils.h
34

This was premature, removed.