From 688aa94ed4278294c24481fd16d3092092fad363 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Sat, 7 May 2022 17:44:59 -0500 Subject: [PATCH] fix vectorization for preds. dependending on vectorizing loop --- loopy/codegen/instruction.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/loopy/codegen/instruction.py b/loopy/codegen/instruction.py index 383988863..f3b9793b3 100644 --- a/loopy/codegen/instruction.py +++ b/loopy/codegen/instruction.py @@ -114,6 +114,7 @@ def generate_assignment_instruction_code(codegen_state, insn): # {{{ vectorization handling if codegen_state.vectorization_info: + from loopy.symbolic import get_dependencies if insn.atomicity: raise UnvectorizableError("atomic operation") @@ -134,6 +135,13 @@ def generate_assignment_instruction_code(codegen_state, insn): raise UnvectorizableError( "LHS is vector, RHS is not vector, cannot assign") + if codegen_state.vectorization_info.iname in get_dependencies( + tuple(insn.predicates)): + raise NotImplementedError("https://github.com/inducer/loopy/issues/615") + raise UnvectorizableError( + "Instruction contains a predicate depending on the vectorized" + " loop.") + is_vector = lhs_is_vector del lhs_is_vector