You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ORCJIT] Add keep_module_alive to ExecutionSession.load_module
Mirror tvm_ffi.load_module's keep_module_alive option on the ORCJIT session
so callers can pin a JIT module in the runtime's process-global registry.
Without pinning, JIT-allocated heap Objects (String, Array, Map, Tuple, ...)
that escape past their owning Module deref a deleter pointer into unmapped
JIT memory and crash the process at teardown.
- session.py: forward keep_module_alive through to ModuleGlobalsAdd; Notes
document the transitive session-pin and slab-granularity RSS trade-off.
- examples/quick-start: drop std::string-returning concat (it hit the
escape hazard without opting into the pin); example is now int-only.
- tests/sources/cc/test_containers.cc: new source covering String / Array
/ Map / Tuple returns, one function per container.
- tests/test_basic.py: load() gains keep_module_alive; new parametrized
tests verify each container return survives del mod when pinned.
0 commit comments