cyx-6 opened a new pull request, #658:
URL: https://github.com/apache/tvm-ffi/pull/658

   Adds a process-wide shared execution session and a unified `load_module` on 
the `tvm_ffi_orcjit` addon, mirroring core `tvm_ffi.load_module`.
   
   ## Changes
   
   - **`default_session()`** — leaked, process-wide shared `ExecutionSession`; 
settable ORC-runtime-path registry resolved on first use.
   - **`ExecutionSession.load_module(objects, name)`** — loads one or more 
objects (path `str`/`Path` or in-memory bytes; single item or list) into one 
fresh JITDylib, injects context symbols eagerly, expands any embedded library 
binary into an import tree, and returns a plain `tvm_ffi.Module`.
   - **Recursive session lock** serializing all compound JITDylib ops (create / 
add / lookup+init / set-link-order / teardown) for safe shared-session use 
across threads; the resolved-call hot path stays lock-free.
   - **Namespace rename** — registered globals and the object key move to 
`ffi_orcjit`; `set_link_order` kept but dropped from the advertised surface.
   - **`cpp.build`** — copy a single object through instead of `ld -r`, which 
some system linkers use to stamp a nonzero `sh_addr` on zero-size sections 
(e.g. `.note.GNU-stack`), producing a JITLink block that overlaps in 
`EHFrameEdgeFixer` and breaks C++ (eh_frame) loads.
   
   Also folds in earlier addon cleanups (hide static-linked archive symbols; 
numpydoc docstrings).
   
   ## Testing
   
   New `tests/test_session_load_module.py` covers input shapes, eager context, 
drop, embedded-binary expansion, and concurrent shared-session use. Full addon 
suite green (154 passed, 3 skipped) on Linux aarch64.


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