From 515d6f800f70f6c2427964c8fd1e86c9b730d0dd Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 29 Mar 2017 15:34:49 -0500 Subject: [PATCH] Fix update_persistent_hash for CallInstruction with predicates (Closes #58 on gitlab) --- loopy/kernel/instruction.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/loopy/kernel/instruction.py b/loopy/kernel/instruction.py index dfa1df18f..0d22dbb88 100644 --- a/loopy/kernel/instruction.py +++ b/loopy/kernel/instruction.py @@ -999,6 +999,11 @@ class CallInstruction(MultiAssignmentBase): if field_name in ["assignees", "expression"]: key_builder.update_for_pymbolic_expression( key_hash, getattr(self, field_name)) + elif field_name == "predicates": + preds = sorted(self.predicates, key=str) + for pred in preds: + key_builder.update_for_pymbolic_expression( + key_hash, pred) else: key_builder.rec(key_hash, getattr(self, field_name)) -- GitLab