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

Method HandleTupleSelect

tensorflow/compiler/xla/service/gpu/ir_emitter.cc:478–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478Status IrEmitter::HandleTupleSelect(HloInstruction* tuple_select) {
479 auto pred = tuple_select->operand(0);
480 auto on_true = tuple_select->operand(1);
481 auto on_false = tuple_select->operand(2);
482 TF_RET_CHECK(pred->shape().element_type() == PRED);
483 TF_RET_CHECK(ShapeUtil::IsScalar(pred->shape()));
484 TF_RET_CHECK(tuple_select->shape().IsTuple());
485 llvm_ir::EmitTupleSelect(GetIrArray(*tuple_select, *tuple_select),
486 GetIrArray(*pred, *tuple_select),
487 GetBasePointer(*on_true), GetBasePointer(*on_false),
488 &b_);
489 return Status::OK();
490}
491
492namespace {
493llvm::Value* Real(llvm::Value* x, llvm::IRBuilder<>* b) {

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