-
Notifications
You must be signed in to change notification settings - Fork 34
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
✨ Migration of MLIR project to the MQT Core project #848
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #848 +/- ##
=======================================
- Coverage 92.3% 92.3% -0.1%
=======================================
Files 127 138 +11
Lines 13555 13664 +109
Branches 2086 2104 +18
=======================================
+ Hits 12522 12622 +100
- Misses 1033 1042 +9
🚀 New features to boost your workflow:
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
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.
Hey @BertiFlorea 👋🏼
Thanks for this initial draft for the migration. I just did a very quick and rough pass through the changes. Take everything with a grain of salt 😌
The biggest and most important step for this PR is to actually build the MLIR part of the project in CI and run the tests. Right now, it isn't doing any of that 😅
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 can be stripped down considerably. Most of the configured CI workflows here are already running on in the main CI.yml
.
You can definitely remove
- cpp-coverage
- cpp-linter
- python-tests
- python-linter
- code-ql
- cd
I am actually pretty sure that we won't be able to use the reusable MQT workflows at first. Simply because they do not install LLVM, so the project won't build.
I'd rather propose to start small here and adapt https://github.com/cda-tum/mqt-workflows/blob/main/.github/workflows/reusable-cpp-tests-ubuntu.yml so that the project properly builds on Ubuntu. Let's take it from there.
push: | ||
paths: | ||
- "mlir/**" | ||
pull_request: | ||
paths: | ||
- "mlir/**" |
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.
probably worth adding a workflow trigger here. so that we can manually start the workflow if necesary
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 workflow is also missing a concurrency config
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
so that in-progress jobs get cancelled when new ones are started.
# set required cmake version | ||
cmake_minimum_required(VERSION 3.24...3.30) |
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.
can be removed as this is no longer the top level project
set(CMAKE_CXX_STANDARD | ||
17 | ||
CACHE STRING "C++ standard to conform to") |
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.
can be removed as this is no longer the top level project and this is already set in MQT Core
# Add path for custom modules | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
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 will never add anything because there is no cmake
directory here.
can be removed as this is no longer the top level project
# check if this is the master project or used via add_subdirectory | ||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) | ||
set(MQT_MLIR_MASTER_PROJECT ON) | ||
else() | ||
set(MQT_MLIR_MASTER_PROJECT OFF) | ||
endif() |
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 will always be FALSE in the current setup, which is also why the current CI runs build nothing.
MQT Core is the master project.
This can be removed.
option(BUILD_MQT_MLIR_TESTS "Also build tests for the MQT MLIR project" ${MQT_MLIR_MASTER_PROJECT}) | ||
option(BUILD_MLIR_DIALECT "Build the MQT MLIR dialect" ${MQT_MLIR_MASTER_PROJECT}) | ||
|
||
if(BUILD_MLIR_DIALECT) | ||
add_subdirectory(mlir) | ||
endif() |
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'd argue that the BUILD_MLIR_DIALECT
option can be removed as there already has been an opt-in for building the MLIR components of the project.
BUILD_MQT_MLIR_TESTS
is probably also not necessary because we already have BUILD_MQT_CORE_TESTS
and I think it is sufficient to simply use that.
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'd argue that this file can either be removed entirely or considerably stripped down and rewritten.
if(BUILD_MQT_MLIR_TESTS) | ||
enable_testing() | ||
include(GoogleTest) | ||
add_subdirectory(test) | ||
endif() |
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 as a reminder that this will require adaptation
Description
The purpose of this PR is to migrate the functionality of the MQT MLIR project to the MQT Core library. At the moment, the functionality is turned by default to OFF using the CMAKE building method.
Checklist: