junrushao opened a new pull request, #334:
URL: https://github.com/apache/tvm-ffi/pull/334

   Should fix #264, #322. Supersedes #331.
   
   This PR introduces a flag `keep_module_alive: bool = True` to the following 
APIs:
   - **`load_module`**
   - **`cpp.load_inline`**
   - **`cpp.load`**
   
   By default, the flag is set to `True`, meaning it is bound to 
`ModuleGlobals` inside `libtvm_ffi.so`. It retains a reference count to those 
modules, and Python side will not unload the module.
   
   Two private APIs are added:
   - `tvm_ffi._ffi_api.ModuleGlobalsAdd`: adds a module to global registry 
`ModuleGlobals`
   - `tvm_ffi._ffi_api.ModuleGlobalsRemove`: removes the module from global 
registry `ModuleGlobals`


-- 
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]

Reply via email to