Skip to content
Prev 393795 / 398502 Next

dyn.load(now = FALSE) not actually lazy?

According to the help page for dyn.load, I think this is within the 
allowed behaviour:

"now:
a logical controlling whether all symbols are resolved (and relocated) 
immediately the library is loaded or deferred until they are used. This 
control is useful for developers testing whether a library is complete 
and has all the necessary symbols, and for users to ignore missing 
symbols. Whether this has any effect is system-dependent."

It appears to be intended for a DLL that doesn't define all the symbols 
that your program will use, not for a DLL that has external references 
that can't be resolved.  And there's that last sentence.

I think for what you want, you'd have to write the DLL (i.e. libtorch) 
in such a way that it does delayed loading of its dependencies.

Duncan Murdoch
On 31/01/2023 10:16 p.m., Michael Milton wrote: