| 43 | } |
| 44 | |
| 45 | StatusOr<HloInstruction*> MakeBinaryHlo(HloOpcode opcode, HloInstruction* lhs, |
| 46 | HloInstruction* rhs) { |
| 47 | HloComputation* computation = lhs->parent(); |
| 48 | CHECK_EQ(computation, rhs->parent()); |
| 49 | TF_ASSIGN_OR_RETURN(Shape binary_op_shape, |
| 50 | ShapeInference::InferBinaryOpShape(opcode, lhs, rhs)); |
| 51 | return computation->AddInstruction( |
| 52 | HloInstruction::CreateBinary(binary_op_shape, opcode, lhs, rhs)); |
| 53 | } |
| 54 | |
| 55 | StatusOr<HloInstruction*> MakeCompareHlo(ComparisonDirection direction, |
| 56 | HloInstruction* lhs, |
no test coverage detected