This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add static offset support for ViewOp's source memref.
AbandonedPublic

Authored by timshen on May 5 2020, 4:41 PM.

Details

Summary

Discussion is here: https://llvm.discourse.group/t/viewop-isnt-expressive-enough/991/9.

The fix is not the same as discussed in the thread. It instead partially support non-identity affine maps for the source memref. Currently, only static offset support is added.

Diff Detail

Event Timeline

timshen created this revision.May 5 2020, 4:41 PM
Herald added a project: Restricted Project. · View Herald Transcript
timshen edited the summary of this revision. (Show Details)May 5 2020, 4:44 PM
timshen edited projects, added Restricted Project; removed Restricted Project.
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2020, 4:44 PM

I started reading the revision but I believe that this is only solving a part of the problem, which happens to be your particular blocker.
I believe the required changes are much deeper and after experimenting a bit I find that a good chunk of the ViewOp semantics is unnecessary.
See: https://reviews.llvm.org/D79541 and in particular the update to Ops.td.

Also @andydavis1 for visibility since this also spawns discussions we had a while back.

mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
2625

if(!ShapedType::isDynamicOffsetOrStride(baseOffset))

mlir/lib/Dialect/StandardOps/IR/Ops.cpp
2712

<< baseType or you'll get wrong error messages.

2715

<< baseType or you'll get wrong error messages.

mlir/test/IR/invalid-ops.mlir
960

wrong error message

nicolasvasilache resigned from this revision.May 20 2020, 5:29 AM

I think this is now obsolete but please add me back if it isn't

timshen abandoned this revision.May 27 2020, 5:17 PM