You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sparse Iteration Lowering pass would not create inherit block iter_vars from outer blocks. This is okay but does not follow the design principle of TensorIR that blocks should be pluggable (if we do not inherit outer block iter_vars, then this block relies on its context and cannot be compute_at to an arbitrary block).
# lowered nested block structure in previous design, we can use `vi` inside "inner" block, however, we cannot `compute_at` "inner" outside "outer" because information regarding "vi" is lost.foriinrange(20):
withblock("outer"):
vi=T.axis.spatial(i, 20)
forjinrange(indptr[i+1] -indptr[i]):
withblock("inner"):
vj=T.axis.spatial(j, 10)
...
# inherit `vi` from "outer" block in inner block, we can `compute_at` "inner" block outside "outer" and `vi_1` would be re-bound to other iter values.foriinrange(20):
withblock("outer"):
vi=T.axis.spatial(i, 20)
forjinrange(indptr[i+1] -indptr[i]):
withblock("inner"):
vi_1=T.axis.spatial(vi, 20)
vj=T.axis.spatial(j, 10)
...
This design also results in bugs such as #60 : if we carry all outer block iter_vars, we do not need to consider iter_vars in outer blocks in cache read/write.
Milestone
Fix the behavior of sparse iteration lowering to inherit iter_var from outer blocks.
Checks whether examples would break or not.
The text was updated successfully, but these errors were encountered:
Pitch
Sparse Iteration Lowering pass would not create inherit block
iter_vars
from outer blocks. This is okay but does not follow the design principle of TensorIR that blocks should be pluggable (if we do not inherit outer block iter_vars, then this block relies on its context and cannot becompute_at
to an arbitrary block).This design also results in bugs such as #60 : if we carry all outer block iter_vars, we do not need to consider iter_vars in outer blocks in cache read/write.
Milestone
The text was updated successfully, but these errors were encountered: