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

Support copy in Fluid channels #9138

Merged
merged 2 commits into from
Mar 19, 2018

Conversation

abhinavarora
Copy link
Contributor

Fixes #9085

@abhinavarora abhinavarora self-assigned this Mar 15, 2018
@abhinavarora abhinavarora added this to To Do in Concurrent Programming in Fluid via automation Mar 15, 2018
@abhinavarora abhinavarora moved this from To Do to In progress in Concurrent Programming in Fluid Mar 15, 2018
cs2be
cs2be previously approved these changes Mar 15, 2018
capacity=value.capacity)

assign_op = channel_send_block.append_op(
type="assign_op", inputs={"X": value, }, outputs={"Out": copied_X})
Copy link
Contributor

Choose a reason for hiding this comment

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

although this is valid python syntax, I'm wondering if we can remove the extra "," after value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -141,6 +141,8 @@ def channel_send(channel, value):
channel (Variable|Channel): Channel variable created using
`make_channel`.
value (Variable): Value to send to channel
copy (bool): Copy data while channel send. If False, then data
is moved. The input cannot be used after move.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the default value of copy at the end of line145.
Maybe replacing copy with copy_mode is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I just realized that I missed your comment and merged the PR. I agree with you. Let me correct it and send you the review separately.

Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't matter, the current scenario for using channel is still less.

@abhinavarora abhinavarora merged commit 35c373d into PaddlePaddle:develop Mar 19, 2018
Concurrent Programming in Fluid automation moved this from In progress to Done Mar 19, 2018
@abhinavarora abhinavarora deleted the copy_channel branch March 19, 2018 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants