-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Python implementation for a proposed Go Op. #8434
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
Conversation
python/paddle/v2/fluid/__init__.py
Outdated
| from core import LoDTensor, CPUPlace, CUDAPlace | ||
| from distribute_transpiler import DistributeTranspiler | ||
| from distribute_transpiler_simple import SimpleDistributeTranspiler | ||
| from concurrency import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the PEP8 style:
Wildcard imports (from import *) should be avoided, as they make it unclear which names are present in the namespace, confusing both readers and many automated tools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pointing that out. Fixed in the latest commit.
| ] | ||
|
|
||
|
|
||
| class Go(BlockGuard): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it why would we need to define Go as a class?
In https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/v2/fluid, I don't see a While class or an IfThenElse class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh the While and IfElse classes are in https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/layers/control_flow.py . We thought we'll put all CSP related operators in concurrency.py and they need not be a part of layers as while and ifelse are so we put it right under the fluid directory.
This PR also contains a
notest_concuurency.pythat is a test that we need to pass whengo opand channels are implemented in C++