This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add support for lowering pack with outer_dims_perm.
ClosedPublic

Authored by hanchung on Apr 20 2023, 2:42 PM.

Diff Detail

Event Timeline

hanchung created this revision.Apr 20 2023, 2:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 2:42 PM
hanchung requested review of this revision.Apr 20 2023, 2:42 PM
hanchung updated this revision to Diff 515496.Apr 20 2023, 2:44 PM

Simplify the logic in computePackingMetadata

qcolombet accepted this revision.Apr 23 2023, 5:12 AM

LGTM, please add a test for the lowering to "simple" pad.

mlir/test/Dialect/Linalg/transform-lower-pack.mlir
249

Could you add a test with the lowering to a "simple" pad?
I.e., outer dimensions should be 1s and inner_dim_pos should not perform any transpose.
In other words, shuffling dims of size one should still lower as a pad with no transpose.

Use func.func @pack_as_pad as template and just add an outer_dims field.

This revision is now accepted and ready to land.Apr 23 2023, 5:12 AM
hanchung updated this revision to Diff 516195.Apr 23 2023, 11:49 AM

add a test and rebase to main

chelini accepted this revision.Apr 23 2023, 11:17 PM

thanks!

mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
497

nit: obained -> obtained

This revision was landed with ongoing or failed builds.Apr 24 2023, 10:40 AM
This revision was automatically updated to reflect the committed changes.