This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] fix crash in vectorization of elementwise operations
ClosedPublic

Authored by christopherbate on Jun 3 2022, 1:30 PM.

Details

Summary

The current vectorization logic implicitly expects "elementwise"
linalg ops to have projected permutations for indexing maps, but
the precondition logic misses this check. This can result in a
crash when executing the generic vectorization transform on an op
with a non-projected permutation input indexing map. This change
fixes the logic and adds a test (which crashes without this fix).

Diff Detail

Event Timeline

christopherbate created this revision.Jun 3 2022, 1:30 PM
Herald added a project: Restricted Project. · View Herald Transcript
christopherbate requested review of this revision.Jun 3 2022, 1:30 PM
ThomasRaoux accepted this revision.Jun 3 2022, 2:04 PM

Good catch!

This revision is now accepted and ready to land.Jun 3 2022, 2:04 PM