Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/compiler/xla/tests/
Dselect_test.cc38 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F() local
40 Select(pred, on_true, on_false); in TEST_F()
48 auto on_true = ConstantR0<int32_t>(&builder, -42); in TEST_F() local
50 Select(pred, on_true, on_false); in TEST_F()
58 auto on_true = ConstantR0<float>(&builder, 123.0f); in TEST_F() local
60 Select(pred, on_true, on_false); in TEST_F()
68 auto on_true = ConstantR1<float>(&builder, {}); in XLA_TEST_F() local
70 Select(pred, on_true, on_false); in XLA_TEST_F()
78 auto on_true = in TEST_F() local
82 Select(pred, on_true, on_false); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/
Dconditional_code_motion_test.cc284 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
285 ASSERT_EQ(on_true->instruction_count(), 1); in TEST_F()
352 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
353 ASSERT_EQ(on_true->instruction_count(), 9); in TEST_F()
491 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
492 EXPECT_EQ(on_true->instruction_count(), 3); in TEST_F()
493 EXPECT_THAT(on_true->root_instruction(), in TEST_F()
713 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
714 ASSERT_EQ(on_true->instruction_count(), 5); in TEST_F()
800 const HloComputation* on_true = conditional->branch_computation(0); in TEST_F() local
[all …]
Dhlo_creation_utils.cc488 HloInstruction* on_true, in MakeSelectHlo() argument
492 DCHECK_EQ(computation, on_true->parent()); in MakeSelectHlo()
494 Shape op_shape = on_true->shape(); in MakeSelectHlo()
511 on_true, on_false)); in MakeSelectHlo()
514 select_shape, select_op_code, pred, on_true, on_false)); in MakeSelectHlo()
Dhlo_creation_utils.h225 HloInstruction* on_true,
Dshape_inference.cc3268 const Shape& pred, const Shape& on_true, const Shape& on_false) { in InferSelectShape() argument
3270 TF_RETURN_IF_ERROR(ExpectArray(on_true, "select on-true")); in InferSelectShape()
3273 if (!ShapeUtil::CompatibleIgnoringFpPrecision(on_true, on_false)) { in InferSelectShape()
3276 ShapeUtil::HumanString(on_true), ShapeUtil::HumanString(on_false)); in InferSelectShape()
3286 .IgnoreDynamicDimension()(pred, on_true)) { in InferSelectShape()
3290 ShapeUtil::HumanString(on_true), ShapeUtil::HumanString(pred)); in InferSelectShape()
3294 pred, ShapeUtil::HigherPrecisionElementType(on_true, on_false)); in InferSelectShape()
Dshape_inference.h392 const Shape& on_true,
Dlayout_assignment_test.cc1538 const HloInstruction* on_true = FindInstruction(m.get(), "reshape.8493"); in TEST_F() local
1539 ExpectLayoutIs(on_true->shape(), {0, 1, 2}); in TEST_F()
Dhlo_evaluator_typed_visitor.h861 [](bool pred, ReturnT on_true, ReturnT on_false) {
863 return on_true;
Dhlo_evaluator_test.cc320 auto on_true = LiteralUtil::CreateR2<float>({{2.f, 4.f}, {4.f, 4.f}}); in TEST_P() local
323 Shape shape = on_true.shape(); in TEST_P()
327 b.AddInstruction(HloInstruction::CreateConstant(std::move(on_true))); in TEST_P()
Dhlo_evaluator.cc3209 const auto& on_true = GetEvaluatedLiteralFor(select->operand(1)); in HandleSelect() local
3215 evaluated_[select] = on_true.Clone(); in HandleSelect()
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/include/mlir-hlo/Dialect/mhlo/IR/
Dchlo_ops.td756 HLO_Tensor:$on_true,
763 $pred `,` $on_true `,` $on_false attr-dict `:`
764 `(` type($pred) `,` type($on_true) `,` type($on_false) `)` `->` type(results)
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/stablehlo/dialect/
DChloOps.td773 HLO_Tensor:$on_true,
780 $pred `,` $on_true `,` $on_false attr-dict `:`
781 `(` type($pred) `,` type($on_true) `,` type($on_false) `)` `->` type(results)
DChloOps.cpp386 auto onTrueType = op.on_true().getType().dyn_cast<ShapedType>(); in inferReturnTypeComponents()
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Analysis/
Dshape_component_analysis.cc373 backwardsWorklist.push_back(ShapeOrValueInfo::getShapeInfoOf(op.on_true())); in backwardSelectShape()
378 dims = lookup(ShapeOrValueInfo::getShapeInfoOf(op.on_true())); in forwardSelectShape()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf_patterns.td599 def : Pat<(TF_SelectV2Op HLO_Tensor:$pred, HLO_Tensor:$on_true,
601 (CHLO_BroadcastSelectOp $pred, $on_true, $on_false)>;
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/IR/
Dchlo_ops.cc413 auto onTrueType = op.on_true().getType().dyn_cast<ShapedType>(); in inferReturnTypeComponents()
Dhlo_ops.cc5520 if (!compatibleShapeAndElementType(on_true().getType(), on_false().getType())) in verify()
5530 if (failed(verifyCompatibleShape(pred().getType(), on_true().getType()))) in verify()
5537 if (on_true() == on_false()) { in fold()
5538 return on_true(); in fold()
5552 return predicate.getSplatValue<APInt>().getBoolValue() ? on_true() in fold()
5568 selectOp.on_true()}; in selectCanonicalization()
5586 auto trueType = op.on_true().getType().cast<TensorType>(); in inferReturnTypeComponents()
/external/tensorflow/tensorflow/compiler/xla/python/xla_extension/
Dops.pyi343 def Select(pred: XlaOp, on_true: XlaOp, on_false: XlaOp) -> XlaOp: ...
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/include/mlir-hlo/Dialect/lhlo/IR/
Dlhlo_ops.td978 Constructs an output tensor from the elements of `on_true` and `on_false`
981 `pred`, `on_true` and `on_false` must be broadcast compatible.
985 Arg<LHLO_Buffer, "", [MemRead]>:$on_true,
/external/tensorflow/tensorflow/compiler/xla/client/
Dxla_builder.cc1292 XlaOp XlaBuilder::Select(XlaOp pred, XlaOp on_true, XlaOp on_false) { in Select() argument
1294 TF_ASSIGN_OR_RETURN(const Shape* true_shape, GetShapePtr(on_true)); in Select()
1302 return Conditional(pred, on_true, passthrough_true, on_false, in Select()
1305 return TernaryOp(HloOpcode::kSelect, pred, on_true, on_false); in Select()
4138 XlaOp Select(const XlaOp pred, const XlaOp on_true, const XlaOp on_false) { in Select() argument
4139 return pred.builder()->Select(pred, on_true, on_false); in Select()
Dxla_builder.h514 XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
1151 friend XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
1897 XlaOp Select(XlaOp pred, XlaOp on_true, XlaOp on_false);
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/transforms/
Drank_specialization.cc835 {selectOp.on_true(), selectOp.on_false(), selectOp.getResult()}); in findNonScalarShapeEquivalences()
/external/tensorflow/tensorflow/compiler/xla/g3doc/
Doperation_semantics.md2648 <b> `Select(pred, on_true, on_false)` </b>
2653 `on_true` | `XlaOp` | array of type T
2656 The arrays `on_true` and `on_false` must have the same shape. This is also the
2658 `on_true` and `on_false`, with the `PRED` element type.
2661 taken from `on_true` if the value of `P` is `true`, and from `on_false` if the
2664 wholly from `on_true` if `pred` is `true`, and from `on_false` if `pred` is `false`.
2687 types for this purpose. If `on_true` and `on_false` are tuples (which must have
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlegalize_hlo.cc2114 if (!value_select || value_select.on_true() != body.getArgument(0) || in matchReduceComputation()
2148 if (!index_select || index_select.on_true() != body.getArgument(1) || in matchReduceComputation()
/external/python/cpython3/Doc/faq/
Dprogramming.rst718 [on_true] if [expression] else [on_false]
726 [expression] and [on_true] or [on_false]
728 However, this idiom is unsafe, as it can give wrong results when *on_true*

12