Skip to content

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.

@jwfromm jwfromm requested review from mbrookhart and tmoreau89 April 1, 2021 00:45
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 tmoreau89 merged commit 91311b3 into apache:main Apr 4, 2021
@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