Home
last modified time | relevance | path

Searched refs:ConstantR0 (Results 1 – 25 of 85) sorted by relevance

1234

/external/tensorflow/tensorflow/compiler/xla/tests/
Dscalar_computations_test.cc52 XlaOp lhs_op = ConstantR0<NativeT>(&builder, lhs); in TestCompare()
53 XlaOp rhs_op = ConstantR0<NativeT>(&builder, rhs); in TestCompare()
63 XlaOp lhs_op = ConstantR0<NativeT>(&builder, lhs); in TestMinMax()
64 XlaOp rhs_op = ConstantR0<NativeT>(&builder, rhs); in TestMinMax()
72 ConstantR0<float>(&builder, 2.1f); in XLA_TEST_F()
79 Neg(ConstantR0<float>(&builder, 2.1f)); in XLA_TEST_F()
86 Neg(ConstantR0<int32>(&builder, 2)); in XLA_TEST_F()
93 Add(ConstantR0<float>(&builder, 2.1f), ConstantR0<float>(&builder, 5.5f)); in XLA_TEST_F()
100 Add(ConstantR0<int32>(&builder, 2), ConstantR0<int32>(&builder, 5)); in XLA_TEST_F()
107 Add(ConstantR0<uint32>(&builder, 35), ConstantR0<uint32>(&builder, 57)); in XLA_TEST_F()
[all …]
Dwhile_test.cc59 Gt(ConstantR0<int32>(&builder, 5), prev); in XLA_TEST_F()
68 auto input = ConstantR0<int32>(&builder, 1); in XLA_TEST_F()
75 auto init = ConstantR0<int32>(&builder, 0); in XLA_TEST_F()
95 Gt(ConstantR0<int64>(&builder, 5), prev); in XLA_TEST_F()
104 auto input = ConstantR0<int64>(&builder, 1); in XLA_TEST_F()
111 auto init = ConstantR0<int64>(&builder, 0); in XLA_TEST_F()
126 Gt(ConstantR0<int32>(&builder, 5), prev); in XLA_TEST_F()
135 auto input = ConstantR0<int32>(&builder, 1); in XLA_TEST_F()
143 Reduce(ConstantR1<int32>(&builder, 2, 1), ConstantR0<int32>(&builder, 0), in XLA_TEST_F()
158 Ne(ConstantR0<bool>(&builder, true), prev); in XLA_TEST_F()
[all …]
Dvector_ops_reduce_test.cc61 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
74 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
86 Reduce(x, ConstantR0<float>(&builder_, 0.0f), max_reducer, in TEST_F()
97 Reduce(x, ConstantR0<float>(&builder_, 4.0f), max_reducer, in TEST_F()
113 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
127 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
136 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
147 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
159 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
170 Reduce(x, ConstantR0<float>(&builder_, 0.0f), sum_reducer, in TEST_F()
[all …]
Dselect_test.cc38 auto pred = ConstantR0<bool>(&builder, true); in TEST_F()
39 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F()
40 auto on_false = ConstantR0<float>(&builder, 42.0f); in TEST_F()
48 auto pred = ConstantR0<bool>(&builder, true); in TEST_F()
49 auto on_true = ConstantR0<int32>(&builder, -42); in TEST_F()
50 auto on_false = ConstantR0<int32>(&builder, 42); in TEST_F()
58 auto pred = ConstantR0<bool>(&builder, false); in TEST_F()
59 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F()
60 auto on_false = ConstantR0<float>(&builder, 42.0f); in TEST_F()
202 auto s = ConstantR0<int32>(&builder, 0); in TEST_F()
[all …]
Dprng_test.cc55 ConstantR0<T>(&builder, a), ConstantR0<T>(&builder, b), in UniformTest()
145 RngUniform(ConstantR0<int32>(&builder, 0), in UniformChiSquared()
146 ConstantR0<int32>(&builder, range_size), in UniformChiSquared()
190 RngUniform(ConstantR0<float>(b.get(), 0), ConstantR0<float>(b.get(), 1), in XLA_TEST_F()
230 RngUniform(ConstantR0<float>(&builder, 0), ConstantR0<float>(&builder, 1), in XLA_TEST_F()
289 auto a = RngUniform(ConstantR0<int32>(&builder, 0), in XLA_TEST_F()
290 ConstantR0<int32>(&builder, 100), in XLA_TEST_F()
292 auto b = RngUniform(ConstantR0<int32>(&builder, 0), in XLA_TEST_F()
293 ConstantR0<int32>(&builder, 100), in XLA_TEST_F()
318 RngNormal(ConstantR0<float>(&builder, 0), ConstantR0<float>(&builder, 1), in XLA_TEST_F()
[all …]
Dconditional_test.cc31 ConstantR0<float>(&builder, value); in CreateR0ConstantComputation()
226 auto operand1 = ConstantR0<float>(&builder, 56.0f); in XLA_TEST_F()
227 auto operand2 = ConstantR0<float>(&builder, 12.0f); in XLA_TEST_F()
246 Add(ConstantR0<float>(sb.get(), static_cast<float>(i)), in XLA_TEST_P()
260 operands.emplace_back(ConstantR0<float>(&builder, 10 * fi + 7)); in XLA_TEST_P()
279 auto operand1 = ConstantR0<float>(&builder, 56.4f); in XLA_TEST_F()
280 auto operand2 = ConstantR0<float>(&builder, 12.6f); in XLA_TEST_F()
293 auto operand = ConstantR0<float>(&builder, 12.6f); in XLA_TEST_F()
306 auto operand1 = ConstantR0<float>(&builder, 56.4f); in XLA_TEST_F()
307 auto operand2 = ConstantR0<float>(&builder, 12.6f); in XLA_TEST_F()
[all …]
Dselect_and_scatter_test.cc85 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_P()
210 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F()
222 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F()
233 ConstantR0<int32>(&builder_, 1), add_s32_); in XLA_TEST_F()
244 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F()
256 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F()
271 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F()
285 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F()
297 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F()
309 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F()
[all …]
Dvector_ops_simple_test.cc142 Pow(x, ConstantR0<float>(&builder, -.5f)); in XLA_TEST_F()
240 auto y = ConstantR0<float>(&builder, 0); in XLA_TEST_F()
263 auto zero = ConstantR0<float>(&builder, 0); in XLA_TEST_F()
264 auto one = ConstantR0<float>(&builder, 1); in XLA_TEST_F()
276 auto zero = ConstantR0<float>(&builder, 0); in XLA_TEST_F()
277 auto one = ConstantR0<float>(&builder, 1); in XLA_TEST_F()
300 auto one = ConstantR0<float>(&builder, 1); in XLA_TEST_F()
301 auto two = ConstantR0<float>(&builder, 2); in XLA_TEST_F()
313 auto zero = ConstantR0<int64>(&builder, 0); in XLA_TEST_F()
314 auto one = ConstantR0<int64>(&builder, 10); in XLA_TEST_F()
[all …]
Dreduce_test.cc97 auto zero = ConstantR0<float>(&builder, 0.0); in RunR1ToR0Test()
129 init_value = ConstantR0<bool>(&builder, true); in RunR1ToR0PredTest()
132 init_value = ConstantR0<bool>(&builder, false); in RunR1ToR0PredTest()
162 auto input_pred = Eq(input, ConstantR0<uint8>(&builder, 1)); in RunR2ToR1PredTest()
167 init_value = ConstantR0<bool>(&builder, true); in RunR2ToR1PredTest()
170 init_value = ConstantR0<bool>(&builder, false); in RunR2ToR1PredTest()
207 auto zero = ConstantR0<float>(&builder, 0.0); in RunR2ToR0Test()
234 auto zero = ConstantR0<float>(&builder, 0.0); in RunR2ToR1Test()
290 auto zero = ConstantR0<NativeT>(&builder, initial_value); in RunVectorizedReduceTestForType()
444 auto zero = ConstantR0<float>(&builder, 0.0); in XLA_TEST_F()
[all …]
Dcompute_constant_test.cc102 auto computation = ConstantR0<int32>(&b, 42); in TEST_F()
116 Add(ConstantR0<float>(&b, 42.5f), ConstantR0<float>(&b, 1.5f)); in TEST_F()
130 RngUniform(ConstantR0<float>(&b, 1.1f), ConstantR0<float>(&b, 2.1f), in TEST_F()
195 Add(ConstantR0<float>(&b, 2.5f), ConstantR0<float>(&b, 1.5f)); in TEST_F()
200 Mul(ConstantR0<float>(&b, 2.0f), ConstantR0<float>(&b, 4.5f)); in TEST_F()
234 auto computation = Div(ConstantR0<int32>(&b, 15), ConstantR0<int32>(&b, 3)); in TEST_F()
Dunary_op_test.cc150 auto argi = ConstantR0<int>(&builder, -5); in XLA_TEST_F()
152 auto argf = ConstantR0<float>(&builder, -3.0f); in XLA_TEST_F()
154 auto argf0 = ConstantR0<float>(&builder, -0.0f); in XLA_TEST_F()
156 auto argc = ConstantR0<complex64>(&builder, {-0.3f, 0.4f}); in XLA_TEST_F()
165 auto argi = ConstantR0<int>(&builder, -5); in XLA_TEST_F()
167 auto argf = ConstantR0<float>(&builder, -4.0f); in XLA_TEST_F()
169 auto argf0 = ConstantR0<float>(&builder, -0.0f); in XLA_TEST_F()
171 auto argc = ConstantR0<complex64>(&builder, {-.3, .4}); in XLA_TEST_F()
Dbad_rng_shape_validation_test.cc38 auto zero = ConstantR0<float>(&builder, 0.0); in TEST_F()
39 auto one = ConstantR0<float>(&builder, 1.0); in TEST_F()
52 auto zero = ConstantR0<float>(&builder, 0.0); in TEST_F()
53 auto one = ConstantR0<float>(&builder, 1.0); in TEST_F()
Ddeallocation_test.cc51 ConstantR0<float>(&builder, 42.0); in TEST_F()
95 Tuple(&builder, {ConstantR0<float>(&builder, 42.0), in XLA_TEST_F()
109 auto element = ConstantR0<float>(&builder, 42.0); in XLA_TEST_F()
111 Tuple(&builder, {ConstantR0<float>(&builder, 42.0), element}); in XLA_TEST_F()
126 Tuple(&builder, {ConstantR0<float>(&builder, 42.0), in XLA_TEST_F()
Dcompilation_cache_test.cc78 Neg(ConstantR0<float>(&builder, 42.0)); in XLA_TEST_F()
116 Neg(ConstantR0<float>(&builder_neg, 42.0)); in XLA_TEST_F()
120 Exp(ConstantR0<float>(&builder_exp, 1.0)); in XLA_TEST_F()
124 Add(ConstantR0<float>(&builder_add, 2.0), in XLA_TEST_F()
125 ConstantR0<float>(&builder_add, 3.0)); in XLA_TEST_F()
Dpred_test.cc37 XlaOp lhs_op = ConstantR0<bool>(&builder, lhs); in TestCompare()
38 XlaOp rhs_op = ConstantR0<bool>(&builder, rhs); in TestCompare()
46 ConstantR0<bool>(&builder, true); in TEST_F()
52 ConstantR0<bool>(&builder, false); in TEST_F()
Dbfloat16_test.cc54 auto x = ConstantR0<bfloat16>(&builder, static_cast<bfloat16>(2.0f)); in XLA_TEST_F()
55 auto y = ConstantR0<bfloat16>(&builder, static_cast<bfloat16>(1.0f)); in XLA_TEST_F()
64 auto x = ConstantR0<bfloat16>(&builder, static_cast<bfloat16>(4.0f)); in XLA_TEST_F()
73 Neg(ConstantR0<bfloat16>(&builder, static_cast<bfloat16>(2.1f))); in XLA_TEST_F()
Dtuple_test.cc87 Tuple(&builder, {ConstantR0<float>(&builder, constant_scalar), in XLA_TEST_F()
103 {ConstantR0<float>(&builder, 7.0), ConstantR1<float>(&builder, {})}); in XLA_TEST_F()
289 Select(ConstantR0<bool>(&builder, false), tuple12, tuple21); in XLA_TEST_F()
310 Add(greater, Mul(ConstantR0<float>(&b, 100.0f), smaller)); in XLA_TEST_F()
333 Select(ConstantR0<bool>(&builder, true), tuple12, tuple21); in XLA_TEST_F()
351 auto select = Select(ConstantR0<bool>(&builder, false), tuple12, tuple21); in XLA_TEST_F()
381 auto pred_tuple = Tuple(&builder, {ConstantR0<bool>(&builder, true), in XLA_TEST_F()
382 ConstantR0<bool>(&builder, false)}); in XLA_TEST_F()
407 Select(ConstantR0<bool>(&builder, false), tuple12, tuple21); in XLA_TEST_F()
417 ConstantR0<float>(&builder, 42.0)}); in XLA_TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dconstants.cc47 return ConstantR0<Eigen::half>( in Epsilon()
51 return ConstantR0<bfloat16>(builder, bfloat16::epsilon()); in Epsilon()
53 return ConstantR0<float>(builder, std::numeric_limits<float>::epsilon()); in Epsilon()
55 return ConstantR0<double>(builder, in Epsilon()
70 return ConstantR0<Eigen::half>(builder, in MinFiniteValue()
73 return ConstantR0<bfloat16>(builder, bfloat16::lowest()); in MinFiniteValue()
75 return ConstantR0<float>(builder, -std::numeric_limits<float>::max()); in MinFiniteValue()
77 return ConstantR0<double>(builder, -std::numeric_limits<double>::max()); in MinFiniteValue()
86 return ConstantR0<Eigen::half>(builder, in MinPositiveNormalValue()
89 return ConstantR0<bfloat16>(builder, bfloat16::min_positive_normal()); in MinPositiveNormalValue()
[all …]
Dconstants.h50 return ConstantR0<half>(builder, static_cast<half>(value)); in ConstantR0WithType()
52 return ConstantR0<bfloat16>(builder, static_cast<bfloat16>(value)); in ConstantR0WithType()
54 return ConstantR0<float>(builder, static_cast<float>(value)); in ConstantR0WithType()
56 return ConstantR0<double>(builder, static_cast<double>(value)); in ConstantR0WithType()
58 return ConstantR0<complex64>(builder, static_cast<complex64>(value)); in ConstantR0WithType()
60 return ConstantR0<complex128>(builder, static_cast<complex128>(value)); in ConstantR0WithType()
62 return ConstantR0<uint8>(builder, static_cast<uint8>(value)); in ConstantR0WithType()
64 return ConstantR0<uint32>(builder, static_cast<uint32>(value)); in ConstantR0WithType()
66 return ConstantR0<uint64>(builder, static_cast<uint64>(value)); in ConstantR0WithType()
68 return ConstantR0<int8>(builder, static_cast<int8>(value)); in ConstantR0WithType()
[all …]
Dprng.cc31 return (v << ConstantR0<uint32>(v.builder(), distance)) | in RotateLeftU32()
32 ShiftRightLogical(v, ConstantR0<uint32>(v.builder(), 32 - distance)); in RotateLeftU32()
48 ks[2] = ConstantR0<uint32>(builder, 0x1BD11BDA); in ThreeFry2x32()
74 x[1] = x[1] + ks[2] + ConstantR0<uint32>(builder, 1); in ThreeFry2x32()
81 x[1] = x[1] + ks[0] + ConstantR0<uint32>(builder, 2); in ThreeFry2x32()
88 x[1] = x[1] + ks[1] + ConstantR0<uint32>(builder, 3); in ThreeFry2x32()
95 x[1] = x[1] + ks[2] + ConstantR0<uint32>(builder, 4); in ThreeFry2x32()
102 x[1] = x[1] + ks[0] + ConstantR0<uint32>(builder, 5); in ThreeFry2x32()
111 inputs[1] = inputs[0] + ConstantR0<uint32>(builder, size); in GetInputs()
162 bits, ConstantR0<uint32>(builder, kFloatBits - kMantissaBits)) | in StatelessRngUniformF32()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dconst_op.cc54 0, xla::Broadcast(xla::ConstantR0<bool>(b, proto_.bool_val(0)), in Compile()
61 ctx->SetOutput(0, xla::Broadcast(xla::ConstantR0<float>( in Compile()
69 ctx->SetOutput(0, xla::Broadcast(xla::ConstantR0<double>( in Compile()
79 xla::Broadcast(xla::ConstantR0<xla::complex64>( in Compile()
90 xla::Broadcast(xla::ConstantR0<xla::complex128>( in Compile()
100 0, xla::Broadcast(xla::ConstantR0<int32>(b, proto_.int_val(0)), in Compile()
107 ctx->SetOutput(0, xla::Broadcast(xla::ConstantR0<int64>( in Compile()
Dlrn_ops.cc62 xla::Add(xla::ConstantR0<float>(builder, bias_), in Compile()
63 xla::Mul(xla::ConstantR0<float>(builder, alpha_), sqr_sum)), in Compile()
64 xla::ConstantR0<float>(builder, -beta_)); in Compile()
149 xla::Add(xla::ConstantR0<float>(builder, bias_), in Compile()
150 xla::Mul(xla::ConstantR0<float>(builder, alpha_), sqr_sum)); in Compile()
153 xla::Mul(xla::ConstantR0<float>(builder, -2.0f * alpha_ * beta_), in Compile()
168 xla::Pow(norm, xla::ConstantR0<float>(builder, -beta_)))); in Compile()
/external/tensorflow/tensorflow/compiler/tf2xla/lib/
Dutil.cc43 return xla::ConstantR0<xla::half>(builder, static_cast<xla::half>(value)); in FloatLiteral()
46 return xla::ConstantR0<bfloat16>(builder, static_cast<bfloat16>(value)); in FloatLiteral()
49 return xla::ConstantR0<float>(builder, static_cast<float>(value)); in FloatLiteral()
52 return xla::ConstantR0<double>(builder, value); in FloatLiteral()
55 return xla::ConstantR0<xla::complex64>(builder, value); in FloatLiteral()
58 return xla::ConstantR0<xla::complex128>(builder, value); in FloatLiteral()
/external/tensorflow/tensorflow/compiler/xla/service/cpu/tests/
Dcpu_infeed_test.cc129 Gt(ConstantR0<float>(&builder, 40.0f), prev); in TEST_F()
139 auto addend = Reduce(infeed, ConstantR0<float>(&builder, 0.0f), in TEST_F()
145 auto init = ConstantR0<float>(&builder, 0.0f); in TEST_F()
229 Reduce(GetTupleElement(infeed, 0), ConstantR0<float>(&builder, 0.0f), in TEST_F()
237 auto init = Tuple(&builder, {ConstantR0<float>(&builder, 0.0f), in TEST_F()
238 ConstantR0<bool>(&builder, true)}); in TEST_F()
241 &builder, {GetTupleElement(while1, 0), ConstantR0<bool>(&builder, true)}); in TEST_F()
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder_test.cc72 Add(ConstantR0<float>(&b, 1.0), ConstantR0<float>(&b, 2.0)); in TEST_F()
83 op(ConstantR0<int32>(&b, 1)); in TEST_F()
97 op(ConstantR0<int32>(&b, 1), ConstantR0<int32>(&b, 2)); in TEST_F()
128 op(ConstantR0<uint32>(&b, 1), ConstantR0<uint32>(&b, 2)); in TEST_F()
172 ConstantR0<float>(&b, 1) >> ConstantR0<float>(&b, 2); in TEST_F()
183 Add(x, ConstantR0<float>(&b, 1.0)); in TEST_F()
247 auto one = ConstantR0<float>(&b, 1); in TEST_F()
248 auto two = ConstantR0<float>(&b, 2); in TEST_F()
407 StatusOr<XlaOp> op(ConstantR0<float>(&b, 1.0)); in TEST_F()
408 Add(b.ReportErrorOrReturn(op), ConstantR0<float>(&b, 2.0)); in TEST_F()
[all …]

1234