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

   Thanks for participating in the TVM community! We use https://discuss.tvm.ai 
for any general usage questions and discussions. The issue tracker is used for 
actionable items such as feature proposals discussion, roadmaps, and bug 
tracking.  You are always welcomed to post on the forum first :smile_cat:
   
   Issues that are inactive for a period of time may get closed. We adopt this 
policy so that we won't lose track of actionable issues that may fall at the 
bottom of the pile. Feel free to reopen a new one if you feel there is an 
additional problem that needs attention when an old one gets closed.
   
   ### Expected behavior
   Splitting loops over multiple compute units(Cores) parallel.
   
   ### Actual behavior
   
   Error message: The queried subtree root tir.For#0 in SRef tree does not have 
compact dataflow, because its child block tir.Block#1 on SRef tree is neither a 
local complete block nor a local reduction block.
   
   ### Environment
   
   tvm - 0.9.dev0
   
   ### Steps to reproduce
   
   @tvm.script.ir_module
   class Convolution:
       @T.prim_func
       def main(inpt: T.handle, kernl: T.handle, reslt: T.handle):
           T.func_attr({"global_symbol": "main", "tir.noalias": True})
   
           input = T.match_buffer(inpt, (10, 3, 128, 128),  "float32")
           kernel = T.match_buffer(kernl, (2, 3, 3, 3), "float32")
           result = T.match_buffer(reslt, (10, 2, 124, 124), "float32")
           result_compute = T.match_buffer(reslt, (10, 2, 124, 124), "float32")
   
           for b, o, h, w in T.grid(10, 2, 124, 124):
               for kc, kh, kw in T.grid(3, 3, 3):
                   with T.block("compute"):
                       b, o, h, w, kc, kh, kw = T.axis.remap("RRRRRRR", [b, o, 
h, w, kc, kh, kw])
                       result_compute[b, o, h, w] += input[b, kc, h+kh, w+kw] * 
kernel[o, kc, kh, kw]
   
           for b, o, h, w in T.grid(10, 2, 124, 124):
               with T.block("result"):
                  vb = T.axis.reduce(10, b)
                  vc_o = T.axis.reduce(2, o)
                  vh = T.axis.reduce(124, h)
                  vw = T.axis.reduce(124, w)
                  result[vb, vc_o, vh, vw] = result_compute[vb, vc_o, vh, vw]
   
   
   written_ir = Convolution
   sch = tvm.tir.Schedule(written_ir)
   
   b_i, o_i, h_i, w_I, kc_i, kh_i, kw_i = 
sch.get_loops(sch.get_block("compute"))
   sch.parallel(b_i)
   
   Best regards
   


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