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

Function MakePadHlo

tensorflow/compiler/xla/service/hlo_creation_utils.cc:67–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67StatusOr<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
80StatusOr<HloInstruction*> MakeSliceHlo(HloInstruction* operand,
81 absl::Span<const int64> start_indices,

Callers 5

HandlePadMethod · 0.85
PadVectorWithZerosFunction · 0.85
MaybePaddedKernelFunction · 0.85

Calls 2

parentMethod · 0.45
AddInstructionMethod · 0.45

Tested by

no test coverage detected