[Mlir-commits] [mlir] [mlir][python] disable nanobind leak warnings (PR #121099)
Maksim Levental
llvmlistbot at llvm.org
Wed Dec 25 01:25:41 PST 2024
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/121099
See https://github.com/llvm/llvm-project/pull/119924#issuecomment-2561711029
>From 23d95c72006323db88a933e27be695ecf9f9cd80 Mon Sep 17 00:00:00 2001
From: Maksim Levental <maksim.levental at gmail.com>
Date: Wed, 25 Dec 2024 04:24:40 -0500
Subject: [PATCH] [mlir][python] disable nanobind leak warnings
---
mlir/lib/Bindings/Python/IRCore.cpp | 2 ++
1 file changed, 2 insertions(+)
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