Skip to content
Closed
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ if (AIE_ENABLE_PYTHON_PASSES)
MODULE_NAME _aie
ADD_TO_PARENT AIEPythonExtensions
ROOT_DIR "/"
PYTHON_BINDINGS_LIBRARY nanobind

SOURCES
${_py_srcs}
Expand All @@ -229,6 +230,7 @@ if (AIE_ENABLE_PYTHON_PASSES)
target_include_directories(
AIEPythonExtensions.MLIR
INTERFACE $<BUILD_INTERFACE:${PYBINDINGS_SRC}>
INTERFACE $<BUILD_INTERFACE:${NB_DIR}/include>
)
Comment on lines 230 to 234
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

${NB_DIR} is not defined anywhere in this repository, so if it isn't set by the included AddMLIRPython module/configure step it will expand to an empty string here and effectively add /include to the include path. Consider guarding this with an explicit if (NOT DEFINED NB_DIR) error (or deriving the include directory from the nanobind CMake package/target) so misconfiguration fails fast with a clear message instead of producing a confusing include path.

Copilot uses AI. Check for mistakes.
if (AIE_ENABLE_XRT_PYTHON_BINDINGS)
target_include_directories(AIEPythonExtensions.MLIR INTERFACE ${XRT_INCLUDE_DIR})
Expand Down Expand Up @@ -311,6 +313,7 @@ else ()
MODULE_NAME _aie
ADD_TO_PARENT AIEPythonExtensions
ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}
PYTHON_BINDINGS_LIBRARY nanobind

PARTIAL_SOURCES_INTENDED
SOURCES
Expand All @@ -326,6 +329,7 @@ else ()
MODULE_NAME _xrt
ADD_TO_PARENT AIEPythonExtensions
ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}
PYTHON_BINDINGS_LIBRARY nanobind

PARTIAL_SOURCES_INTENDED
SOURCES
Expand Down
Loading