-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Conversation
@@ -1419,6 +1421,11 @@ def __dfs_travel__(layer, | |||
:type layer: LayerOutput | |||
:return: | |||
""" | |||
if layer in traveled: |
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.
seems this bug has no relation with v2 api?
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.
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.
4dfc779
to
313e9f5
Compare
@@ -0,0 +1,497 @@ | |||
type: "nn" |
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.
will this file be used any where?
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.
LGTM!
node which travelled, and if the topology has a recursive dependency,
there are some nodes will be travelled multiple times.
travelled
set to record which node is travelled.