Skip to content

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