Home
last modified time | relevance | path

Searched refs:on_true (Results 1 – 24 of 24) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/tests/
Dselect_test.cc39 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F() local
41 Select(pred, on_true, on_false); in TEST_F()
49 auto on_true = ConstantR0<int32>(&builder, -42); in TEST_F() local
51 Select(pred, on_true, on_false); in TEST_F()
59 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F() local
61 Select(pred, on_true, on_false); in TEST_F()
69 auto on_true = ConstantR1<float>(&builder, {}); in XLA_TEST_F() local
71 Select(pred, on_true, on_false); in XLA_TEST_F()
79 auto on_true = in TEST_F() local
83 Select(pred, on_true, on_false); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Dconditional_code_motion_test.cc283 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
284 ASSERT_EQ(on_true->instruction_count(), 1); in TEST_F()
351 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
352 ASSERT_EQ(on_true->instruction_count(), 9); in TEST_F()
406 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
407 ASSERT_EQ(on_true->instruction_count(), 1); in TEST_F()
608 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
609 ASSERT_EQ(on_true->instruction_count(), 5); in TEST_F()
695 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
696 ASSERT_EQ(on_true->instruction_count(), 6); in TEST_F()
[all …]
Dhlo_creation_utils.cc382 HloInstruction* on_true, in MakeSelectHlo() argument
386 DCHECK_EQ(computation, on_true->parent()); in MakeSelectHlo()
388 Shape op_shape = on_true->shape(); in MakeSelectHlo()
406 on_true, on_false)); in MakeSelectHlo()
409 select_shape, select_op_code, pred, on_true, on_false)); in MakeSelectHlo()
Dshape_inference.h360 const Shape& on_true,
364 const Shape& on_true,
Dshape_inference.cc3127 const Shape& pred, const Shape& on_true, const Shape& on_false) { in InferSelectShape() argument
3129 TF_RETURN_IF_ERROR(ExpectArray(on_true, "select on-true")); in InferSelectShape()
3132 if (!ShapeUtil::CompatibleIgnoringFpPrecision(on_true, on_false)) { in InferSelectShape()
3135 ShapeUtil::HumanString(on_true), ShapeUtil::HumanString(on_false)); in InferSelectShape()
3145 .IgnoreDynamicDimension()(pred, on_true)) { in InferSelectShape()
3149 ShapeUtil::HumanString(on_true), ShapeUtil::HumanString(pred)); in InferSelectShape()
3153 pred, ShapeUtil::HigherPrecisionElementType(on_true, on_false)); in InferSelectShape()
3157 const Shape& pred, const Shape& on_true, const Shape& on_false) { in InferTupleSelectShape() argument
3160 if (!ShapeUtil::Compatible(on_true, on_false)) { in InferTupleSelectShape()
3163 ShapeUtil::HumanString(on_true), ShapeUtil::HumanString(on_false)); in InferTupleSelectShape()
[all …]
Dhlo_creation_utils.h171 HloInstruction* on_true,
Dtuple_points_to_analysis.cc453 auto on_true = tuple_select->operand(1); in HandleTupleSelect() local
455 PointsToSet& points_to_set = CreateCopiedPointsToSet(tuple_select, on_true); in HandleTupleSelect()
Dhlo_evaluator.cc2002 const auto& on_true = GetEvaluatedLiteralFor(select->operand(1)); in HandleSelect() local
2008 evaluated_[select] = on_true.Clone(); in HandleSelect()
2020 const auto& on_true = GetEvaluatedLiteralFor(tuple_select->operand(1)); in HandleTupleSelect() local
2024 evaluated_[tuple_select] = on_true.Clone(); in HandleTupleSelect()
Dhlo_evaluator_test.cc295 auto on_true = LiteralUtil::CreateR2<float>({{2.f, 4.f}, {4.f, 4.f}}); in TEST_P() local
298 Shape shape = on_true.shape(); in TEST_P()
302 b.AddInstruction(HloInstruction::CreateConstant(std::move(on_true))); in TEST_P()
Dhlo_evaluator_typed_visitor.h1045 [](bool pred, ReturnT on_true, ReturnT on_false) {
1047 return on_true;
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dtuple_ops.cc37 llvm::Value* on_true, llvm::Value* on_false, in EmitTupleSelect() argument
53 llvm::Value* src = b->CreateSelect(pred_cond, on_true, on_false); in EmitTupleSelect()
Dtuple_ops.h63 llvm::Value* on_true, llvm::Value* on_false,
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/
Dhlo_ops.cc1805 if (on_true() == on_false()) { in fold()
1806 return on_true(); in fold()
1820 return predicate.getSplatValue<APInt>().getBoolValue() ? on_true() in fold()
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder.h513 XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
1109 friend XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
1802 XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
Dxla_builder.cc1225 XlaOp XlaBuilder::Select(XlaOp pred, XlaOp on_true, XlaOp on_false) { in Select() argument
1227 TF_ASSIGN_OR_RETURN(const Shape* true_shape, GetShapePtr(on_true)); in Select()
1232 return TernaryOp(opcode, pred, on_true, on_false); in Select()
4186 XlaOp Select(const XlaOp pred, const XlaOp on_true, const XlaOp on_false) { in Select() argument
4187 return pred.builder()->Select(pred, on_true, on_false); in Select()
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/IR/
Dhlo_ops_base.td1164 Constructs an output tensor from the elements of `on_true` and `on_false`
1167 `pred`, `on_true` and `on_false` must be broadcast compatible.
Dlhlo_ops.td483 Arg<LHLO_Buffer, "", [MemRead]>:$on_true,
Dhlo_ops.td1113 HLO_Tensor:$on_true,
/external/tensorflow/tensorflow/compiler/xla/g3doc/
Doperation_semantics.md2511 <b> `Select(pred, on_true, on_false)` </b>
2516 `on_true` | `XlaOp` | array of type T
2519 The arrays `on_true` and `on_false` must have the same shape. This is also the
2521 `on_true` and `on_false`, with the `PRED` element type.
2524 taken from `on_true` if the value of `P` is `true`, and from `on_false` if the
2527 wholly from `on_true` if `pred` is `true`, and from `on_false` if `pred` is `false`.
2550 types for this purpose. If `on_true` and `on_false` are tuples (which must have
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf_patterns.td514 // $gradients needs to be of static shape so that on_true and on_false operands
Dlegalize_tf.cc2615 Value on_true = broadcast_or_self(op.t()); in matchAndRewrite() local
2618 rewriter.replaceOpWithNewOp<SelectOp>(op, on_true.getType(), pred, on_true, in matchAndRewrite()
/external/python/cpython3/Doc/faq/
Dprogramming.rst714 [on_true] if [expression] else [on_false]
722 [expression] and [on_true] or [on_false]
724 However, this idiom is unsafe, as it can give wrong results when *on_true*
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dir_emitter.cc377 auto on_true = tuple_select->operand(1); in HandleTupleSelect() local
384 GetEmittedValueFor(on_true), in HandleTupleSelect()
/external/python/cpython2/Doc/faq/
Dprogramming.rst877 [on_true] if [expression] else [on_false]