[Mlir-commits] [mlir] 08e2c15 - [mlir][python] disable nanobind leak warnings (#121099)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Dec 29 09:13:14 PST 2024


Author: Maksim Levental
Date: 2024-12-29T12:13:10-05:00
New Revision: 08e2c15a287df132ca2186f2d56669219a7ed8a1

URL: https://github.com/llvm/llvm-project/commit/08e2c15a287df132ca2186f2d56669219a7ed8a1
DIFF: https://github.com/llvm/llvm-project/commit/08e2c15a287df132ca2186f2d56669219a7ed8a1.diff

LOG: [mlir][python] disable nanobind leak warnings (#121099)

Added: 
    

Modified: 
    mlir/lib/Bindings/Python/IRCore.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 86afa956398ae5..05c000bfd8ca0a 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.
   //----------------------------------------------------------------------------


        


More information about the Mlir-commits mailing list