-
-
Notifications
You must be signed in to change notification settings - Fork 48
✨ Add conversions for Jeff dialect #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two problems I have stumbled across so far:
| # Restore C++ standard changed by jeff-mlir | ||
| set(CMAKE_CXX_STANDARD 20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build would currently fail without this workaround, as CMAKE_CXX_STANDARD is set to 17 in jeff-mlir: https://github.com/PennyLaneAI/jeff-mlir/blob/ec59bc0440f45b659ff8b680337ffdbb3c9d6495/CMakeLists.txt#L5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try to submit a PR to fix that. We probably want a similar fix in the MQT, where we similarly set the CXX standard to 20.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing it in jeff-mlir! I have created #1480 to fix this issue here. 😌
| add_custom_command( | ||
| TARGET mlir-doc | ||
| POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/docs/ | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/docs/mlir/ | ||
| COMMAND ${CMAKE_COMMAND} -D DOCS_DIR:PATH=${CMAKE_CURRENT_SOURCE_DIR}/docs/mlir -P | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CleanMLIRDocs.cmake | ||
| COMMENT "Copying and cleaning up generated MLIR documentation" | ||
| VERBATIM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently makes the configuration fail. I don't exactly understand what's going on, but it looks like the mlir-doc target is also being created by jeff-mlir, leading to interference.
Another problem seems to be that calling mlir-doc also triggers the generation of the Jeff documentation in the _deps directory.
Maybe it's possible to add flags to jeff-mlir to toggle the documentation generation. 🤔
|
A brief overview of everything that remains open: Main FunctionI have not yet looked into the proper conversion of a QC-style main function to a Jeff-style main function. The current implementation of the tests relies on bare-bones modules without a properly defined entry point. This might require some coordination with Xanadu, as we should align on what a Jeff-style main function exactly looks like. That said, the implementation of the conversion itself should be straightforward. Unconvertible QC OperationsThe following QC operations can currently not be converted to Jeff because they do not have a direct counterpart:
Unconvertible Jeff OperationsThe following Jeff operations can currently not be converted to QC because they do not have a direct counterpart:
In addition, the following additional conversions are not implemented yet, as I believe their implementation needs further discussion:
TestsThe current version of the tests does not perform proper equivalence checking but relies on (very minimal) string comparisons. |
Description
This PR adds conversions for the Jeff dialect.
Related to #1196
Checklist: