loopy icon indicating copy to clipboard operation
loopy copied to clipboard

repr(a) == repr(b) should imply a == b

Open isuruf opened this issue 3 years ago • 2 comments

Currently it is not for TemporaryVariable ~~and Kernel~~

isuruf avatar Aug 31 '22 20:08 isuruf

What specifically is missing? Do you have an example or an idea what __repr__ should be doing that it currently isn't?

inducer avatar Aug 31 '22 20:08 inducer

For eg: base_indices is missing from TemporaryVariable's __repr__. There is a bug in privatize_temporaries_with_inames at https://github.com/inducer/loopy/blob/main/loopy/transform/privatize.py#L211 where base_indices is not fixed. I was comparing two TemporaryVariable instances where base_indices was the only difference, but repr on both gave the same string.

isuruf avatar Aug 31 '22 20:08 isuruf