This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Shape] Concretize broadcast result type if possible
ClosedPublic

Authored by frgossen on May 7 2021, 6:25 AM.

Details

Summary

As a canonicalization, infer the resulting shape rank if possible.

Diff Detail

Event Timeline

frgossen created this revision.May 7 2021, 6:25 AM
frgossen requested review of this revision.May 7 2021, 6:25 AM
frgossen edited the summary of this revision. (Show Details)
silvas accepted this revision.May 7 2021, 9:50 AM
jpienaar added inline comments.May 7 2021, 9:58 AM
mlir/lib/Dialect/Shape/IR/Shape.cpp
698

Isn't this now a canonicalization pattern that can unconditionally change result type? How do you know this is safe?

silvas added inline comments.May 7 2021, 9:59 AM
mlir/lib/Dialect/Shape/IR/Shape.cpp
698

it inserts a cast to the orginal type.

akuegel accepted this revision.May 9 2021, 11:20 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 10 2021, 1:24 AM
This revision was automatically updated to reflect the committed changes.