Lunderberg commented on a change in pull request #10538:
URL: https://github.com/apache/tvm/pull/10538#discussion_r827048089



##########
File path: python/tvm/tir/schedule/schedule.py
##########
@@ -2111,6 +2112,82 @@ def after_unannotate(a: T.handle, b: T.handle) -> None:
             self, block_or_loop, ann_key
         )
 
+    ########## Schedule: Layout transformation ##########
+
+    @type_checked
+    def transform_layout(
+        self,
+        block: BlockRV,

Review comment:
       Is there an advantage to passing in `block`, `buffer_index`, and 
`is_write_index` rather than passing in the buffer to be transformed?  Since 
all use of the buffer need to be updated, not just those within the specified 
`block`, it looks like these three parameters are only used to identify the 
buffer to be transformed.

##########
File path: python/tvm/tir/schedule/schedule.py
##########
@@ -2111,6 +2112,82 @@ def after_unannotate(a: T.handle, b: T.handle) -> None:
             self, block_or_loop, ann_key
         )
 
+    ########## Schedule: Layout transformation ##########
+
+    @type_checked
+    def transform_layout(
+        self,
+        block: BlockRV,
+        buffer_index: int,
+        is_write_index: bool,

Review comment:
       If there is an advantage to keeping the three parameters to identify the 
buffer, can `is_write_index` be a `enum.Enum`?  From a readability perspective, 
seeing the argument `BufferType.Read` at the callsite would be much easier to 
interpret than `False`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to