[Mlir-commits] [llvm] [mlir] [mlir python] Port in-tree dialects to nanobind. (PR #119924)

Maksim Levental llvmlistbot at llvm.org
Tue Dec 24 23:42:59 PST 2024


makslevental wrote:

FYI after upgrading `mlir-python-extras` to latest I am suddenly getting this:

```
nanobind: leaked 3 instances!
 - leaked instance 0x7fe74e5c1c88 of type "mlir.execution_engine.ExecutionEngine"
 - leaked instance 0x7fe74e5ba868 of type "mlir._mlir_libs._mlir.ir.UnrankedMemRefType"
 - leaked instance 0x7fe74e67afa8 of type "mlir._mlir_libs.Context"
nanobind: leaked 126 types!
 - leaked type "mlir._mlir_libs._mlir.ir.AffineFloorDivExpr"
 - leaked type "mlir._mlir_libs._mlir.ir.AffineCeilDivExpr"
 - leaked type "mlir._mlir_libs._mlir.ir.F16Type"
 - leaked type "mlir._mlir_libs._mlir.ir.AffineMap"
 - leaked type "mlir._mlir_libs._mlirExecutionEngine.ExecutionEngine"
 - leaked type "mlir._mlir_libs._mlir.ir.FloatTF32Type"
 - leaked type "mlir._mlir_libs._mlir.ir.Float8E8M0FNUType"
 - leaked type "mlir._mlir_libs._mlir.ir.IntegerAttr"
 - leaked type "mlir._mlir_libs._mlir.ir.OpOperandIterator"
 - leaked type "mlir._mlir_libs._mlir.ir.OpView"
 - leaked type "mlir._mlir_libs._mlir.passmanager.PassManager"
 - ... skipped remainder
nanobind: leaked 860 functions!
 - leaked function "__init__"
 - leaked function ""
 - leaked function ""
 - leaked function ""
 - leaked function "dump"
 - leaked function "get_identity"
 - leaked function "__add__"
 - leaked function "maybe_downcast"
 - leaked function "__init__"
 - leaked function ""
 - leaked function ""
 - ... skipped remainder
nanobind: this is likely caused by a reference counting issue in the binding code.
```

I'm not sure if this is my fault or upstream's :shrug: 

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


More information about the Mlir-commits mailing list