Page MenuHomePhabricator

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

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

Diff Detail

Event Timeline

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

We can do the same for cstr_eq.

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

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


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)