MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / HandleTupleSelect

Method HandleTupleSelect

tensorflow/compiler/xla/service/cpu/ir_emitter.cc:374–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374Status IrEmitter::HandleTupleSelect(HloInstruction* tuple_select) {
375 auto pred = tuple_select->operand(0);
376 auto on_true = tuple_select->operand(1);
377 auto on_false = tuple_select->operand(2);
378 TF_RET_CHECK(pred->shape().element_type() == PRED);
379 TF_RET_CHECK(ShapeUtil::IsScalar(pred->shape()));
380 TF_RET_CHECK(tuple_select->shape().IsTuple());
381 TF_RETURN_IF_ERROR(EmitTargetAddressForOp(tuple_select));
382 llvm_ir::EmitTupleSelect(GetIrArrayFor(tuple_select), GetIrArrayFor(pred),
383 GetEmittedValueFor(on_true),
384 GetEmittedValueFor(on_false), &b_);
385 return Status::OK();
386}
387
388Status IrEmitter::HandleInfeed(HloInstruction* instruction) {
389 HloInfeedInstruction* infeed = Cast<HloInfeedInstruction>(instruction);

Callers

nothing calls this directly

Calls 6

EmitTupleSelectFunction · 0.85
IsScalarFunction · 0.50
operandMethod · 0.45
element_typeMethod · 0.45
shapeMethod · 0.45
IsTupleMethod · 0.45

Tested by

no test coverage detected