@@ -306,9 +306,13 @@ def process(self, clusters):
306306 def callback (self , clusters , prefix , xtracted = None ):
307307 if not prefix :
308308 return clusters
309+
309310 p = prefix [- 1 ]
310311 d = p .dim
311312
313+ if d .is_Virtual :
314+ return clusters
315+
312316 # Rule out extractions that would break data dependencies
313317 exclude = set ().union (* [c .scope .writes for c in clusters ])
314318
@@ -340,7 +344,7 @@ def _lookup_key(self, c, d):
340344 intervals = c .ispace .intervals .drop (d ).reset ()
341345 properties = frozendict ({d : relax_properties (v ) for d , v in c .properties .items ()})
342346
343- return AliasKey (ispace , intervals , c .dtype , c .guards , properties )
347+ return AliasKey (ispace , intervals , c .dtype , c .guards , properties , c . syncs )
344348
345349 def _select (self , variants ):
346350 return pick_best (variants )
@@ -441,7 +445,7 @@ def _generate(self, cgroup, exclude):
441445 yield self ._do_generate (exprs , exclude , cbk_search , self ._cbk_compose )
442446
443447 def _lookup_key (self , c ):
444- return AliasKey (c .ispace , None , c .dtype , c .guards , c .properties )
448+ return AliasKey (c .ispace , None , c .dtype , c .guards , c .properties , c . syncs )
445449
446450 def _select (self , variants ):
447451 if isinstance (self .opt_schedule_strategy , int ):
@@ -1050,7 +1054,9 @@ def lower_schedule(schedule, meta, sregistry, opt_ftemps, opt_min_dtype, opt_min
10501054 properties [Hyperplane (writeto .itdims )] = {SEPARABLE }
10511055
10521056 # Finally, build the alias Cluster
1053- clusters .append (Cluster (expression , ispace , guards , properties ))
1057+ clusters .append (
1058+ Cluster (expression , ispace , guards , properties , meta .syncs )
1059+ )
10541060
10551061 return clusters , subs
10561062
@@ -1392,7 +1398,7 @@ def _pivot_legal_shifts(self):
13921398 return ret
13931399
13941400
1395- AliasKey = namedtuple ('AliasKey' , 'ispace intervals dtype guards properties' )
1401+ AliasKey = namedtuple ('AliasKey' , 'ispace intervals dtype guards properties syncs ' )
13961402Variant = namedtuple ('Variant' , 'schedule exprs' )
13971403
13981404
0 commit comments