/external/tensorflow/tensorflow/compiler/xla/tests/ |
D | scalar_computations_test.cc | 52 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 …]
|
D | while_test.cc | 59 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 …]
|
D | vector_ops_reduce_test.cc | 61 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 …]
|
D | select_test.cc | 38 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 …]
|
D | prng_test.cc | 55 ConstantR0<T>(&builder, a), ConstantR0<T>(&builder, b), in UniformTest() 152 RngUniform(ConstantR0<int32>(&builder, 0), in UniformChiSquared() 153 ConstantR0<int32>(&builder, range_size), in UniformChiSquared() 199 RngUniform(ConstantR0<float>(b.get(), 0), ConstantR0<float>(b.get(), 1), in XLA_TEST_F() 240 RngUniform(ConstantR0<float>(&builder, 0), ConstantR0<float>(&builder, 1), in XLA_TEST_F() 299 auto a = RngUniform(ConstantR0<int32>(&builder, 0), in XLA_TEST_F() 300 ConstantR0<int32>(&builder, 100), in XLA_TEST_F() 302 auto b = RngUniform(ConstantR0<int32>(&builder, 0), in XLA_TEST_F() 303 ConstantR0<int32>(&builder, 100), in XLA_TEST_F() 328 RngNormal(ConstantR0<float>(&builder, 0), ConstantR0<float>(&builder, 1), in XLA_TEST_F() [all …]
|
D | select_and_scatter_test.cc | 85 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_P() 221 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F() 233 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F() 244 ConstantR0<int32>(&builder_, 1), add_s32_); in XLA_TEST_F() 255 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F() 267 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F() 282 ConstantR0<float>(&builder_, 0.0f), add_f32_); in XLA_TEST_F() 296 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F() 308 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F() 320 ConstantR0<int32>(&builder_, 0), add_s32_); in XLA_TEST_F() [all …]
|
D | conditional_test.cc | 31 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 …]
|
D | vector_ops_simple_test.cc | 142 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() 325 auto zero = ConstantR0<int64>(&builder, 0); in XLA_TEST_F() 326 auto one = ConstantR0<int64>(&builder, 10); in XLA_TEST_F() [all …]
|
D | compute_constant_test.cc | 102 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()
|
D | reduce_test.cc | 100 auto zero = ConstantR0<float>(&builder, 0.0); in RunR1ToR0Test() 130 init_value = ConstantR0<bool>(&builder, true); in RunR1ToR0PredTest() 133 init_value = ConstantR0<bool>(&builder, false); in RunR1ToR0PredTest() 163 auto input_pred = Eq(input, ConstantR0<uint8>(&builder, 1)); in RunR2ToR1PredTest() 168 init_value = ConstantR0<bool>(&builder, true); in RunR2ToR1PredTest() 171 init_value = ConstantR0<bool>(&builder, false); in RunR2ToR1PredTest() 208 auto zero = ConstantR0<float>(&builder, 0.0); in RunR2ToR0Test() 235 auto zero = ConstantR0<float>(&builder, 0.0); in RunR2ToR1Test() 291 auto zero = ConstantR0<NativeT>(&builder, initial_value); in RunVectorizedReduceTestForType() 445 auto zero = ConstantR0<float>(&builder, 0.0); in XLA_TEST_F() [all …]
|
D | unary_op_test.cc | 150 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()
|
D | bad_rng_shape_validation_test.cc | 38 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()
|
D | deallocation_test.cc | 51 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()
|
D | compilation_cache_test.cc | 78 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()
|
D | pred_test.cc | 37 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()
|
/external/tensorflow/tensorflow/compiler/xla/client/lib/ |
D | constants.cc | 47 return ConstantR0<Eigen::half>( in Epsilon() 51 return ConstantR0<Eigen::bfloat16>( in Epsilon() 55 return ConstantR0<float>(builder, std::numeric_limits<float>::epsilon()); in Epsilon() 57 return ConstantR0<double>(builder, in Epsilon() 72 return ConstantR0<Eigen::half>(builder, in MinFiniteValue() 75 return ConstantR0<Eigen::bfloat16>( in MinFiniteValue() 78 return ConstantR0<float>(builder, -std::numeric_limits<float>::max()); in MinFiniteValue() 80 return ConstantR0<double>(builder, -std::numeric_limits<double>::max()); in MinFiniteValue() 89 return ConstantR0<Eigen::half>(builder, in MinPositiveNormalValue() 92 return ConstantR0<Eigen::bfloat16>( in MinPositiveNormalValue() [all …]
|
D | constants.h | 50 return ConstantR0<bool>(builder, static_cast<bool>(value)); in ConstantR0WithType() 52 return ConstantR0<half>(builder, static_cast<half>(value)); in ConstantR0WithType() 54 return ConstantR0<bfloat16>(builder, static_cast<bfloat16>(value)); in ConstantR0WithType() 56 return ConstantR0<float>(builder, static_cast<float>(value)); in ConstantR0WithType() 58 return ConstantR0<double>(builder, static_cast<double>(value)); in ConstantR0WithType() 60 return ConstantR0<complex64>(builder, static_cast<complex64>(value)); in ConstantR0WithType() 62 return ConstantR0<complex128>(builder, static_cast<complex128>(value)); in ConstantR0WithType() 64 return ConstantR0<uint8>(builder, static_cast<uint8>(value)); in ConstantR0WithType() 66 return ConstantR0<uint16>(builder, static_cast<uint16>(value)); in ConstantR0WithType() 68 return ConstantR0<uint32>(builder, static_cast<uint32>(value)); in ConstantR0WithType() [all …]
|
D | prng.cc | 41 return (v << ConstantR0<uint32>(v.builder(), distance)) | in RotateLeftU32() 42 ShiftRightLogical(v, ConstantR0<uint32>(v.builder(), 32 - distance)); in RotateLeftU32() 62 ks[2] = ConstantR0<uint32>(builder, 0x1BD11BDA); in ThreeFry2x32() 88 x[1] = x[1] + ks[2] + ConstantR0<uint32>(builder, 1); in ThreeFry2x32() 95 x[1] = x[1] + ks[0] + ConstantR0<uint32>(builder, 2); in ThreeFry2x32() 102 x[1] = x[1] + ks[1] + ConstantR0<uint32>(builder, 3); in ThreeFry2x32() 109 x[1] = x[1] + ks[2] + ConstantR0<uint32>(builder, 4); in ThreeFry2x32() 116 x[1] = x[1] + ks[0] + ConstantR0<uint32>(builder, 5); in ThreeFry2x32() 153 ConstantR0<uint64>(builder, trailing_dims_product)); in GetThreeFryInputsAndUpdatedState() 157 initial_state + ConstantR0<uint64>(builder, ShapeUtil::ElementsIn(shape)); in GetThreeFryInputsAndUpdatedState() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | const_op.cc | 54 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()
|
D | lrn_ops.cc | 62 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/xla/service/ |
D | dynamic_window_utils.cc | 76 HloOp ConstantR0(HloComputation* comp, NativeT value, in ConstantR0() function 85 return ConstantR0<NativeT>(comp, 1, "one"); in One() 90 return ConstantR0<NativeT>(comp, 0, "zero"); in Zero() 95 return ConstantR0<int32>(comp, (window_size - 1) * window_dilation + 1, in EffectiveFilterSize() 108 HloOp stride = ConstantR0<int32>(comp, window_stride, "stride"); in GetWindowedOutputSize() 121 HloOp padding_before = padding_needed / ConstantR0<int32>(comp, 2); in GetWindowedOutputSize() 137 ConstantR0<int32>(comp, (window_size - 1) * window_dilation + 1); in GetWindowedInputGradSize() 138 HloOp stride = ConstantR0<int32>(comp, window_stride); in GetWindowedInputGradSize()
|
/external/tensorflow/tensorflow/compiler/xla/client/ |
D | xla_builder_test.cc | 74 Add(ConstantR0<float>(&b, 1.0), ConstantR0<float>(&b, 2.0)); in TEST_F() 85 op(ConstantR0<int32>(&b, 1)); in TEST_F() 99 op(ConstantR0<int32>(&b, 1), ConstantR0<int32>(&b, 2)); in TEST_F() 130 op(ConstantR0<uint32>(&b, 1), ConstantR0<uint32>(&b, 2)); in TEST_F() 174 ConstantR0<float>(&b, 1) >> ConstantR0<float>(&b, 2); in TEST_F() 185 Add(x, ConstantR0<float>(&b, 1.0)); in TEST_F() 259 auto one = ConstantR0<float>(&b, 1); in TEST_F() 260 auto two = ConstantR0<float>(&b, 2); in TEST_F() 479 StatusOr<XlaOp> op(ConstantR0<float>(&b, 1.0)); in TEST_F() 480 Add(b.ReportErrorOrReturn(op), ConstantR0<float>(&b, 2.0)); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/lib/ |
D | util.cc | 43 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/core/tpu/kernels/ |
D | topk_ops.cc | 50 xla::XlaOp zero_r0 = xla::ConstantR0<int32>(builder, 0); in CreateKthOrderStatisticComputation() 54 xla::XlaOp max_r0 = xla::ConstantR0<int32>(builder, 0x7FFFFFFF); in CreateKthOrderStatisticComputation() 58 xla::XlaOp negative_zero_r0 = xla::ConstantR0<int32>(builder, 0x80000000); in CreateKthOrderStatisticComputation() 64 xla::Broadcast(xla::ConstantR0<int32>(builder, mask), {height}); in CreateKthOrderStatisticComputation() 110 xla::XlaOp k = xla::ConstantR0<int32>(builder, k_); in Compile() 155 xla::XlaOp negative_one_r0 = xla::ConstantR0<int>(builder, -1); in CreateTopKUnique() 158 xla::XlaOp negative_infinity_r0 = xla::ConstantR0<float>(builder, -INFINITY); in CreateTopKUnique() 192 xla::XlaOp mask_r0 = xla::ConstantR0(builder, count_mask); in CreateTopKUnique() 263 xla::XlaOp zero_r0 = xla::ConstantR0(builder, 0U); in CreateMakeUnique() 271 xla::XlaOp count_mask_r0 = xla::ConstantR0(builder, count_mask); in CreateMakeUnique() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/tests/ |
D | cpu_infeed_test.cc | 129 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()
|