giuseros commented on a change in pull request #6823:
URL: https://github.com/apache/incubator-tvm/pull/6823#discussion_r516980104



##########
File path: tests/python/unittest/test_tir_transform_loop_partition.py
##########
@@ -66,6 +66,29 @@ def test_const_loop():
     assert not any(collect_visit(stmt, lambda x: isinstance(x, 
tvm.tir.IfThenElse)))
 
 
+def test_no_unroll_loop():
+    n = 21
+    A = te.placeholder((n,), name="A")
+    B = te.placeholder((n,), name="B")
+
+    T = te.compute((n,), lambda i: A[i] + B[i])
+    s = te.create_schedule(T.op)
+    xo, xi = s[T].split(T.op.axis[0], factor=4)
+
+    bounds = tvm.te.schedule.InferBound(s)
+    stmt = tvm.te.schedule.ScheduleOps(s, bounds)
+
+    mod = tvm.IRModule.from_expr(tvm.tir.PrimFunc([], stmt))
+    with tvm.transform.PassContext(
+        config={"tir.LoopPartition": {"partition_const_loop": True, "unroll": 
False}}

Review comment:
       Could we be more specific than "unroll"? Something like 
"simplify_loops"? With "unroll" it seems like we unroll or not all  the loops




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

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


Reply via email to