You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/12 16:22:57 UTC

[GitHub] [tvm] wrongtest opened a new pull request #10232: [Arith] Simplify floordiv(x*8+7, 16) to floordiv(x, 2)

wrongtest opened a new pull request #10232:
URL: https://github.com/apache/tvm/pull/10232


   Hi, the PR add a simplify rule to allow patterns like floordiv(x*8+7, 16) => floordiv(x, 2). 
   
   We find the issue when using compute_at to `repeat` op:
   ```python
   T_add = T.alloc_buffer([4], dtype="float32")
       for i0 in T.serial(4):
           with T.block("T_add"):
               ax0 = T.axis.spatial(4, i0)
               T_add[ax0] = x[ax0] + 1.0
       for i0_0, i0_1 in T.grid(8, 8):
           with T.block("T_repeat"):
               ax0 = T.axis.spatial(64, i0_0 * 8 + i0_1)
               T_repeat[ax0] = T_add[ax0 // 16]
   ```
    compute_at(`T_add` , `i0_0`) currently will result to a "dynamic" extent `floordiv(x*8 + 7, 16) - floordiv(x, 2) + 1`.
   
   
   
   
   Also fix a typo of previous compute at testcase.
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] kparzysz-quic merged pull request #10232: [Arith] Simplify floordiv(x*8+7, 16) to floordiv(x, 2)

Posted by GitBox <gi...@apache.org>.
kparzysz-quic merged pull request #10232:
URL: https://github.com/apache/tvm/pull/10232


   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org