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

Method SendMetaData

tensorflow/contrib/verbs/rdma.cc:1164–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164void RdmaTensorResponse::SendMetaData(const Tensor& in,
1165 const TensorProto& proto, bool is_dead) {
1166 RDMA_LOG(2) << "Request #" << rm_.request_index_
1167 << ": Meta data changed: " << rm_.name_;
1168 bool can_memcpy = DataTypeCanUseMemcpy(in.dtype());
1169 size_t tensor_bytes = (can_memcpy) ? in.TotalBytes() : proto.ByteSize();
1170
1171 // Send meta-data update:
1172 RdmaMessage rm;
1173 rm.type_ = RDMA_MESSAGE_META_DATA_UPDATE;
1174 rm.name_size_ = rm_.name_.size();
1175 rm.name_ = rm_.name_;
1176 rm.tensor_shape_ = in.shape();
1177 rm.data_type_ = in.dtype();
1178 rm.step_id_ = rm_.step_id_;
1179 rm.is_dead_ = is_dead;
1180 rm.tensor_bytes_ = tensor_bytes;
1181 rm.request_index_ = rm_.request_index_;
1182#ifdef RDMA_DATA_VALIDATION
1183 rm.checksum_ = checksum_;
1184#endif
1185 RDMA_LOG(1) << "Step 0x" << std::hex << rm.step_id_ << std::dec
1186 << ": Sending RDMA_MESSAGE_META_DATA_UPDATE #"
1187 << rm.request_index_ << ": " << rm.name_
1188 << " (shape = " << rm.tensor_shape_.DebugString() << "."
1189 << " data-type = " << DataTypeString(rm.data_type_) << "."
1190 << " is-dead = " << rm.is_dead_ << ")";
1191
1192 string message = RdmaMessage::CreateMessage(rm);
1193 channel_->tx_message_buffer_->EnqueueItem(message);
1194 channel_->tx_message_buffer_->SendNextItem();
1195}
1196
1197void RdmaTensorResponse::SendContent(const Tensor& in, const TensorProto& proto,
1198 bool is_dead) {

Callers

nothing calls this directly

Calls 10

DataTypeCanUseMemcpyFunction · 0.85
ByteSizeMethod · 0.80
EnqueueItemMethod · 0.80
SendNextItemMethod · 0.80
DataTypeStringFunction · 0.50
dtypeMethod · 0.45
TotalBytesMethod · 0.45
sizeMethod · 0.45
shapeMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected