Page MenuHomePhabricator

[MLIR][Shape] Expose extent tensor type builder

Authored by frgossen on Aug 3 2020, 4:42 AM.



The extent tensor type is a tensor<?xindex> that is used in the shape dialect.
To facilitate the use of this type when working with the shape dialect, we
expose the helper function for its construction.

Diff Detail

Event Timeline

frgossen created this revision.Aug 3 2020, 4:42 AM
Herald added a reviewer: silvas. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
frgossen requested review of this revision.Aug 3 2020, 4:42 AM
pifon2a accepted this revision.Aug 3 2020, 4:48 AM
pifon2a added inline comments.


Type type = arg.getType().isa<ShapedType>() 
     ? getExtentTensorType(builder.getContext())
     : builder.getType<ShapeType>();


frgossen updated this revision to Diff 282592.Aug 3 2020, 5:11 AM

Address comment


Tried that first but it does not work without explicit casts: "incompatible operand types".

frgossen marked an inline comment as done.Aug 3 2020, 5:11 AM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 5 2020, 2:44 AM
This revision was automatically updated to reflect the committed changes.