echuraev commented on code in PR #12926:
URL: https://github.com/apache/tvm/pull/12926#discussion_r982600356


##########
tests/python/unittest/test_transform_layout.py:
##########
@@ -575,5 +575,18 @@ def test_size_one_buffer(shape, transform):
     s[B].transform_layout(transform)
 
 
+def test_non_divisible_transform_raises_error():
+    A = te.placeholder([1, 3, 8, 8])
+    B = te.compute(A.shape, lambda *indices: A[indices])
+    s = te.create_schedule(B.op)
+
+    transform = lambda n, c, h, w: [n, c // 4, h, w, c % 4]
+    # Error occurs here, because the transformation would introduce
+    # padding.  Padded transforms are supported in TIR-based
+    # schedules.
+    with pytest.raises(tvm.TVMError):
+        s[B].transform_layout(transform)
+
+

Review Comment:
   nit: Probably we can joint this test case with `test_size_one_buffer`? Just 
extend its testing parameters



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