This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add a padding case for `ComplexType`
ClosedPublic

Authored by rsuderman on Jul 10 2023, 4:56 PM.

Details

Summary

If the paddingAttr is an ArrayAttr with two values we know that
the element type is a ComplexType and we should pad the value
accordingly.

Diff Detail

Event Timeline

rsuderman created this revision.Jul 10 2023, 4:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 4:56 PM
rsuderman requested review of this revision.Jul 10 2023, 4:56 PM
rsuderman updated this revision to Diff 538876.Jul 10 2023, 5:04 PM

Rebased on head

mravishankar requested changes to this revision.Jul 12 2023, 4:15 PM
mravishankar added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
131

Is it a given that for complex types it is going to be an ArrayAttr? Seems like a fairly strong assumption.

This revision now requires changes to proceed.Jul 12 2023, 4:15 PM

Updated to check ComplexType directly.

git-clang-format

rsuderman marked an inline comment as done.Jul 14 2023, 11:02 AM
rsuderman added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
131

The type is an ArrayAttr for ComplexTy but you are right, instead we should directly check the return type. Updated appropriately.

mravishankar accepted this revision.Jul 17 2023, 4:13 PM
This revision is now accepted and ready to land.Jul 17 2023, 4:13 PM
This revision was automatically updated to reflect the committed changes.
rsuderman marked an inline comment as done.