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

[Relay]Frontend][Onnx] Remove pop that interferes with nested loops. #7781

Merged
merged 3 commits into from
Apr 4, 2021

Conversation

jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Apr 1, 2021

PR #7699 introduced a check for user provided shapes that arent found in the input graph. My implementation used pop, which it turns out can cause issues in nested loops. Unfortunately, its difficult to write a test case that triggers this error, but we should avoid pop in general. This PR replaces the pop based approach with a much safer way to check the same condition.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

LGTM

@tmoreau89
Copy link
Contributor

Looks like the assertion that you modified is breaking CI: https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-7781/1/pipeline @jwfromm

@jwfromm
Copy link
Contributor Author

jwfromm commented Apr 1, 2021

@tmoreau89 yeah that new assert actually triggers for inner nested loops. I've changed it to only check in the outermost scope of the model which should be the sweet spot.

@tmoreau89
Copy link
Contributor

Thank you @jwfromm @mbrookhart the PR has been merged.

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…pache#7781)

* Remove popping that interferes with nested loops.

* Only check user inputs in the outer-most graph scope.

* Fix style.

Co-authored-by: Ubuntu <jwfromm@jwfromm-cpu-dev.itxhlkosmouevgkdrmwxfbs5qh.xx.internal.cloudapp.net>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…pache#7781)

* Remove popping that interferes with nested loops.

* Only check user inputs in the outer-most graph scope.

* Fix style.

Co-authored-by: Ubuntu <jwfromm@jwfromm-cpu-dev.itxhlkosmouevgkdrmwxfbs5qh.xx.internal.cloudapp.net>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
…pache#7781)

* Remove popping that interferes with nested loops.

* Only check user inputs in the outer-most graph scope.

* Fix style.

Co-authored-by: Ubuntu <jwfromm@jwfromm-cpu-dev.itxhlkosmouevgkdrmwxfbs5qh.xx.internal.cloudapp.net>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
…pache#7781)

* Remove popping that interferes with nested loops.

* Only check user inputs in the outer-most graph scope.

* Fix style.

Co-authored-by: Ubuntu <jwfromm@jwfromm-cpu-dev.itxhlkosmouevgkdrmwxfbs5qh.xx.internal.cloudapp.net>
@jwfromm jwfromm deleted the pop_bad branch April 12, 2023 15:56
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.

3 participants