This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Disallow ops with index semantics in `PushExpandingReshape`.
ClosedPublic

Authored by mravishankar on Jan 20 2022, 11:51 PM.

Details

Summary

This pattern is not written to handle operations with linalg.index
operations in its body, i.e. operations that have index semantics.

Diff Detail

Event Timeline

mravishankar created this revision.Jan 20 2022, 11:51 PM
mravishankar requested review of this revision.Jan 20 2022, 11:51 PM
ThomasRaoux accepted this revision.Jan 21 2022, 10:06 AM

Thanks Mahesh

This revision is now accepted and ready to land.Jan 21 2022, 10:06 AM

Looks like this is missing a test

Looks like this is missing a test

I am not sure this needs a test. Its avoiding application of a pattern on ops that have indexing semantics. It is one of the preconditions for the pattern (like op having tensor semantics or all parallel iterators).

Looks like this is missing a test

I am not sure this needs a test. Its avoiding application of a pattern on ops that have indexing semantics. It is one of the preconditions for the pattern (like op having tensor semantics or all parallel iterators).

This is changing the behavior of the pattern though right? I would expect a new test that checks that this pattern isn't applied on those ops.

Looks like this is missing a test

I am not sure this needs a test. Its avoiding application of a pattern on ops that have indexing semantics. It is one of the preconditions for the pattern (like op having tensor semantics or all parallel iterators).

This is changing the behavior of the pattern though right? I would expect a new test that checks that this pattern isn't applied on those ops.

It is changing in the sense this was the oversight when initially written. I can add a test, but just for clarification, there are no tests for whether the pattern applies on generic op without tensor semantics or on generic op without all parallel loops. Its basically preconditions where the pattern should trigger. It was missed when the pattern was written initially. I am not trying to be difficult. I'll add a test if you suggest that it indeed needs a test. From my perspective it is not changing the pattern behavior in the sense that it wasn't meant to behave that way to start with.

I'll add a test if you suggest that it indeed needs a test. From my perspective it is not changing the pattern behavior in the sense that it wasn't meant to behave that way to start with.

But isn't what you're describing "fixing a bug"? I think River sees it this way and is asking for a "non regression test".
At least that's how I understand it, maybe you can elaborate against this?

I'll add a test if you suggest that it indeed needs a test. From my perspective it is not changing the pattern behavior in the sense that it wasn't meant to behave that way to start with.

But isn't what you're describing "fixing a bug"? I think River sees it this way and is asking for a "non regression test".
At least that's how I understand it, maybe you can elaborate against this?

I added the test :) .

But to me this precondition check is at the same level as checking the op name before applying a pattern. This pattern is illegally triggering on an op it shouldnt have to start with cause the preconditions were wrong. In any case, there is no black and white answer here, so adding a test is cheaper :) .

This revision was landed with ongoing or failed builds.Jan 25 2022, 10:37 AM
This revision was automatically updated to reflect the committed changes.