Page MenuHomePhabricator

[MLIR][Shape] Canonicalize `assuming_all` when all operands are `cstr_bcastable`
ClosedPublic

Authored by frgossen on Thu, Apr 8, 6:41 AM.

Diff Detail

Event Timeline

frgossen created this revision.Thu, Apr 8, 6:41 AM
frgossen requested review of this revision.Thu, Apr 8, 6:41 AM
bkramer accepted this revision.Thu, Apr 8, 10:09 AM

We can do the same for cstr_eq.

This revision is now accepted and ready to land.Thu, Apr 8, 10:09 AM

This is not a correct xform because broadcastability is not transitive.

Consider:

A: tensor<1x4x1xf32>
B: tensor<1x1x4xf32>
C: tensor<1x3x4xf32>

cstr_broadcastable(A,B) && cstr_broadcastable(B,C) does not imply cstr_broadcastable(A,B,C).

(we can do this for cstr_eq though since that is transitive)