Loads a DALI plugin, containing one or more operators. Args: library_path: Path to the plugin library (relative or absolute) global_symbols: If ``True``, the library is loaded with ``RTLD_GLOBAL`` flag or equivalent; otherwise ``RTLD_LOCAL`` is used. Some libraries (
(library_path: str, global_symbols: bool = False)
| 17 | |
| 18 | |
| 19 | def load_library(library_path: str, global_symbols: bool = False): |
| 20 | """Loads a DALI plugin, containing one or more operators. |
| 21 | |
| 22 | Args: |
| 23 | library_path: Path to the plugin library (relative or absolute) |
| 24 | global_symbols: If ``True``, the library is loaded with ``RTLD_GLOBAL`` flag or equivalent; |
| 25 | otherwise ``RTLD_LOCAL`` is used. Some libraries (for example Halide) require being |
| 26 | loaded with ``RTLD_GLOBAL`` - use this setting if your plugin uses any such library. |
| 27 | |
| 28 | Returns: |
| 29 | None. |
| 30 | |
| 31 | Raises: |
| 32 | RuntimeError: when unable to load the library. |
| 33 | """ |
| 34 | b.LoadLibrary(library_path, global_symbols) |
| 35 | ops.Reload() |
| 36 | |
| 37 | |
| 38 | def load_directory(plugin_dir_path: str, global_symbols: bool = False): |
nothing calls this directly
no test coverage detected