@@ -413,18 +413,19 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
413413
414414    //  check if loop body contains a "pure" buffer store (i.e., direct
415415    //  assignment, not compound update)
416-     std::vector<Buffer> store_shared_global_buffers, store_fragment_buffers, store_buffers;  
416+     std::vector<Buffer> store_shared_global_buffers, store_fragment_buffers; 
417417    //  Buffers that scope is above fragments.
418418    //  global, shared, shared.dyn
419419    //  which can be used to analysis replicate case
420420    PostOrderVisit (root_, [&](const  ObjectRef &obj) {
421421      if  (const  auto  *store = obj.as <BufferStoreNode>()) {
422422        auto  buffer = store->buffer ;
423-         if  (buffer.scope () == " shared" scope () == " shared.dyn" scope () == " global" 
423+         if  (buffer.scope () == " shared" scope () == " shared.dyn" 
424+             buffer.scope () == " global" 
424425          store_shared_global_buffers.emplace_back (buffer);
425-         } else  if  (buffer.scope () == " local.fragment" 
426+         } else  if  (buffer.scope () == " local.fragment"  { 
426427          store_fragment_buffers.emplace_back (buffer);
427-         store_buffers. emplace_back (buffer); 
428+         } 
428429      }
429430    });
430431
@@ -491,14 +492,18 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
491492    //  2) The loop layout replicate extent is greater than 1, inferred from the
492493    //     thread bounds captured in the layout.
493494
494-     [this , &store_shared_global_buffers, &store_fragment_buffers, &has_cross_thread_access, &T](){
495-       if  (is_one (loop_layout_->ReplicateExtent ())) return ;
496-       if  (!has_cross_thread_access) return ;
495+     [this , &store_shared_global_buffers, &store_fragment_buffers,
496+      &has_cross_thread_access, &T]() {
497+       if  (is_one (loop_layout_->ReplicateExtent ()))
498+         return ;
499+       if  (!has_cross_thread_access)
500+         return ;
497501
498502      if  (!store_fragment_buffers.empty ()) {
499503        ICHECK (store_shared_global_buffers.empty ())
500-             << " Invalid layout: cannot have both fragment and shared store buffers " 
501-               " in replicated loop layout." 
504+             << " Invalid layout: cannot have both fragment and shared store " 
505+                " buffers " 
506+                " in replicated loop layout." 
502507        return ;
503508      } else  {
504509        //  Now, store is global or shared
0 commit comments