BaguaSys / bagua-net

High performance NCCL plugin for Bagua.
https://bagua-tutorials.kwai-seattle.com/
MIT License
15 stars 4 forks source link

feat: suppport tokio backend #21

Closed shjwudp closed 3 years ago

shjwudp commented 3 years ago

This commit contains two features and one bug fix.

Features:

  1. Support tokio backend for better performance in send / recv hybrid communication scenarios.
  2. Improved packet split method utils::chunk_size. This method can divide the communication packet into multiple small packets of equal size as required, and the packet body is not less than the minimum limit.

Bug fix:

  1. In our implementation, one p2p communication corresponds to multiple TCP links. When establishing the link, there was a false assumption that the order in which the server accepts is the same as the order in which the client initiates the connect. Because accept function is take a connection from the pool of tcp links, Instead of one-to-one correspondence with connection. Any way, I fixed this bug.
todo[bot] commented 3 years ago

make Rotating communicator

https://github.com/BaguaSys/bagua-net/blob/9b431178418fd0374ce94f56c455d2078fdd3919/src/implement/tokio_backend.rs#L33-L38


This comment was generated by todo based on a TODO comment in 9b431178418fd0374ce94f56c455d2078fdd3919 in #21. cc @BaguaSys.
todo[bot] commented 3 years ago

make shutdown global

https://github.com/BaguaSys/bagua-net/blob/9b431178418fd0374ce94f56c455d2078fdd3919/src/implement/tokio_backend.rs#L717-L722


This comment was generated by todo based on a TODO comment in 9b431178418fd0374ce94f56c455d2078fdd3919 in #21. cc @BaguaSys.