OmarAzizi opened a new pull request, #20163: URL: https://github.com/apache/tvm/pull/20163
## Summary `support::Arena` never calls destructors but frees raw memory pages. `GraphPartitioner::Group` violates this by holding a ref counted `attrs` map, which leaks native memory on every pass invocation since `~Group()` is never called. Fixes #20056. ## Fix Implements option (b) from the issue: `Arena::make<T>()` now registers and invokes a destructor for non-trivially-destructible types, guarded by `if constexpr` so trivially destructible types pay no extra cost. Fixes the leak at the source instead of per call site. ## Testing Reproduced the leak using the script attached to the issue (updated for the `TensorStructInfo` -> `Type` unification in #19853, otherwise unchanged): ~4.96 MiB/iter before this fix, ~0 MiB/iter after. Existing Relax fusion/partitioning tests pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
