Add conversions between Jeff and arith, math, and tensor#10
Conversation
denialhaag
left a comment
There was a problem hiding this comment.
Apart from the tests and the linter errors, this is practically ready.
Unfortunately, the testing is giving me quite a headache. I really wanted to reuse the .jeff files and implement round-trip tests. However, this is currently forcing quite some less-than-ideal workarounds to prevent constant folding. At this point, I feel like we might need to write string-based unit tests that test each conversion individually.
@burgholzer, do you see any alternative? 🤔
burgholzer
left a comment
There was a problem hiding this comment.
Thanks @denialhaag for working on this. Gave this a quick review and, as always, you will find some comments inline. I hope these make sense. Some might require a bit of discussion.
8ab2261 to
1dc2fcd
Compare
46b94cd to
d58e309
Compare
d58e309 to
038058b
Compare
0bb2c9f to
8a86b29
Compare
burgholzer
left a comment
There was a problem hiding this comment.
I just gave this another (very quick) round of review. All of the comments are minor. Once addressed, this is good to go from my side.
Maybe @dime10 wants to have a quick look as well?
Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
4c2032c to
0a1eca9
Compare
ae1a6db to
06f443e
Compare
06f443e to
8fb7ad7
Compare
|
After a discussion in munich-quantum-toolkit/core#1565 (comment), we have decided to make some more changes to the native-to-Jeff conversion:
If both @burgholzer and @dime10 agree, I'd say we can merge this later today. |
|
Thank you for the updates @denialhaag! In terms of round-tripping, I would say as long as the jeff mlir dialect and the jeff format round-trip, that's the most important. From other dialects to the jeff dialect I would expect some (non-meaningful) loss because there are different abstractions involved. |
burgholzer
left a comment
There was a problem hiding this comment.
Looks like this is ready to be merged. 🚀
Let's go.
## Description This PR updates `jeff-mlir` to the latest version, allowing us to use the conversion passes added in PennyLaneAI/jeff-mlir#10. ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] ~~I have added appropriate tests that cover the new/changed functionality.~~ - [x] ~~I have updated the documentation to reflect these changes.~~ - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] ~~I have added migration instructions to the upgrade guide (if needed).~~ - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. --------- Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com> Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
## Description As pointed out in PennyLaneAI/jeff-mlir#10 (comment), a conversion only depends on a dialect if it _creates_ its operations. This PR fixes the definition of all conversions accordingly. ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] ~~I have added appropriate tests that cover the new/changed functionality.~~ - [x] ~~I have updated the documentation to reflect these changes.~~ - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] ~~I have added migration instructions to the upgrade guide (if needed).~~ - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. --------- Signed-off-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com>
This PR adds conversions between Jeff and the built-in
arith,math, andtensordialects. The conversions can round-trip allInt_Ops,IntArray_Ops,Float_Ops, andFloatArray_Ops.