aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/tf2xla/lib
diff options
context:
space:
mode:
authorGravatar Peter Hawkins <phawkins@google.com>2018-06-22 11:08:29 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-22 11:11:32 -0700
commit49934f7d1a289325480c618c658b7c4cdb8584c6 (patch)
tree6e819d30757848cd59b848072fec7a5d8206d2f5 /tensorflow/compiler/tf2xla/lib
parent19416ba0d2085cdbd2b77b8c794cbf60311caac7 (diff)
[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
Diffstat (limited to 'tensorflow/compiler/tf2xla/lib')
-rw-r--r--tensorflow/compiler/tf2xla/lib/random.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/tf2xla/lib/random.cc b/tensorflow/compiler/tf2xla/lib/random.cc
index 360c3e40e3..4a2516244a 100644
--- a/tensorflow/compiler/tf2xla/lib/random.cc
+++ b/tensorflow/compiler/tf2xla/lib/random.cc
@@ -51,7 +51,7 @@ xla::StatusOr<xla::XlaOp> TruncatedNormal(const DataType dtype,
// probit(p) = sqrt(2) * erfinv(2*p-1)
auto p = builder->Add(alpha_normal_cdf, builder->Mul(z, uniform));
auto erfinv_input = builder->Sub(builder->Mul(p, two), one);
- TF_ASSIGN_OR_RETURN(auto erfinv_or_status, ErfInv(builder, erfinv_input));
+ TF_ASSIGN_OR_RETURN(auto erfinv_or_status, ErfInv(erfinv_input));
return builder->Mul(sqrt_2, erfinv_or_status);
}
} // namespace tensorflow