Skip to content

Roundtrip unbounded dimension sizes between MHLO and HLO#6897

Closed
copybara-service[bot] wants to merge 0 commit intomainfrom
test_580002339
Closed

Roundtrip unbounded dimension sizes between MHLO and HLO#6897
copybara-service[bot] wants to merge 0 commit intomainfrom
test_580002339

Conversation

@copybara-service
Copy link
Copy Markdown

Roundtrip unbounded dimension sizes between MHLO and HLO

This adds a new capability to roundtrip unbounded (but not unranked!) tensor types between MHLO and HLO. Unbounded dimensions are modelled as dynamic dimensions of Shape::kUnboundedSize size. As discussed, the unbounded size is set to std::numeric_limits<int64_t>::max().

In order to enable creation of unbounded shapes, this CL disables validation of dense_shape_size in ShapeUtil::FillNewShape and ShapeUtil::ValidateShapeSize if an unbounded size is found among shape's dimensions.

As discussed, it is expected that there are going to be many locations in the code which will blow up when seeing unbounded shapes. Auditing and addressing them is out of scope of this CL - in this CL, we only introduce the representational capability, as well as roundtripping between MHLO and HLO. Determining which parts of XLA will be adapted to unbounded dynamism and actually adapting them is going to be a long journey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant