[Mlir-commits] [mlir] [mlir][python][cmake] Allows for specifying `NB_DOMAIN` in `add_mlir_python_extension` (PR #122865)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 15 10:01:13 PST 2025
================
@@ -658,6 +658,13 @@ function(add_mlir_python_extension libname extname)
set(eh_rtti_enable -frtti -fexceptions)
endif ()
+ # Avoids domain conflict with nanobind by specifying NB_DOMAIN.
+ if(MLIR_BINDINGS_PYTHON_NB_DOMAIN)
+ set(_nb_domain ${MLIR_BINDINGS_PYTHON_NB_DOMAIN})
+ else()
+ set(_nb_domain "mlir")
+ endif()
+
----------------
erwei-xilinx wrote:
I think it is still needed. In our project when we directly call the add_mlir_python_module method, it didn't inherit the cache default in the MLIR build's CMakeCache. Instead the NB_DOMAIN global variable was left undefined.
https://github.com/llvm/llvm-project/pull/122865
More information about the Mlir-commits
mailing list