Skip to content

Commit e1bd396

Browse files
authored
📦️ Enable MLIR by default (#1356)
## Description Fixes #1132 ## 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.
2 parents 7778e0a + 48e6f48 commit e1bd396

63 files changed

Lines changed: 417 additions & 448 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/codecov.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ flag_management:
2626
paths:
2727
- "include"
2828
- "src"
29+
- "mlir"
2930
- name: python
3031
paths:
3132
- "python/mqt/**/*.py"
@@ -36,16 +37,6 @@ flag_management:
3637
- type: patch
3738
target: 95%
3839
threshold: 1%
39-
- name: mlir
40-
paths:
41-
- "mlir"
42-
statuses:
43-
- type: project
44-
threshold: 0.5%
45-
removed_code_behavior: adjust_base
46-
- type: patch
47-
target: 95%
48-
threshold: 1%
4940

5041
parsers:
5142
gcov:

.github/workflows/cd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
build-sdist:
1414
name: 🐍 Packaging
15-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
15+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
1616

1717
# Builds wheels on all supported platforms using cibuildwheel.
1818
# The wheels are uploaded as GitHub artifacts `dev-cibw-*` or `cibw-*`, depending on whether
@@ -31,7 +31,7 @@ jobs:
3131
windows-2025,
3232
windows-11-arm,
3333
]
34-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
34+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
3535
with:
3636
runs-on: ${{ matrix.runs-on }}
3737

.github/workflows/ci.yml

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ concurrency:
1414
jobs:
1515
change-detection:
1616
name: 🔍 Change
17-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
17+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-change-detection.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
1818

1919
cpp-tests-ubuntu:
2020
name: 🇨‌ Test 🐧
@@ -30,11 +30,13 @@ jobs:
3030
- runs-on: ubuntu-24.04
3131
compiler: gcc
3232
config: Debug
33-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
33+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
3434
with:
3535
runs-on: ${{ matrix.runs-on }}
3636
compiler: ${{ matrix.compiler }}
3737
config: ${{ matrix.config }}
38+
setup-mlir: true
39+
llvm-version: 21.1.8
3840

3941
cpp-tests-macos:
4042
name: 🇨‌ Test 🍎
@@ -50,12 +52,14 @@ jobs:
5052
- runs-on: macos-15
5153
compiler: clang
5254
config: Debug
53-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
55+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
5456
with:
5557
runs-on: ${{ matrix.runs-on }}
5658
compiler: ${{ matrix.compiler }}
5759
config: ${{ matrix.config }}
5860
cmake-args: -DMQT_CORE_WITH_GMP=ON
61+
setup-mlir: true
62+
llvm-version: 21.1.8
5963

6064
cpp-tests-windows:
6165
name: 🇨‌ Test 🏁
@@ -71,11 +75,13 @@ jobs:
7175
- runs-on: windows-2025
7276
compiler: msvc
7377
config: Debug
74-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
78+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
7579
with:
7680
runs-on: ${{ matrix.runs-on }}
7781
compiler: ${{ matrix.compiler }}
7882
config: ${{ matrix.config }}
83+
setup-mlir: true
84+
llvm-version: 21.1.8
7985

8086
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
8187
cpp-tests-extensive-ubuntu:
@@ -88,11 +94,13 @@ jobs:
8894
runs-on: [ubuntu-24.04, ubuntu-24.04-arm]
8995
compiler: [gcc, clang, clang-20, clang-21]
9096
config: [Release, Debug]
91-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
97+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-ubuntu.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
9298
with:
9399
runs-on: ${{ matrix.runs-on }}
94100
compiler: ${{ matrix.compiler }}
95101
config: ${{ matrix.config }}
102+
setup-mlir: true
103+
llvm-version: 21.1.8
96104

97105
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
98106
cpp-tests-extensive-macos:
@@ -105,12 +113,14 @@ jobs:
105113
runs-on: [macos-14, macos-15, macos-15-intel]
106114
compiler: [clang, clang-20, clang-21, gcc-14, gcc-15]
107115
config: [Release, Debug]
108-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
116+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-macos.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
109117
with:
110118
runs-on: ${{ matrix.runs-on }}
111119
compiler: ${{ matrix.compiler }}
112120
config: ${{ matrix.config }}
113121
cmake-args: -DMQT_CORE_WITH_GMP=ON
122+
setup-mlir: true
123+
llvm-version: 21.1.8
114124

115125
# run extensive C++ tests on PRs labeled with the `extensive-cpp-ci` label
116126
cpp-tests-extensive-windows:
@@ -122,18 +132,23 @@ jobs:
122132
matrix:
123133
runs-on: [windows-2022, windows-2025, windows-11-arm]
124134
compiler: [msvc, clang]
125-
config: [Release]
126-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
135+
config: [Release, Debug]
136+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-tests-windows.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
127137
with:
128138
runs-on: ${{ matrix.runs-on }}
129139
compiler: ${{ matrix.compiler }}
130140
config: ${{ matrix.config }}
141+
setup-mlir: true
142+
llvm-version: 21.1.8
131143

