-
Notifications
You must be signed in to change notification settings - Fork 43
MLIR Conversion(s) #880
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?
MLIR Conversion(s) #880
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Now that #879 is merged, this needs to be rebased |
@@ -26,6 +25,13 @@ string(REPLACE "." ";" MLIR_VERSION_COMPONENTS ${MLIR_VERSION}) | |||
list(GET MLIR_VERSION_COMPONENTS 0 MLIR_VERSION_MAJOR) |
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.
Just because I stumbe over it right now: Is this gymnastic with the version string necessary or can the VERSION_LESS
operator of cmake be used directly? That might make the code cleaner here.
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.
Seems reasonable to use VERSION_LESS
👍🏼
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.
Just a couple of comments because the PR notifications where in my inbox 😌
- name: Set macOS deployment target for linker | ||
run: echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV |
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 should not be necessary as you are running on macOS 14 already.
- name: Set macOS deployment target for linker | ||
run: echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV |
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 should not be necessary as you are running on macOS 14 already.
runs-on: macos-14 | ||
strategy: | ||
matrix: | ||
llvm-version: [19] |
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.
Would be interesting to see this work on macos-13
(x86 runners) as well as llvm-version: 20
.
The current build pipeline seems to pass, which is great already!
Unrelated to this PR in particular, but what could be a nice byproduct in a separate PR is that this already represents a functional macOS-14 CI pipeline for MLIR, which would be part of #925.
# Manually detect the installed Catalyst Python and get its cmake directory. | ||
execute_process( | ||
COMMAND "${Python_EXECUTABLE}" -c | ||
"import catalyst, os; print(os.path.dirname(catalyst.__file__))" | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
OUTPUT_VARIABLE Python_Catalyst_DIR | ||
ERROR_QUIET) | ||
message(STATUS "Found Catalyst package: ${Python_Catalyst_DIR}") | ||
|
||
# TODO: once the Catalyst Python package provides the necessary files set(Catalyst_DIR | ||
# "${Python_Catalyst_DIR}/mlir/build/lib/cmake/catalyst") |
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.
Ideally, there would be no need to do something like set(Catalyst_DIR "${Python_Catalyst_DIR}/...
, but Catalyst_DIR
would already be a result of the execute_process
call.
Either catalyst provides an entry point for that (similar to pybind, nanobind, or mqt-core), or we parse this somewhat from output similar to the existing command here by a simple Python script.
Co-authored-by: Lukas Burgholzer <[email protected]> Signed-off-by: Patrick Hopf <[email protected]>
We decided that we first merge the plugin (#881) and afterward integrate those changes here and then merge this PR. This has the following advantages:
|
Description
This PR originates from this mqt-mlir PR and introduces conversions between Catalysts quantum dialect and the MQTOpt dialect.
Checklist: