Skip to content

Commit

Permalink
fix vectorization for preds. dependending on vectorizing loop
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed May 9, 2022
1 parent 000505c commit 688aa94
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions loopy/codegen/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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
Expand Down

0 comments on commit 688aa94

Please sign in to comment.