Lunderberg commented on code in PR #12720:
URL: https://github.com/apache/tvm/pull/12720#discussion_r965015023


##########
tests/python/unittest/test_tir_schedule_transform_layout.py:
##########
@@ -329,5 +329,302 @@ def 
test_transform_block_layout_fail_mixed_iter_type(use_block_name):
         )
 
 
+class BasePaddingCompare(tvm.testing.CompareBeforeAfter):
+    pad_value = tvm.testing.parameter(None)
+
+    transformed_buffer = tvm.testing.parameter("A")
+
+    @pytest.fixture
+    def transform(self, pad_value, transformed_buffer):
+        def transform(mod):
+            sch = tir.Schedule(mod)
+            sch.transform_layout(
+                "block", transformed_buffer, lambda i: [i // 4, i % 4], 
pad_value=pad_value
+            )
+            # sch.transform_block_layout("block", lambda i: [i // 4, i % 4])
+            return sch.mod
+
+        return transform
+
+
+class TestNoPadding(BasePaddingCompare):
+    """Transformations without padding do not depend on pad_value."""
+
+    pad_value = tvm.testing.parameter(None, 42)
+
+    def before():

Review Comment:
   For this specific instance, the test case for non-opaque blocks is lower.  
I've re-ordered these test cases so that the non-opaque block tests occur 
first, and are opaque blocks are the ones called out as being non-standard.
   
   I am in the process of updating all remaining examples in the tests to use 
non-opaque blocks, though I expect some of the updated tests to fail until 
https://github.com/apache/tvm/pull/12724 lands.



-- 
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