catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

[WIP] Replace pybind11 with nanobind in frontend

Open joeycarter opened this issue 1 year ago • 9 comments
trafficstars

Context:

The Catalyst frontend contains a small Python extension module at

 catalyst/utils/wrapper.cpp

which is an importable Python module written in C/C++ used to wrap the entry point of compiled programs. The Python-C++ bindings were originally implemented using pybind11. This is part of a larger effort to replace all pybind11 code with nanobind.

Description of the Change:

This change replaces all the pybind11 code in the frontend with the equivalent nanobind objects and operations.

It was also necessary to modify the frontend build system to build the wrapper module using CMake for compatibility with nanobind, rather than in setup.py with the intree_extensions setuptools utility included with pybind11.

Benefits:

See Epic 68472 for a list of nanobind's benefits.


[sc-72837]

joeycarter avatar Oct 02 '24 19:10 joeycarter