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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Dec 25 01:26:12 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

<details>
<summary>Changes</summary>

See https://github.com/llvm/llvm-project/pull/119924#issuecomment-2561711029



---
Full diff: https://github.com/llvm/llvm-project/pull/121099.diff


1 Files Affected:

- (modified) mlir/lib/Bindings/Python/IRCore.cpp (+2) 


``````````diff
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.
   //----------------------------------------------------------------------------

``````````

</details>


https://github.com/llvm/llvm-project/pull/121099


More information about the Mlir-commits mailing list