Skip to content
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

Remove pybind11 modules from Catalyst's core MLIR libs #1187

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
942b86b
[WIP] Replace pybind11 with nanobind in Catalyst's core
joeycarter Oct 7, 2024
3bac603
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 11, 2024
0628a5e
Remove QuantumExtension MLIR python module
joeycarter Oct 11, 2024
bc96e28
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 11, 2024
69db0d3
Add nanobind to requirements
joeycarter Oct 15, 2024
6f71341
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 15, 2024
7cc648f
Add nanobind to GitHub actions dependencies
joeycarter Oct 15, 2024
9ecfc69
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 15, 2024
0e74f44
Fix issue with CMake Python versions
joeycarter Oct 15, 2024
aa778e0
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 21, 2024
78286a8
Remove min nanobind version requirement
joeycarter Oct 21, 2024
5d05675
Revert "Remove QuantumExtension MLIR python module"
joeycarter Oct 22, 2024
2722702
Fix compiler_driver CMake config
joeycarter Oct 22, 2024
c9aacab
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Oct 22, 2024
c27050e
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 7, 2024
6f3197a
[WIP] Remove QuantumExtension module
joeycarter Nov 7, 2024
ffdbf14
Add back in QuantumPythonModules for check-dialects
joeycarter Nov 7, 2024
6b1a2b8
Remove commented-out code
joeycarter Nov 7, 2024
8c76812
Add missing nanobind dependency
joeycarter Nov 7, 2024
4c8d434
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 7, 2024
e58f4ee
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 11, 2024
848963f
[Testing] Print out extra debug info for failing test
joeycarter Nov 11, 2024
a5893c7
Revert "[Testing] Print out extra debug info for failing test"
joeycarter Nov 11, 2024
4214cda
[Testing] Print out extra CMake debug info
joeycarter Nov 11, 2024
ca39d4a
Require specific python version in cmake find_package
joeycarter Nov 12, 2024
e0feefb
Add PYTHON_VERSION_TO_FIND to GitHub workflows
joeycarter Nov 12, 2024
052aeaf
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 12, 2024
5305261
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 13, 2024
4836d29
Specify Python root dir explicitly
joeycarter Nov 13, 2024
20bcdaf
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 15, 2024
df01e51
Remove all references to nanobind
joeycarter Nov 15, 2024
8175b06
Update changelog
joeycarter Nov 15, 2024
18c6d9c
Add "Internal changes" changelog section
joeycarter Nov 15, 2024
a179d96
Merge branch 'main' into joeycarter/nanobind-catalyst-core
joeycarter Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@

<h3>Deprecations 👋</h3>

<h3>Internal changes ⚙️</h3>

* The `QuantumExtension` module (previously implemented with pybind11) has been removed. This module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can in the internal section, since it's not really user-facing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done (18c6d9c)

I didn't realize this at the time, but when I created the new dev changelog during the last release I had copied from a template that didn't have the "Internal changes" section, so I've added it here!

was not included in the distributed wheels and has been deprecated to align with our adoption of
Python's stable ABI, which pybind11 does not support.
[(#1187)](https://github.com/PennyLaneAI/catalyst/pull/1187)

<h3>Documentation 📝</h3>

* A new tutorial going through how to write a new MLIR pass is available. The tutorial writes an empty pass that prints hello world. The code of the tutorial is at [a separate github branch](https://github.com/PennyLaneAI/catalyst/commit/ba7b3438667963b307c07440acd6d7082f1960f3).
Expand Down
11 changes: 0 additions & 11 deletions mlir/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ declare_mlir_dialect_python_bindings(
dialects/mitigation.py
DIALECT_NAME mitigation)

declare_mlir_python_extension(QuantumPythonSources.Extension
MODULE_NAME _quantumDialects
ADD_TO_PARENT QuantumPythonSources
SOURCES
QuantumExtension.cpp
PRIVATE_LINK_LIBS
LLVMSupport
MLIRIR
EMBED_CAPI_LINK_LIBS
QuantumCAPI
)

################################################################################
# Common CAPI
Expand Down
77 changes: 0 additions & 77 deletions mlir/python/QuantumExtension.cpp

This file was deleted.

1 change: 0 additions & 1 deletion mlir/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ set(TEST_SUITES

if(QUANTUM_ENABLE_BINDINGS_PYTHON)
list(APPEND DIALECT_TESTS_DEPEND QuantumPythonModules)
list(APPEND TEST_SUITES python)
endif()

add_lit_testsuite(check-dialects "Run the regression tests for mlir dialects"
Expand Down
7 changes: 0 additions & 7 deletions mlir/test/python/lit.local.cfg

This file was deleted.

29 changes: 0 additions & 29 deletions mlir/test/python/smoketest_catalyst.py

This file was deleted.

33 changes: 0 additions & 33 deletions mlir/test/python/smoketest_gradient.py

This file was deleted.

34 changes: 0 additions & 34 deletions mlir/test/python/smoketest_quantum.py

This file was deleted.