Skip to content

Conversation

@jiweibo
Copy link
Contributor

@jiweibo jiweibo commented Aug 25, 2021

PR types

Others

PR changes

Others

Describe

子图检测算法是贪心的,对于遍历到的每一个节点,都会通过union find算法,找出能划分到同一个子图的其它节点;正因为贪心性质,当遍历顺序无法保证时,就无法保证检测出的子图稳定性。

unorderd_map内部可能会rehash,使得顺序无法保证,此处更换为map,保证子图稳定性。

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@jiweibo jiweibo changed the title reuse from unordered_map to map to support subgraph stability [Inference] Replace unordered_map with map to support subgraph stability Aug 25, 2021
Copy link
Contributor

@winter-wang winter-wang left a comment

Choose a reason for hiding this comment

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

LGTM

@jiweibo jiweibo merged commit a1aae04 into PaddlePaddle:develop Aug 26, 2021
@jiweibo jiweibo deleted the subgraph_stability branch August 26, 2021 03:30
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