diff --git a/pyop2/global_kernel.py b/pyop2/global_kernel.py index 187a89eaf..a097f6447 100644 --- a/pyop2/global_kernel.py +++ b/pyop2/global_kernel.py @@ -383,7 +383,6 @@ def code_to_compile(self): "Vectorization strategy" f" '{configuration['vectorization_strategy']}'") - print(wrapper) code = lp.generate_code_v2(wrapper) if self.local_kernel.cpp: @@ -416,6 +415,17 @@ def vectorise(self, wrapper, iname, batch_size): kernel = wrapper.default_entrypoint + # {{{ get rid of noop insns + + from loopy.match import Id, Or + + noop_insn_ids = [Id(insn.id) + for insn in kernel.instructions + if isinstance(insn, lp.NoOpInstruction)] + kernel = lp.remove_instructions(kernel, Or(tuple(noop_insn_ids))) + + # }}} + # align temps alignment = configuration["alignment"] tmps = {name: tv.copy(alignment=alignment)