Commit 49934f7d authored by Peter Hawkins's avatar Peter Hawkins Committed by TensorFlower Gardener
Browse files

[XLA] Allow APIs that manipulate XlaOps to simply pass XlaOps, rather than...

[XLA] Allow APIs that manipulate XlaOps to simply pass XlaOps, rather than requiring an explicit builder to be passed to every function.

Make the XlaOp::builder() method return a mutable builder. Ensure the builder is populated for XlaOps returned by XlaBuilder.

Add an XlaOp::valid() method for testing validity of an XlaOp, rather than testing nullness of the builder(). Represent invalid XlaOps by negative handles.

As an example, change some of the XLA client library arithmetic functions not to take an XlaBuilder explicitly.

In passing, remove some redundant xla:: namespace prefixes and fix a mismatched function prototype for EvaluatePolynomial.

PiperOrigin-RevId: 201711685
parent 19416ba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment