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 Infinite Loop in constant folding #2119

Merged

Conversation

ilyasher
Copy link
Contributor

@ilyasher ilyasher commented Feb 15, 2023

This commit fixes a bug in the function compute_const_folding_using_tf where an already-folded StridedSlice node could set the 'update' flag to True, causing an infinite loop.

A regression test was also added. The test checks for the infinite loop by setting a timeout using the timeout-decorator module from pypi.

This should fix issues #2068 and #1965 .

@ilyasher ilyasher force-pushed the dev-ilyasher-constant-folding-infinite-loop branch 3 times, most recently from 75ff402 to 06d2b24 Compare February 15, 2023 02:34
This commit fixes a bug in the function compute_const_folding_using_tf
where an already-folded StridedSlice node could set the 'update'
flag to True, causing an infinite loop.

A regression test was also added. The test checks for the infinite loop
by setting a timeout using the timeout-decorator module from pypi.

Signed-off-by: Ilya Sherstyuk <isherstyuk@nvidia.com>
@ilyasher ilyasher force-pushed the dev-ilyasher-constant-folding-infinite-loop branch from 06d2b24 to 2014b6e Compare February 15, 2023 18:38
@ilyasher
Copy link
Contributor Author

@fatcat-z Could you please review when you get the chance? Thanks!

Copy link
Collaborator

@fatcat-z fatcat-z left a comment

Choose a reason for hiding this comment

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

Thanks for your contributions, this looks good to me!

@fatcat-z fatcat-z merged commit ff139a4 into onnx:main Feb 18, 2023
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