vinx13 commented on a change in pull request #9620:
URL: https://github.com/apache/tvm/pull/9620#discussion_r764270200
##########
File path: tests/python/unittest/test_tvmscript_syntax_sugar.py
##########
@@ -62,5 +63,43 @@ def test_reads_writes_syntax_sugar():
assert_structural_equal(transformed_matmul_no_syntax_sugar,
transformed_matmul_syntax_sugar)
[email protected]_func
+def loop_no_syntax_sugar(a: T.handle) -> None:
+ A = T.match_buffer(a, (128, 128, 128, 128))
+ for i in T.serial(0, 128):
+ for j in T.parallel(0, 128):
+ for k in T.vectorized(0, 128):
+ for x in T.unroll(0, 128):
+ for y in T.thread_binding(0, 128, thread="threadIdx.x"):
+ for z in T.thread_binding(0, 128,
thread="threadIdx.x"):
+ A[i, j, k, x] = A[i, j, k, x] * 2.0
+
+
[email protected]_func
+def loop_syntax_sugar(a: T.handle) -> None:
+ A = T.match_buffer(a, (128, 128, 128, 128))
+ for i in T.serial(128):
+ for j in T.parallel(128):
+ for k in T.vectorized(128):
+ for x in T.unroll(128):
+ for y in T.thread_binding(128, "threadIdx.x"):
+ for z in T.thread_binding(128, thread="threadIdx.x"):
+ A[i, j, k, x] = A[i, j, k, x] * 2.0
+
+
+def loop_syntax_sugar_fail(a: T.handle) -> None:
Review comment:
decorator is still missing for this one, it is important to make sure
the test case passes locally
--
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]