csullivan opened a new pull request #9342:
URL: https://github.com/apache/tvm/pull/9342
Targets which compile directly to SO during codegen utilize
`runtime.module.loadfile_so` at runtime to dynamically open these compiled
binaries. This flow currently does not have any point of extension in which a
runtime can customize the behavior of the underlying LibraryModuleNode. This PR
exposes DSOLibrary and extends LibraryModuleNode to utilize a runtime defined
PackedFunctionWrapper in order to specialize the calling convention of
dynamically loaded function symbols.
This allows a device runtime to then specify a custom DSOLibrary based
loadfile implementation:
```C++
TVM_REGISTER_GLOBAL("runtime.module.loadfile_hexagon").set_body([](TVMArgs
args, TVMRetValue* rv) {
auto n = make_object<DSOLibrary>();
n->Init(args[0]);
*rv = CreateModuleFromLibrary(n, make_object<hexagon::WrapPackedFunc>());
});
```
--
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]