Skip to content

Conversation

qingqing01
Copy link
Contributor

Related to #9656

@qingqing01 qingqing01 requested review from panyx0718 and reyoung April 8, 2018 07:26
panyx0718
panyx0718 previously approved these changes Apr 8, 2018
num_threads=None,
allow_op_delay=False):
allow_op_delay=False,
share_vars_from=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

need comments and small examples for constructor

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.

main = main if main else framework.default_main_program()
scope = executor.global_scope()

local_scopes = share_vars_from.executor.local_scopes(
Copy link
Contributor

Choose a reason for hiding this comment

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

check share_vars_from type

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.

local_scopes = share_vars_from.executor.local_scopes(
) if share_vars_from else []

vars = [
Copy link
Contributor

Choose a reason for hiding this comment

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

call it persistable_vars? Does this include all vars needed? Or maybe it includes more vars than necessary? We can leave a TODO here so that we can have the right var collection here in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe it includes more vars than necessary

Now, this case is existing. The C++ code filters the non LoDTensor.

Copy link
Contributor Author

@qingqing01 qingqing01 left a comment

Choose a reason for hiding this comment

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

@panyx0718 Thanks. Could I merge this PR? So other people can use this function. Your comments can be fixed in next PR.

local_scopes = share_vars_from.executor.local_scopes(
) if share_vars_from else []

vars = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or maybe it includes more vars than necessary

Now, this case is existing. The C++ code filters the non LoDTensor.

panyx0718
panyx0718 previously approved these changes Apr 8, 2018
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.

LGTM

@qingqing01 qingqing01 merged commit 2b7e5bd into PaddlePaddle:develop Apr 9, 2018
@qingqing01 qingqing01 deleted the parallel_exe2 branch November 14, 2019 05:25
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