This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Standard] Allow unranked memrefs as operands to dim and rank
ClosedPublic

Authored by herhut on Jul 28 2020, 12:35 PM.

Details

Summary

std.dim currently only accepts ranked memrefs and std.rank is limited to tensors.

Diff Detail

Event Timeline

herhut created this revision.Jul 28 2020, 12:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2020, 12:35 PM
herhut requested review of this revision.Jul 28 2020, 12:35 PM

Please fix the broken test.

mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
1412

Irrelevant to this commit, but I find it confusing that AnyRankedOrUnrankedMemRef is less strict than AnyMemRef.

herhut updated this revision to Diff 281504.Jul 29 2020, 3:51 AM

Fix test

mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
1412

I agree, I found this confusing and got it wrong. I thought about cleaning this up but the problem is that if I modify the type constraints than downstream users will see changes in their dialect and likely won't notice, as we widen the meaning of AnyMemRef. Any ideas on a good process to clean this up?

ftynse accepted this revision.Jul 29 2020, 4:06 AM
ftynse added inline comments.
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
1412

I'd post an announcement on Discourse saying you intend to do this by <date> and give people some time to react. IMO, a week should be okay.

This revision is now accepted and ready to land.Jul 29 2020, 4:06 AM