| 65 | } |
| 66 | |
| 67 | StatusOr<HloInstruction*> MakePadHlo(HloInstruction* operand, |
| 68 | HloInstruction* padding_value, |
| 69 | const PaddingConfig& padding_config) { |
| 70 | HloComputation* computation = operand->parent(); |
| 71 | CHECK_EQ(computation, padding_value->parent()); |
| 72 | TF_ASSIGN_OR_RETURN( |
| 73 | Shape pad_shape, |
| 74 | ShapeInference::InferPadShape(operand->shape(), padding_value->shape(), |
| 75 | padding_config)); |
| 76 | return computation->AddInstruction(HloInstruction::CreatePad( |
| 77 | pad_shape, operand, padding_value, padding_config)); |
| 78 | } |
| 79 | |
| 80 | StatusOr<HloInstruction*> MakeSliceHlo(HloInstruction* operand, |
| 81 | absl::Span<const int64> start_indices, |
no test coverage detected