This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Relaxing verification of DPS ops
AbandonedPublic

Authored by vmurali on Mar 8 2023, 4:06 PM.

Details

Summary

Previously the tied operand and result operand had to match ShapedType exactly. I am relaxing it to allow dynamic shapes on one side and static shapes on the other, as some Linalg Transformations (like Padding) creates dynamic shapes. The rationale is that a dynamic dimension can be potentially unified with any dimension value.

Diff Detail

Event Timeline

vmurali created this revision.Mar 8 2023, 4:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 4:06 PM
vmurali requested review of this revision.Mar 8 2023, 4:06 PM
vmurali updated this revision to Diff 503551.Mar 8 2023, 4:11 PM
vmurali added reviewers: nicolasvasilache, hanchung.

Fixed another bug

hanchung added a comment.EditedMar 8 2023, 4:15 PM

I'm not convinced that this is the fix... The result type and operand type should match based on my understanding about DPS interface. (I could be wrong though)

vmurali updated this revision to Diff 503558.Mar 8 2023, 4:26 PM
vmurali added a comment.EditedMar 8 2023, 4:29 PM

I'm not convinced that this is the fix... The result type and operand type should match based on my understanding about DPS interface. (I could be wrong though)

The latest padding transformation https://github.com/llvm/llvm-project/commit/6d2501bf00f662ef05731aa7c59351467aac2a70 creates dynamic types. So @nicolasvasilache can chime in and fix it correctly?

vmurali edited the summary of this revision. (Show Details)Mar 8 2023, 8:46 PM
nicolasvasilache requested changes to this revision.Mar 9 2023, 12:50 AM

shapes need to match, I am unclear why you need this and why there is no clear test that exercises such fundamental changes

This revision now requires changes to proceed.Mar 9 2023, 12:50 AM
vmurali abandoned this revision.Mar 9 2023, 7:00 AM

Closing this as the bug is somewhere else