Skip to content

Conversation

@jwfromm
Copy link
Contributor

@jwfromm jwfromm commented Aug 19, 2022

Currently in tir, using cache_read will rewrite all consumer blocks of the specified buffer in the current scope. However, there may be cases where we want to apply that transformation only to a subset of consumer blocks. In the te version of cache_read, this is explicitly specified through a list of consumer_blocks. This PR extends the tir version of cache_read with an optional consumer_blocks argument. When provided, only blocks listed in consumer_blocks will be rewritten. If not provided, the current behavior of cache_read remains the same.

cc @junrushao1994

@jwfromm jwfromm changed the title [TIR]{Schedule] Support for specific consumer block targeting in cache_read [TIR][Schedule] Support for specific consumer block targeting in cache_read Aug 19, 2022
@jwfromm
Copy link
Contributor Author

jwfromm commented Aug 19, 2022

@vinx13, @tkonolige, @Hzfengsy can you guys give this PR a look?

Copy link
Member

@Hzfengsy Hzfengsy left a comment

Choose a reason for hiding this comment

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

LGTM

@vinx13 vinx13 merged commit 3f56851 into apache:main Aug 22, 2022
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…e_read (apache#12505)

* Add optional consumer blocks to cache_read.

* remove comments

* Fully functional

* Add test for consumer targetting.

* Formatting.

* Add missing parameter comment.

* Fix comments

* Simplify type of consumer_blocks in python.

* Change how consumer_blocks is printed in python.
@jwfromm jwfromm deleted the cache_v2 branch April 12, 2023 15:54
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