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

Method SendNextItem

tensorflow/contrib/verbs/rdma.cc:864–880  ·  view source on GitHub ↗

Send the next message from the buffer's job queue.

Source from the content-addressed store, hash-verified

862
863// Send the next message from the buffer's job queue.
864void RdmaMessageBuffer::SendNextItem() {
865 uint32_t imm_data = RDMA_IMM_DATA_MESSAGE;
866 mu_.lock();
867 if (!queue_.empty() && (local_status_ == idle) && (remote_status_ == idle)) {
868 local_status_ = busy;
869 remote_status_ = busy;
870 string message = queue_.front();
871 queue_.pop();
872 // local/remote_status_ won't be set back to idle
873 // unitl Write() is successful
874 mu_.unlock();
875 memcpy(buffer_, message.data(), message.size());
876 Write(imm_data, message.size());
877 } else {
878 mu_.unlock();
879 }
880}
881
882#if GOOGLE_CUDA
883static void CountCopies(const std::string& key, void* src_addr, void* dst_addr,

Callers 4

Process_CQMethod · 0.80
SendMetaDataMethod · 0.80
SendErrorStatusMethod · 0.80
SendMethod · 0.80

Calls 7

lockMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
popMethod · 0.45
unlockMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected