Skip to content

Commit 1290f43

Browse files
kaushikcfdinducer
authored andcommitted
Only check for conflicting slabs in the current subknl.
1 parent d6325a8 commit 1290f43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

loopy/codegen/loop.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import islpy as isl
3030
from islpy import dim_type
3131
from pymbolic.mapper.stringifier import PREC_NONE
32+
from pytools import fset_union
3233

3334
from loopy.codegen.control import build_loop_nest
3435
from loopy.codegen.result import CodeGenerationResult, merge_codegen_results
@@ -294,8 +295,11 @@ def set_up_hw_parallel_loops(
294295
else:
295296
raise RuntimeError("unexpected hw tag type")
296297

298+
inames_in_subkernel = fset_union(
299+
kernel.id_to_insn[insn_id].within_inames
300+
for insn_id in insn_ids_for_block)
297301
other_inames_with_same_tag = [
298-
other_iname for other_iname in kernel.all_inames()
302+
other_iname for other_iname in inames_in_subkernel
299303
if (kernel.iname_tags_of_type(other_iname, UniqueInameTag)
300304
and other_iname != iname
301305
and any(_tag.key == tag.key

0 commit comments

Comments
 (0)