Skip to content

Commit

Permalink
Initialize nanobind at top-level (#19422)
Browse files Browse the repository at this point in the history
Initalizes nanobind at the top-level as MLIR is switching over to
nanobind with llvm/llvm-project#118583.
  • Loading branch information
marbre authored Dec 9, 2024
1 parent f024875 commit 7dd6fa6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,18 @@ endif()
# MLIR/LLVM Dependency
#-------------------------------------------------------------------------------

# Both the IREE and MLIR Python bindings require nanobind. We initialize it here
# at the top level so that everything uses ours consistently.
if(IREE_BUILD_PYTHON_BINDINGS OR IREE_BUILD_COMPILER)
include(FetchContent)
FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
GIT_TAG 0f9ce749b257fdfe701edb3cf6f7027ba029434a # v2.4.0
)
FetchContent_MakeAvailable(nanobind)
endif()

# Both the IREE and MLIR Python bindings require pybind11. We initialize it here
# at the top level so that everything uses ours consistently.
if(IREE_BUILD_PYTHON_BINDINGS AND IREE_BUILD_COMPILER)
Expand Down
9 changes: 0 additions & 9 deletions runtime/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# nanobind
include(FetchContent)
FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
GIT_TAG 0f9ce749b257fdfe701edb3cf6f7027ba029434a # v2.4.0
)
FetchContent_MakeAvailable(nanobind)

set(_EXTRA_INSTALL_TOOL_TARGETS)
set(_TRACY_ENABLED OFF)

Expand Down

0 comments on commit 7dd6fa6

Please sign in to comment.