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/07/19 19:46:47 UTC

[GitHub] [tvm] tkonolige opened a new issue, #12139: [Bug] Metaschedule flop estimation cannot handle non-integer loop dimensions

tkonolige opened a new issue, #12139:
URL: https://github.com/apache/tvm/issues/12139

   Metaschedule does not handle non-integer loop extents. This problem is specific to metaschedule as auto_scheduler handles non-integer loop extents. This failure happens with extents that can be simplified to a constant (`4+4`) as well as with extents that are variable in size (`i+4`). I think the solution would be to use an `arith::Analyzer` as auto_schedule does. Or to just use auto_scheduler's flop estimation.
   
   ```python
   from tvm.ir import IRModule
   from tvm.meta_schedule.testing.te_workload import create_te_workload
   from tvm.script import tir as T
   from tvm.tir.analysis import estimate_tir_flops
   
   
   @T.prim_func
   def flops_with_nonint_extent(a: T.Buffer[16, "float32"]):
       for i in range(4 + 4):
           a[i] = a[i]
   
   
   def test_flops_with_nonint_extent():
       estimate_tir_flops(IRModule({"main": flops_with_nonint_extent}))
   
   
   @T.prim_func
   def flops_with_variable_extent(a: T.Buffer[16, "float32"]):
       for i in range(4 + 4):
           for j in range(i + 8):
               a[j] = a[i]
   
   
   def test_flops_with_variable_extent():
       estimate_tir_flops(IRModule({"main": flops_with_variable_extent}))
   
   
   if __name__ == "__main__":
       test_flops_with_nonint_extent()
       test_flops_with_variable_extent()
   ```
   
   @junrushao1994 @jwfromm


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

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


Re: [I] [Bug] Metaschedule flop estimation cannot handle non-integer loop dimensions [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #12139: [Bug] Metaschedule flop estimation cannot handle non-integer loop dimensions
URL: https://github.com/apache/tvm/issues/12139


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