Lunderberg commented on code in PR #12720:
URL: https://github.com/apache/tvm/pull/12720#discussion_r973381556
##########
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:
Forgot to mark this conversation as resolved earlier.
--
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]