| 876 | } |
| 877 | |
| 878 | Status ShapeVerifier::HandleCopyDone(HloInstruction* copy_done) { |
| 879 | const Shape& operand_shape = copy_done->operand(0)->shape(); |
| 880 | const Shape& dest_shape = ShapeUtil::GetTupleElementShape(operand_shape, 0); |
| 881 | const Shape& src_shape = ShapeUtil::GetTupleElementShape(operand_shape, 1); |
| 882 | if (!ShapesSame(dest_shape, src_shape, |
| 883 | /*minor_to_major_only=*/false, |
| 884 | /*ignore_memory_space=*/true)) { |
| 885 | return InternalError( |
| 886 | "Source and destination buffers in CopyDone arguments need to be the " |
| 887 | "same shape found %s and %s\n%s", |
| 888 | StringifyShape(dest_shape), StringifyShape(src_shape), |
| 889 | copy_done->ToString()); |
| 890 | } |
| 891 | return CheckShape(copy_done, ShapeUtil::GetTupleElementShape( |
| 892 | copy_done->operand(0)->shape(), 0)); |
| 893 | } |
| 894 | |
| 895 | Status ShapeVerifier::HandleSend(HloInstruction* send) { |
| 896 | return CheckShape(send, |
no test coverage detected