Commit 21d2de1c authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Add a recursive descent parser for the HloModule string. It constructs an...

Add a recursive descent parser for the HloModule string. It constructs an HloModule object from a string printed by HloModule::ToString().

This is a initial stage. It currently supports:
- unary, binary, ternary ops, and other ops that don't have extra attributes.
- module with entry computation only.
- simple cases for constant instruction.

To make the parser simpler, this cl removes a whitespace and adds a '%' before the computation name in HloComputation::ToString().

Further steps will enable parsing subcomputations, more cases of constants, tuple, and ops that require extra attributes (e.g., broadcast dimensions, subcomputation).

PiperOrigin-RevId: 172804214
parent 17ba3a69
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment