New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add runtime setting to suppress leak warnings #109
Add runtime setting to suppress leak warnings #109
Conversation
I am sympathetic to the request but see issues with the specific solution proposed here. Different nanobind extension modules will share the My suggestion would be that you add an API like:
which updates field |
Thanks for the feedback ! |
Hi @MatthiasKohl, sorry for taking a little while to respond. I have two more requests: all "library" symbols are declared in You will then need a wrapper in the Best, |
(Looks like there are some bigger issues with the code as well) |
@wjakob that makes sense, I added the symbol to Do you need me to change anything else ? |
Thanks -- merged, and amended with minor tweaks. |
The reasoning behind this is as follows:
In our project, we again ran into a reference-counting issue, which isn't caused by our own extension library, but most likely caused by the PyTorch extension library, see here: tingyu66/nanobind_example@8629419
We don't have the bandwidth/time to investigate all these issues in other libraries, and in general, we have no control over what other extension libraries our end users run the library with.
In order to avoid bothering users with leak reports, this PR adds a mechanism to suppress leak reports which would be used for builds distributed to end users.
Of course by default, we keep the leak reports on, in order to catch these during development, as well as in our own CI.