wrongtest-intellif opened a new pull request, #18406:
URL: https://github.com/apache/tvm/pull/18406

   This change just keep stride terms order the same with fused loop order in 
`fuse` primitive. In symbolic circumstances, previous form suffer from 
simplification issues and would make the expression tree much complex in 
following lowering steps.
   
   Take [M, N] tiling as an example, the previous binding form after
   ```python
   i, j = sch.get_loops(block_b)
   i0, i1 = sch.split(i, factors=[None, 64])
   j0, j1 = sch.split(j, factors=[None, 16])
   sch.reorder(i0, j0, i1, j1)
   sch.fuse(i0, j0)
   ```
   
   would be like (i_0_j_0_fused in `[0, ceildiv(M, 64) * ceildiv(N, 16)]`
   ```
   vi = T.axis.spatial(M, i_0_j_0_fused % ((N + 15) // 16 * ((M + 63) // 64)) 
// ((N + 15) // 16) * 64 + i_1)
   ```
   instead of more simple version
   ```
   vi = T.axis.spatial(M, i_0_j_0_fused // ((N + 15) // 16) * 64 + i_1)
   ```
   This is because unfortunately we do not know `ceildiv(N, 16) * ceildiv(M, 
64) == ceildiv(M, 64) * ceildiv(N, 16)` in rule based simplifications. And then 
certain analysis (for example, region estimation) may fail to give concise 
estimations, due to complex dynamic expression trees.


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