Skip to content

Fixed removePhaseSwitches in tf_graph_simplifier#24275

Merged
asmorkalov merged 1 commit intoopencv:4.xfrom
alexlyulkov:al/fix-tf-graph-simplifier
Sep 18, 2023
Merged

Fixed removePhaseSwitches in tf_graph_simplifier#24275
asmorkalov merged 1 commit intoopencv:4.xfrom
alexlyulkov:al/fix-tf-graph-simplifier

Conversation

@alexlyulkov
Copy link
Copy Markdown
Contributor

@alexlyulkov alexlyulkov commented Sep 15, 2023

Fixed removePhaseSwitches algorithm in tf_graph_simplifier.

The algorithm finds some specific nodes that should be removed. These nodes have input nodes which probably become useless. So there is a BFS-like algorithm that removes all these nodes. It has numConsumers map that keeps the current number of outputs for each node. The algorithm decreases some numComsumers values after each node deleting, but there is a mistake in this operation.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=56435

@asmorkalov asmorkalov added this to the 4.9.0 milestone Sep 18, 2023
@asmorkalov asmorkalov merged commit 157b0e7 into opencv:4.x Sep 18, 2023
@asmorkalov asmorkalov mentioned this pull request Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants