| 421 | } |
| 422 | |
| 423 | Status 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 | |
| 440 | Status ShapeVerifier::HandleRngGetAndUpdateState(HloInstruction* instruction) { |
| 441 | TF_RETURN_IF_ERROR(CheckOperandCount(instruction, 0)); |
no test coverage detected