Home
last modified time | relevance | path

Searched refs:ScalarLike (Results 1 – 25 of 29) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dmath.cc36 XlaOp poly = ScalarLike(x, 0.0); in EvaluatePolynomial()
38 poly = poly * x + ScalarLike(x, c); in EvaluatePolynomial()
49 XlaOp b0 = ScalarLike(x, 0.0); in EvaluateChebyshevPolynomial()
50 XlaOp b1 = ScalarLike(x, 0.0); in EvaluateChebyshevPolynomial()
51 XlaOp b2 = ScalarLike(x, 0.0); in EvaluateChebyshevPolynomial()
55 b0 = x * b1 - b2 + ScalarLike(x, c); in EvaluateChebyshevPolynomial()
57 return ScalarLike(x, 0.5) * (b0 - b2); in EvaluateChebyshevPolynomial()
167 XlaOp Reciprocal(XlaOp operand) { return ScalarLike(operand, 1.0) / operand; } in Reciprocal()
191 XlaOp q = ScalarLike(x, 1) / abs_x; in ErfcImpl32()
193 XlaOp p = Select(Lt(abs_x, ScalarLike(x, 2.0)), in ErfcImpl32()
[all …]
Dself_adjoint_eig.cc82 auto zero = ScalarLike(a, 0.0); in SymmetricShurDecomposition2x2()
83 auto one = ScalarLike(a, 1.0); in SymmetricShurDecomposition2x2()
84 auto two = ScalarLike(a, 2.0); in SymmetricShurDecomposition2x2()
124 auto zero = ScalarLike(p, 0); in Update()
155 auto pq_zero = ScalarLike(jacobi_update.w, 0.0); in Update()
200 Sqrt(Reduce(Square(w), ScalarLike(w, 0.0), in ComputeFrobeniusNorms()
205 Reduce(Square(diag), ScalarLike(w, 0.0), in ComputeFrobeniusNorms()
212 Sqrt(Max(Square(frobenius_norm) - diag_square, ScalarLike(w, 0.0))); in ComputeFrobeniusNorms()
228 auto max_sweeps = ScalarLike(k, max_sweep_updates); in WhileLoopFn()
247 return Lt(p, ScalarLike(p, matrix_dimension - 1)); in WhileLoopFn()
[all …]
Dsvd.cc115 XlaOp zero = ScalarLike(i, 0); in HouseRow()
130 auto one = ScalarLike(v, 1.0); in HouseRow()
133 Sqrt(Reduce(Square(v), ScalarLike(v, 0.0), in HouseRow()
144 Le(x_0j, ScalarLike(x_0j, 0.0)), Sub(x_0j, mu), in HouseRow()
147 auto beta = Div(ScalarLike(v_0j, 2.0), in HouseRow()
180 XlaOp zero = ScalarLike(i, 0); in HouseCol()
195 auto one = ScalarLike(v, 1.0); in HouseCol()
198 Sqrt(Reduce(Square(v), ScalarLike(v, 0.0), in HouseCol()
210 Le(x_0i, ScalarLike(x_0i, 0.0)), Sub(x_0i, mu), in HouseCol()
213 auto beta = Div(ScalarLike(v_0i, 2.0), in HouseCol()
[all …]
Dlogdet.cc50 auto is_zero = Eq(a, ScalarLike(a, 0)); in LogDet()
60 ScalarLike(num_triangle_rows, a_shape.dimensions(a_shape.rank() - 2)); in LogDet()
73 ScalarLike(num_triangle_rows, 2)), in LogDet()
75 ScalarLike(sign_diag, -1.0), ScalarLike(sign_diag, 1.0)); in LogDet()
Dtridiagonal.cc193 auto one = ScalarLike(i_minus_one, 1); in ThomasSolver()
248 auto n = ScalarLike(j, num_eqs - 2); in ThomasSolver()
249 auto one = ScalarLike(j, 1); in ThomasSolver()
Dconstants.h91 XlaOp ScalarLike(XlaOp prototype, T value) { in ScalarLike() function
110 return Broadcast(ScalarLike(prototype, value), shape.dimensions()); in FullLike()
Dconstants_test.cc55 ScalarLike(ConstantR0<int32>(&builder, 42), -3); in XLA_TEST_F()
61 ScalarLike(ConstantR0<float>(&builder, 42.75), -3.2); in XLA_TEST_F()
Dprng.cc323 ConvertElementType(key0 >> ScalarLike(key0, 32), U32), in ScramblePhiloxKey()
325 ConvertElementType(key1 >> ScalarLike(key1, 32), U32), in ScramblePhiloxKey()
484 bits, ScalarLike(bits, num_float_bits - num_mantissa_bits)); in ConvertRandomBitsToUniformFloatingPoint()
492 values = values * ScalarLike(values, std::ldexp(1., -num_mantissa_bits)); in ConvertRandomBitsToUniformFloatingPoint()
519 XlaOp u1 = Max(x0, ScalarLike(x0, 1.0e-7f)); in BoxMullerTransform()
521 XlaOp v1 = ScalarLike(x1, 2.0f * M_PI) * x1; in BoxMullerTransform()
522 XlaOp u2 = Sqrt(ScalarLike(u1, -2.0f) * Log(u1)); in BoxMullerTransform()
Dmatrix.cc97 Select(mask, x, Zeros(builder, shape)), ScalarLike(x, 0), in GetMatrixDiagonal()
202 diag = Pad(diag, ScalarLike(diag, 0), padding_config); in SetMatrixDiagonal()
291 auto zero = ScalarLike(x, 0); in EinsumDiagonal()
500 x = Reduce(x, ScalarLike(x, 0), in Einsum()
506 y = Reduce(y, ScalarLike(y, 0), in Einsum()
693 return Einsum(ScalarLike(x, 1), x, absl::StrCat(",", einsum_config), in Einsum()
Dmatrix_test.cc102 GetMatrixDiagonal(SetMatrixDiagonal(a, b + ScalarLike(b, 1), kv.first), in TestSetMatrixDiagonal()
104 ScalarLike(b, 1); in TestSetMatrixDiagonal()
Dmath_test.cc140 &b, {Sqrt(x), Pow(x, ScalarLike(x, 0.5)), Pow(x, ScalarLike(x, 0.3))}, in TestSqrtPowInequivalence()
/external/tensorflow/tensorflow/compiler/tf2xla/lib/
Drandom.cc35 uniform, xla::ScalarLike(uniform, kMu), xla::ScalarLike(uniform, kSigma), in TruncatedNormal()
36 xla::ScalarLike(uniform, kA), xla::ScalarLike(uniform, kB)); in TruncatedNormal()
45 xla::XlaOp one = xla::ScalarLike(uniform, 1.0); in ParameterizedTruncatedNormal()
46 xla::XlaOp two = xla::ScalarLike(uniform, 2.0); in ParameterizedTruncatedNormal()
47 xla::XlaOp sqrt_2 = xla::ScalarLike(uniform, std::sqrt(2.0)); in ParameterizedTruncatedNormal()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Drelu_op.cc26 XlaOp Relu(XlaOp x) { return Max(ScalarLike(x, 0), x); } in Relu()
29 auto zero = ScalarLike(x, 0); in Relu6()
30 auto six = ScalarLike(x, 6); in Relu6()
65 auto prod_with_alpha = features * xla::ScalarLike(features, alpha_); in Compile()
66 auto gt_zero = xla::Gt(features, xla::ScalarLike(features, 0)); in Compile()
119 xla::Select(xla::Gt(features, xla::ScalarLike(features, 0)), gradients, in Compile()
120 gradients * xla::ScalarLike(gradients, alpha_)); in Compile()
Ddequantize_op.cc73 full_range = ScalarLike(output, get_fullrange<qint8>()); in Compile()
75 (full_range + ScalarLike(output, 1.0f)) / ScalarLike(output, 2.0f); in Compile()
80 full_range = ScalarLike(output, get_fullrange<quint8>()); in Compile()
81 half_range = ScalarLike(output, 0.0f); in Compile()
Dunary_ops.cc73 XLAJIT_MAKE_UNARY(Inv, xla::ScalarLike(x, 1.0) / x);
74 XLAJIT_MAKE_UNARY(Reciprocal, xla::ScalarLike(x, 1.0) / x);
99 Log(xla::Epsilon(b, shape.element_type())) + ScalarLike(features, 2.0); in Softplus()
116 XLAJIT_MAKE_UNARY(Softsign, x / (xla::Abs(x) + xla::ScalarLike(x, 1.0)));
128 XLAJIT_MAKE_UNARY(Ndtri, xla::ScalarLike(x, std::sqrt(2.0)) *
129 xla::ErfInv(xla::ScalarLike(x, 2.0) * x -
130 xla::ScalarLike(x, 1.0)));
Delu_op.cc29 const auto zero = ScalarLike(x, 0); in Elu()
36 const auto zero = ScalarLike(x, 0); in Selu()
37 const auto scale = ScalarLike(x, 1.0507009873554804934193349852946); in Selu()
38 const auto scale_alpha = ScalarLike(x, 1.7580993408473768599402175208123); in Selu()
Dbatch_norm_op.cc121 xla::Mul(variance, xla::ScalarLike(variance, factor)); in CompileImpl()
140 xla::ScalarLike(old_mean, 1.0f - exponential_avg_factor_); in CompileImpl()
141 xla::XlaOp beta = xla::ScalarLike(old_mean, exponential_avg_factor_); in CompileImpl()
169 variance, xla::ScalarLike(variance, epsilon_)))); in CompileImpl()
286 xla::XlaOp one = xla::ScalarLike(var, 1.0f); in Compile()
287 xla::XlaOp epsilon = xla::ScalarLike(var, epsilon_); in Compile()
Dcast_op.cc167 xla::Mul(xla::ScalarLike(input, output_bit_width), iota); in Compile()
169 xla::ScalarLike(input, output_bit_width_mask)); in Compile()
189 xla::Mul(xla::ScalarLike(input, input_bit_width), in Compile()
Dsequence_ops.cc164 (stop - start) / xla::ScalarLike(start, (num > 1 ? num - 1 : num)); in Compile()
170 xla::XlaOp eq = xla::Eq(mask, xla::ScalarLike(mask, num - 1)); in Compile()
Dmirror_pad_op.cc145 reverse_lhs_pad, xla::ScalarLike(reverse_lhs_pad, 0), dimno, in DoMirrorPadGrad()
153 reverse_rhs_pad, xla::ScalarLike(reverse_rhs_pad, 0), dimno, in DoMirrorPadGrad()
Dunary_ops_composition.cc59 "Inv", [](xla::XlaOp x) { return xla::ScalarLike(x, 1.0) / x; }); in PopulateXlaOpGeneratorMap()
Dreverse_sequence_op.cc75 xla::XlaOp back = xla::Sub(seq_lens, xla::ScalarLike(seq_lens, 1)); in Compile()
Dtraining_ops.cc62 xla::XlaOp one = xla::ScalarLike(lr, 1.0); in ProximalGradientDescentUpdate()
63 xla::XlaOp zero = xla::ScalarLike(lr, 0.0); in ProximalGradientDescentUpdate()
449 xla::XlaOp zero = xla::ScalarLike(lr, 0.0); in Compile()
620 xla::XlaOp one = xla::ScalarLike(lr, 1.0); in Compile()
709 xla::XlaOp one = xla::ScalarLike(ms, 1.0); in Compile()
1003 m = m * beta + grad * (xla::ScalarLike(beta, 1.0) - beta); in Compile()
/external/tensorflow/tensorflow/compiler/xla/service/
Dqr_expander.cc91 XlaOp zero = ScalarLike(x, 0.0); in House()
107 Reduce(x_squared, ScalarLike(x_squared, 0.0), in House()
114 sigma_is_zero = Eq(sigma, ScalarLike(sigma, 0)); in House()
115 sigma_is_zero = And(sigma_is_zero, Eq(Imag(alpha), ScalarLike(sigma, 0))); in House()
117 *beta = Select(Lt(Real(alpha), ScalarLike(sigma, 0)), ScalarLike(mu, 1), in House()
118 ScalarLike(mu, -1)) * in House()
131 XlaOp one = ScalarLike(x, 1.0); in House()
139 Select(sigma_is_zero, Broadcast(ScalarLike(alpha, 1), batch_dims), in House()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dexhaustive_unary_test_f64.cc71 Run([](XlaOp x) { return Pow(x, ScalarLike(x, 0.5)); }, in __anon5d9703520102()

12