Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the implementation of TCP Store #39384

Merged
merged 27 commits into from
Feb 22, 2022
Merged

Conversation

sandyhouse
Copy link

@sandyhouse sandyhouse commented Feb 8, 2022

PR types

New features

PR changes

Others

Describe

Add the implementation of TCP Store (kv-database) for communication.

usage:

import datetime
import paddle


store = paddle.fluid.core.TCPStore(
                     "127.0.0.1",  # master address
                     6170,           # master port
                     True,            # is master
                     1,                  # world_size
                     datetime.timedelta(0) # timeout
               )
        store.add("my", 3)
        ret1 = store.get('my')
        store.add("my", 3)
        ret2 = store.get('my')
        assert ret1[0] + 3 == ret2[0]

TODO:

  1. add the timeout for store operations

@paddle-bot-old
Copy link

paddle-bot-old bot commented Feb 8, 2022

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

store = paddle.fluid.core.TCPStore这个路径是不是太长?

@sandyhouse
Copy link
Author

store = paddle.fluid.core.TCPStore这个路径是不是太长?

这个是pybind暴露路径,后面会import到paddle.distributed.TCPstore(python端路径)

Copy link
Member

@ForFishes ForFishes left a comment

Choose a reason for hiding this comment

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

LGTM

@sandyhouse sandyhouse merged commit b95cd3b into PaddlePaddle:develop Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants