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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]