| 1116 | } |
| 1117 | |
| 1118 | void RdmaTensorResponse::Send(const Tensor& in, const TensorProto& proto, |
| 1119 | bool is_dead, const Status& status) { |
| 1120 | if (!status.ok()) { |
| 1121 | SendErrorStatus(status); |
| 1122 | return; |
| 1123 | } |
| 1124 | bool can_memcpy = DataTypeCanUseMemcpy(in.dtype()); |
| 1125 | bool proto_size_changed = |
| 1126 | (!can_memcpy) && (proto.ByteSize() != rm_.tensor_bytes_); |
| 1127 | if (meta_data_changed_ || proto_size_changed) { |
| 1128 | Clone(in, proto, is_dead); |
| 1129 | SendMetaData(in, proto, is_dead); |
| 1130 | } else { |
| 1131 | SendContent(in, proto, is_dead); |
| 1132 | } |
| 1133 | } |
| 1134 | |
| 1135 | bool RdmaTensorResponse::TensorMetaDataChanged(const Tensor& in, bool is_dead) { |
| 1136 | return (rm_.data_type_ != in.dtype()) || (rm_.tensor_shape_ != in.shape()) || |
no test coverage detected