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

[TIR] Bugfix in StorageFlatten, index flattening in PrefetchNode #10657

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

Lunderberg
Copy link
Contributor

This resolves a bug introduced in #9727, and adds a test to catch this failure mode. This bug occurred because StorageFlatten's visitor for PrefetchNode inserted additional pre-flattened BufferLoad nodes after visiting the body of the Prefetch, preventing those BufferLoad nodes from being flattened. Moving this visit to after the insertion of the BufferLoad nodes allows the usual buffer flattening to apply to the newly inserted nodes.

This resolves a bug introduced in
apache#9727, and adds a test to catch this
failure mode.  This bug occurred because StorageFlatten's visitor for
PrefetchNode inserted additional pre-flattened `BufferLoad` nodes
after visiting the body of the Prefetch, preventing those `BufferLoad`
nodes from being flattened.  Moving this visit to after the insertion
of the `BufferLoad` nodes allows the usual buffer flattening to apply
to the newly inserted nodes.
@Lunderberg
Copy link
Contributor Author

@masahi

@masahi masahi merged commit 46ac3d5 into apache:main Mar 17, 2022
@Lunderberg Lunderberg deleted the storage_flatten_prefetch branch March 18, 2022 13:36
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…che#10657)

This resolves a bug introduced in
apache#9727, and adds a test to catch this
failure mode.  This bug occurred because StorageFlatten's visitor for
PrefetchNode inserted additional pre-flattened `BufferLoad` nodes
after visiting the body of the Prefetch, preventing those `BufferLoad`
nodes from being flattened.  Moving this visit to after the insertion
of the `BufferLoad` nodes allows the usual buffer flattening to apply
to the newly inserted nodes.
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