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

Fix slow parsing a recursive depends topology #2802

Merged
merged 1 commit into from
Jul 11, 2017

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Jul 11, 2017

@reyoung reyoung requested a review from jacquesqiao July 11, 2017 04:58
@@ -1419,6 +1421,11 @@ def __dfs_travel__(layer,
:type layer: LayerOutput
:return:
"""
if layer in traveled:
Copy link
Member

@jacquesqiao jacquesqiao Jul 11, 2017

Choose a reason for hiding this comment

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

seems this bug has no relation with v2 api?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep.

* Fix  PaddlePaddle#2797
* It because trainer_config_helpers' __dfs_travel__ did not record the
  node which travelled, and if the topology has a recursive dependency,
  there are some nodes will be travelled multiple times.
* Add a `travelled` set to record which node is travelled.
* Also add a unittest for this situation.
@@ -0,0 +1,497 @@
type: "nn"
Copy link
Member

Choose a reason for hiding this comment

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

will this file be used any where?

Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants