junrushao opened a new pull request, #15594: URL: https://github.com/apache/tvm/pull/15594
This PR introduces a DSOLibrary cache that ensures a DSO library is only dlopen-ed once in a single process. This guard is less useful per se as Linux already provides such guanratee backed by reference counter: > If the same library is loaded again with dlopen(), the same file handle > is returned. The dl library maintains reference counts for library > handles, so a dynamic library is not deallocated until dlclose() has > been called on it as many times as dlopen() has succeeded on it. The > _init() routine, if present, is only called once. But a subsequent call > with RTLD_NOW may force symbol resolution for a library earlier loaded > with RTLD_LAZY. Link: https://linux.die.net/man/3/dlopen. However, it will help TVM metadata to be more properly handled at loading time in a multi-threading environment. -- 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]
