Skip to content

Verbs fix: Removed Dependency on Duplicate Recv Flag - #12705

Merged
yifeif merged 4 commits into
tensorflow:masterfrom
yanivbl6:removed_dependancy_on_dup_flag_for_verbs
Sep 7, 2017
Merged

yifeif merged 4 commits into
tensorflow:masterfrom
yanivbl6:removed_dependancy_on_dup_flag_for_verbs

Conversation

@yanivbl6

Copy link
Copy Markdown

This PR is a response for #11825

I've added a new Queue and Table for the RdmaTensorBuffer, where the relevant information from the send-recv waiter table is stored in case the actual rdma-write does not occur (If the allocated buffer is too small, or busy). When we get a RDMA_MESSAGE_BUFFER_RESPONSE, or RDMA_MESSAGE_BUFFER_IDLE, we check the new queue/table instead of checking the waiter table. (This happens in the new ReSendNextItem() function).

Also added a new function that generates the callback lambda function, to avoid code redundancy.
The result is that the code is less clean- I am open to suggestions on making it more tidy.

@junshi15 @shamoya

yanivbl6 added 2 commits August 30, 2017 11:38
…ca of the send_recv_ops waiter table is stored.

Values are added to the local table when remote is not ready for receiving our tensor.
When we get an BUFFER_RESPONSE, we use ReSendNextItem instead of sendNextItem.

Splitted SendNextItem And ReSend to two functions, move callback to new function for code reuse

Clanged formatted

Fixed according to shamoya's review, Fixed send->resend flow

squached, rebased on origin/master
@tensorflow-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@shamoya

shamoya commented Aug 30, 2017

Copy link
Copy Markdown
Contributor

Comment thread tensorflow/contrib/verbs/rdma.cc Outdated
ReItem* item = new ReItem();
item->send_args = send_args;
item->recv_args = recv_args;
item->in = in;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to increase reference count on this or that?

      if (item->recv_args.device_context) {
        item->recv_args.device_context->Ref();
      }

@junshi15

Copy link
Copy Markdown
Contributor

@yanivbl6, thanks for the quick response. It looks mostly good. I have a comment regarding the reference count.

Added checks for context existaning before Ref()
@yanivbl6

Copy link
Copy Markdown
Author

Thanks @junshi15,
I've added a constructor / destructor to the ReItem struct, to take care of the referencing and the de-referencing. Also removed the unused field (Status).

@junshi15

Copy link
Copy Markdown
Contributor

It looks good to me. @shamoya any comment?

@yanivbl6

Copy link
Copy Markdown
Author

@shamoya participated in the code writing, and reviewed it prior to the PR.

Comment thread tensorflow/contrib/verbs/rdma.h Outdated
Tensor in;
bool is_dead;

ReItem(const Rendezvous::Args& send_args_, const Rendezvous::Args& recv_args_, const Tensor& in_, bool is_dead_ ): send_args(send_args_), recv_args(recv_args_), in(in_), is_dead(is_dead_){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long line, break by col 80

Comment thread tensorflow/contrib/verbs/rdma.cc Outdated
VLOG(2) << "Extend RDMA buffer from " << size_ << " to " << buffer_size;
}
CreateCPUBuffer(buffer_size, false);
//Need to be recieved again, put into the re-recv queue and the table

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/recieved/received/

@martinwicke

Copy link
Copy Markdown
Member

Jenkins, test this please.

@yifeif

yifeif commented Sep 6, 2017

Copy link
Copy Markdown
Contributor

@tensorflow-jenkins test this please

@yifeif
yifeif merged commit b92d538 into tensorflow:master Sep 7, 2017
@yanivbl6
yanivbl6 deleted the removed_dependancy_on_dup_flag_for_verbs branch September 10, 2017 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants