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

Added an elementary unit test for CSP #8340

Merged
merged 5 commits into from
Feb 10, 2018

Conversation

kavyasrinet
Copy link

@kavyasrinet kavyasrinet commented Feb 9, 2018

@abhinavarora and I designed this unit test for the proposed imperative programming paradigm in https://github.com/PaddlePaddle/Paddle/blob/develop/doc/design/csp.md .
This is a unit test that implements the Daisy Chain as explained here: https://talks.golang.org/2012/concurrency.slide#39 using the concepts of concurrent programming in Fluid.

Fix #8338



class TestCSPFramework(unittest.TestCase):
def helper(self, left, right):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function has only one line; why make it a function?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. I am sure that here we should not need to define the helper function.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in latest commit

import paddle.v2.fluid as fluid


class TestCSPFramework(unittest.TestCase):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we make sure that this unit test doesn't break the CI before we finish the implementation of CSP?

Copy link
Author

Choose a reason for hiding this comment

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

Sure, will do.

Copy link
Author

@kavyasrinet kavyasrinet Feb 10, 2018

Choose a reason for hiding this comment

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

@wangkuiyi I made sure that this PR doesn't break the CI. Both TeamCity and Travis pass.

@wangkuiyi wangkuiyi merged commit e0fcaa5 into PaddlePaddle:develop Feb 10, 2018
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