Skip to content

Commit

Permalink
Merge pull request #65 from Xilinx/corentin.python_bindings
Browse files Browse the repository at this point in the history
Use AddMLIRPython before declaring python binding sources
  • Loading branch information
mgehre-amd authored Aug 13, 2024
2 parents 02ef1a0 + 7364d3c commit 8a7d166
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,17 @@ RUNTIME DESTINATION bin COMPONENT python)
install(DIRECTORY xten
DESTINATION python COMPONENT python)

declare_mlir_python_sources(XTenPythonSources)
declare_mlir_python_sources(XTenPythonSources.Dialects
ADD_TO_PARENT XTenPythonSources)
if(MLIR_ENABLE_BINDINGS_PYTHON)
include(AddMLIRPython)
declare_mlir_python_sources(XTenPythonSources)
declare_mlir_python_sources(XTenPythonSources.Dialects
ADD_TO_PARENT XTenPythonSources)

declare_mlir_dialect_python_bindings(
ADD_TO_PARENT XTenPythonSources.Dialects
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
TD_FILE dialects/XTenNNOps.td
SOURCES
dialects/xten_nn.py
DIALECT_NAME xten_nn)
declare_mlir_dialect_python_bindings(
ADD_TO_PARENT XTenPythonSources.Dialects
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
TD_FILE dialects/XTenNNOps.td
SOURCES
dialects/xten_nn.py
DIALECT_NAME xten_nn)
endif()

0 comments on commit 8a7d166

Please sign in to comment.