Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roundtrip unbounded dimension sizes between MHLO and HLO #6897

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

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