diff --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp index 86afa956398ae..05c000bfd8ca0 100644 --- a/mlir/lib/Bindings/Python/IRCore.cpp +++ b/mlir/lib/Bindings/Python/IRCore.cpp @@ -2587,6 +2587,8 @@ class PyOpAttributeMap { //------------------------------------------------------------------------------ void mlir::python::populateIRCore(nb::module_ &m) { + // disable leak warnings which tend to be false positives. + nb::set_leak_warnings(false); //---------------------------------------------------------------------------- // Enums. //----------------------------------------------------------------------------