Disabling Nanobind Memory Leak Warnings in Release Builds (#745)

Co-authored-by: Binyang Li <binyli@microsoft.com>
This commit is contained in:
Caio Rocha
2026-02-23 11:55:17 -08:00
committed by GitHub
parent 2a6f1c1192
commit b5256032fe
4 changed files with 14 additions and 3 deletions

View File

@@ -63,10 +63,13 @@ class MyProxyService {
};
NB_MODULE(_ext, m) {
#ifdef MSCCLPP_DISABLE_NB_LEAK_WARNINGS
nb::set_leak_warnings(false);
#endif
nb::class_<MyProxyService>(m, "MyProxyService")
.def(nb::init<int, int, int, nb::list, nb::list>(), nb::arg("rank"), nb::arg("nranks"), nb::arg("data_size"),
nb::arg("reg_mem_list"), nb::arg("sem_list"))
.def("fifo_device_handle", &MyProxyService::fifoDeviceHandle)
.def("start", &MyProxyService::start)
.def("stop", &MyProxyService::stop);
}
}