aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/DynamicBackendUtils.cpp
AgeCommit message (Collapse)Author
2019-08-23Fix Windows build:Rob Hughes
* CMake "install" commands require a RUNTIME argument for platforms with DLLs (e.g. Windows). * Replace use of non-standard variable length array with vector * Remove unnecessary #include of unistd.h * Add #ifdefs to dynamic backend code to disable for non-Unix platforms where you can't use dlopen etc. We could implement this properly for Windows later using LoadLibrary etc., but for now erroring is fine. * Add missing #include of <algorithm> Change-Id: Ic8ef5fd599b37bf8772510157b6e479819f6a1eb
2019-08-19IVGCVSW-3545 Update the device specs with the dynamic backend idsMatteo Martincigh
* Now the utility function RegisterDynamicBackends returns a list of the backend ids that have been registered * The list of registered ids is added to the list of supported backends in the Runtime * Added unit tests Change-Id: I97bbe1f680920358f5baba5a4666e4983b849cac Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-08-12IVGCVSW-3541 Treat an empty list of backend paths as a special caseMatteo Martincigh
* Silently considering the dynamic backend loading feature as disabled if an empty list of paths is passed to ArmNN * This was causing problems during testing as ArmNN's output was containing extra unnecessary warning messages Change-Id: I4ebda412004179817cd54494ccddc964b04b8232 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-08-09IVGCVSW-3596 Register the dynamic backends in the BackendRegistryMatteo Martincigh
* Added getter for the factory function in the DynamicBackend class * Added new RegisterDynamicBackends method in utils class * Added dynamic backend registration process in the Runtime class * Added new dummy dynamic backend objects for testing * Added unit tests for dynamic backend registration * Added convenience methods to BackendId Change-Id: I01e147d1d6f01bf56747ad946f73f867af5770c4 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-08-07IVGCVSW-3595 Implement the LoadDynamicBackends function in the Runtime classMatteo Martincigh
* Changed the way the handle is acquired, loaded symbols are now kept local * Updated the makefiles to add more test files for the dynamic backends * Fixed the GetSharedObjects method so that the files are parsed in alphabetical order * Updated the unit tests to make them more strict wrt the order of the files * Created a new CreateDynamicBackends method in the utils class * Added new unit tests for the new function * Added LoadDynamicBackends in the Runtime class !android-nn-driver:1707 Change-Id: I1ef9ff3d5455ca6a7fd51cb7cfb3819686234f70 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-08-05IVGCVSW-3599 Create the GetSharedObjects method in DynamicBackendUtilsJan Eilers
* Added GetSharedObjects to DynamicBackendUtils * Goes through the given paths and returns a list of files that match the naming scheme for dynamic backends * Added unit test * Update the cmake file to generate the test files/symlinks Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: Ibfc0bad740b72696714d343eb32a593c2ec1f8c6
2019-08-05IVGCVSW-3541 Get the paths where to load the dynamic backends fromMatteo Martincigh
* Adds GetBackendPaths and IsPathValid to DynamicBackendUtils * Adds related unit tests Change-Id: I94e377d92a88a4b5d48026f6ad5b4d5387d20c21 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-07-25IVGCVSW-3543 Implement the backend versioning algorithmMatteo Martincigh
* Added version structure for backends, with comparisons operators * Added version to IBackendInternal * Added version utility function to DynamicBackendUtils class Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I3697469675c27f79f7cfb296cfa69ec7e06375e5
2019-07-25IVGCVSW-3555 Fix string formatting in DynamicBackendUtilsMatteo Martincigh
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I97d5fe93e1448778fc020fd6fbd5a47a3f5e7235
2019-07-24IVGCVSW-3563 + IVGCVSW-3555 Create new utility functions for dynamic backendsMatteo Martincigh
* Created new DynamicBackendUtils class * Added OpenHandle, CloseHandle, GetEntryPoint and GetDlError methods to it Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I88c683b2c5d37968a9ebdf335be932ae2d9061e5