132144
cpp-coverage:
133145
name: 🇨‌ Coverage
134146
needs: change-detection
135147
if: fromJSON(needs.change-detection.outputs.run-cpp-tests)
136-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
148+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-coverage.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
149+
with:
150+
setup-mlir: true
151+
llvm-version: 21.1.8
137152
permissions:
138153
contents: read
139154
id-token: write
@@ -142,16 +157,17 @@ jobs:
142157
name: 🇨‌ Lint
143158
needs: change-detection
144159
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
145-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
160+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
146161
with:
147-
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON -DBUILD_MQT_CORE_MLIR=ON -DBUILD_MQT_CORE_BINDINGS=ON
162+
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON -DBUILD_MQT_CORE_BINDINGS=ON
148163
clang-version: 21
149164
build-project: true
150165
files-changed-only: true
151166
setup-python: true
152167
install-pkgs: "nanobind==2.10.2"
153168
cpp-linter-extra-args: "-std=c++20"
154169
setup-mlir: true
170+
llvm-version: 21.1.8
155171

156172
python-tests:
157173
name: 🐍 Test
@@ -168,15 +184,15 @@ jobs:
168184
macos-15,
169185
windows-2025,
170186
]
171-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
187+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
172188
with:
173189
runs-on: ${{ matrix.runs-on }}
174190

175191
python-coverage:
176192
name: 🐍 Coverage
177193
needs: [change-detection, python-tests]
178194
if: fromJSON(needs.change-detection.outputs.run-python-tests)
179-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
195+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-coverage.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
180196
permissions:
181197
contents: read
182198
id-token: write
@@ -190,15 +206,15 @@ jobs:
190206
fail-fast: false
191207
matrix:
192208
runs-on: [macos-14, windows-2022]
193-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
209+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
194210
with:
195211
runs-on: ${{ matrix.runs-on }}
196212

197213
python-linter:
198214
name: 🐍 Lint
199215
needs: change-detection
200216
if: fromJSON(needs.change-detection.outputs.run-python-tests)
201-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
217+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-linter.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
202218
with:
203219
check-stubs: true
204220
enable-ty: true
@@ -207,7 +223,7 @@ jobs:
207223
name: 🚀 CD
208224
needs: change-detection
209225
if: fromJSON(needs.change-detection.outputs.run-cd)
210-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
226+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-sdist.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
211227

212228
build-wheel:
213229
name: 🚀 CD
@@ -225,16 +241,10 @@ jobs:
225241
windows-2025,
226242
windows-11-arm,
227243
]
228-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
244+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-python-packaging-wheel-cibuildwheel.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
229245
with:
230246
runs-on: ${{ matrix.runs-on }}
231247

232-
mlir-tests:
233-
name: 🐉 Test
234-
needs: change-detection
235-
if: fromJSON(needs.change-detection.outputs.run-mlir)
236-
uses: ./.github/workflows/reusable-mlir-tests.yml
237-
238248
# this job does nothing and is only used for branch protection
239249
required-checks-pass:
240250
name: 🚦 Check
@@ -254,7 +264,6 @@ jobs:
254264
- python-linter
255265
- build-sdist
256266
- build-wheel
257-
- mlir-tests
258267
runs-on: ubuntu-latest
259268
steps:
260269
- name: Decide whether the needed jobs succeeded or failed
@@ -289,8 +298,4 @@ jobs:
289298
fromJSON(needs.change-detection.outputs.run-cd)
290299
&& '' || 'build-sdist,build-wheel,'
291300
}}
292-
${{
293-
fromJSON(needs.change-detection.outputs.run-mlir)
294-
&& '' || 'mlir-tests,'
295-
}}
296301
jobs: ${{ toJSON(needs) }}

.github/workflows/reusable-mlir-tests.yml

Lines changed: 0 additions & 119 deletions
This file was deleted.

.github/workflows/upstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
runs-on: [ubuntu-24.04, macos-14, windows-2022]
22-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
22+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-tests.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
2323
with:
2424
runs-on: ${{ matrix.runs-on }}
2525
setup-z3: true
@@ -28,7 +28,7 @@ jobs:
2828
name: Create issue on failure
2929
needs: qiskit-upstream-tests
3030
if: ${{ always() }}
31-
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@99170045e26c2564e9573174b573310e211fca72 # v1.17.10
31+
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-qiskit-upstream-issue.yml@d6314c45667c131055a0389afc110e8dedc6da3f # v1.17.11
3232
with:
3333
tests-result: ${{ needs.qiskit-upstream-tests.result }}
3434
permissions:

0 commit comments

Comments
 (0)