diff --git a/loopy/kernel/__init__.py b/loopy/kernel/__init__.py index 084c37b45cc4af25689ae3e121f170382c4e8d16..4e2819a82162b26a8c53dc25b434990473ed2d2c 100644 --- a/loopy/kernel/__init__.py +++ b/loopy/kernel/__init__.py @@ -1474,6 +1474,9 @@ class LoopKernel(ImmutableRecordWithoutPickling): return hash(key_hash.digest()) def __eq__(self, other): + if self is other: + return True + if not isinstance(other, LoopKernel): return False