qsqqsqqsq opened a new pull request #10340:
URL: https://github.com/apache/tvm/pull/10340


   Currently LoopPartition has a limitation that the intersection of all 
conditions on var can not be none. In fact we can partition the loop when the 
intersection of all conditions on var is none in some cases.  For example:
   ```python
   @T.prim_func
   def concat_func(
       placeholder: T.Buffer[(1, 64, 28, 28), "int8"],
       placeholder_1: T.Buffer[(1, 32, 28, 28), "int8"],
       placeholder_2: T.Buffer[(1, 32, 28, 28), "int8"],
       T_concat: T.Buffer[(1, 128, 28, 28), "int8"],
   ) -> None:
       for i1 in T.serial(128, annotations={"pragma_loop_partition_hint": 1}):
           for i2, i3 in T.grid(28, 28):
               if 96 <= i1:
                   T.store(
                       T_concat.data,
                       i1 * 784 + i2 * 28 + i3,
                       T.load("int8", placeholder_2.data, i1 * 784 + i2 * 28 + 
i3 - 75264),
                       True,
                   )
               if 64 <= i1 and i1 < 96:
                   T.store(
                       T_concat.data,
                       i1 * 784 + i2 * 28 + i3,
                       T.load("int8", placeholder_1.data, i1 * 784 + i2 * 28 + 
i3 - 50176),
                       True,
                   )
               if i1 < 64:
                   T.store(
                       T_concat.data,
                       i1 * 784 + i2 * 28 + i3,
                       T.load("int8", placeholder.data, i1 * 784 + i2 * 28 + 
i3),
                       True,
                   )
   ```
   This PR relax this restriction so that we can continue to try partition if  
the intersection of only part of the conditions is not none.
   


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