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

Method HandleRngBitGenerator

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

Source from the content-addressed store, hash-verified

421}
422
423Status ShapeVerifier::HandleRngBitGenerator(HloInstruction* hlo) {
424 if (!hlo->shape().IsTuple() || hlo->shape().tuple_shapes_size() != 2) {
425 return InternalError(
426 "Expected tuple shape with 2 elements for RngBitGenerator. Got: %s",
427 hlo->shape().ToString());
428 }
429 if (!ShapeUtil::Compatible(hlo->operand(0)->shape(),
430 hlo->shape().tuple_shapes(0))) {
431 return InternalError(
432 "Expected state shape to match between input and output for "
433 "RngBitGenerator. Got %s vs. %s",
434 hlo->operand(0)->shape().ToString(),
435 hlo->shape().tuple_shapes(0).ToString());
436 }
437 return Status::OK();
438}
439
440Status ShapeVerifier::HandleRngGetAndUpdateState(HloInstruction* instruction) {
441 TF_RETURN_IF_ERROR(CheckOperandCount(instruction, 0));

Callers 1

VisitMethod · 0.45

Calls 8

CompatibleClass · 0.85
tuple_shapes_sizeMethod · 0.80
InternalErrorFunction · 0.50
IsTupleMethod · 0.45
shapeMethod · 0.45
ToStringMethod · 0.45
operandMethod · 0.45
tuple_shapesMethod · 0.45

Tested by

no test coverage detected