You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm banging my head against the wall trying to figure out why the second memref.load and memref.store in this IR aren't rewritten to their affine counterpart when running Polygeist's affine-cfg pass. AFAIK, this should be possible?
In the code, the pass fails at isValidIndex which is called from here. Could this perhaps be fixed by adding another recursive check for delinearize_index in that function?
When I leave the delinearize_index out (it's a no-op anyway in this case) the memory operations do get raised.
I tried further reducing this example but below IR does work as expected, so it's not only the presence of delinearize_index that's problematic.
I hope I'm not missing anything too obvious, looking forward to hear if this can be fixed. If you point me to where the change needs to happen, I'll gladly create a PR :).
Jules
The text was updated successfully, but these errors were encountered:
jumerckx
changed the title
MoveLoadToAffine in affine-cfg doesn't work for delinearized index.MoveLoadToAffine in affine-cfg doesn't work for affine maps of indices?
Nov 30, 2023
edit: I added a smaller MWE in the comment below.
Hi,
I'm banging my head against the wall trying to figure out why the second
memref.load
andmemref.store
in this IR aren't rewritten to their affine counterpart when running Polygeist'saffine-cfg
pass. AFAIK, this should be possible?In the code, the pass fails at isValidIndex which is called from here. Could this perhaps be fixed by adding another recursive check for delinearize_index in that function?
When I leave the
delinearize_index
out (it's a no-op anyway in this case) the memory operations do get raised.I tried further reducing this example but below IR does work as expected, so it's not only the presence of
delinearize_index
that's problematic.I hope I'm not missing anything too obvious, looking forward to hear if this can be fixed. If you point me to where the change needs to happen, I'll gladly create a PR :).
Jules
The text was updated successfully, but these errors were encountered: