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

Method HandleOutfeed

tensorflow/compiler/xla/service/hlo_verifier.cc:348–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348Status ShapeVerifier::HandleOutfeed(HloInstruction* instruction) {
349 HloOutfeedInstruction* outfeed = Cast<HloOutfeedInstruction>(instruction);
350 TF_RETURN_IF_ERROR(CheckIsTokenOperand(instruction, 1));
351
352 // Outfeed has a separate shape field for the value which is outfed to the
353 // host. The shape of the instruction itself is always a token.
354 if (!ShapesSame(outfeed->outfeed_shape(), outfeed->operand(0)->shape())) {
355 return InternalError(
356 "Expected outfeed shape to be equal to operand's shape %s, "
357 "actual shape is %s:\n%s",
358 StringifyShape(outfeed->operand(0)->shape()),
359 StringifyShape(outfeed->outfeed_shape()), outfeed->ToString());
360 }
361 return CheckShape(outfeed, ShapeUtil::MakeTokenShape());
362}
363
364bool ShapeVerifier::HasCompatibleElementTypes(const Shape& shape_0,
365 const Shape& shape_1,

Callers 1

VisitMethod · 0.45

Calls 5

StringifyShapeFunction · 0.85
InternalErrorFunction · 0.50
shapeMethod · 0.45
operandMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected