Page MenuHomePhabricator

[mlir] Add clone method to ShapedType

Authored by jpienaar on Feb 14 2021, 7:54 PM.



Allow clients to create a new ShapedType of the same "container" type but with
different element or shape. First use case is when refining shape during shape
inference without needing to consider which ShapedType is being refined.

Diff Detail

Event Timeline

jpienaar created this revision.Feb 14 2021, 7:54 PM
jpienaar requested review of this revision.Feb 14 2021, 7:54 PM
mehdi_amini accepted this revision.Feb 14 2021, 10:16 PM
This revision is now accepted and ready to land.Feb 14 2021, 10:16 PM
rriddle added inline comments.Feb 14 2021, 10:32 PM
9 ↗(On Diff #323660)

Honestly this would be much better suited to a directed unit test instead of this.

jpienaar updated this revision to Diff 323800.Feb 15 2021, 11:00 AM

Switch to unittest

jpienaar marked an inline comment as done.Feb 15 2021, 11:03 AM
jpienaar added inline comments.
9 ↗(On Diff #323660)

Yeah I was between those, the unit test is more cumbersome to add tests for but not the most frequent occurrence (also not all linear maps need to be tested :))

This revision was landed with ongoing or failed builds.Feb 15 2021, 11:04 AM
This revision was automatically updated to reflect the committed changes.
jpienaar marked an inline comment as done.