aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/backend/registry.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mlia/backend/registry.py')
-rw-r--r--src/mlia/backend/registry.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mlia/backend/registry.py b/src/mlia/backend/registry.py
index 6a0da74..988c8c3 100644
--- a/src/mlia/backend/registry.py
+++ b/src/mlia/backend/registry.py
@@ -1,4 +1,4 @@
-# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
+# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Backend module."""
from mlia.backend.config import BackendConfiguration
@@ -6,3 +6,15 @@ from mlia.utils.registry import Registry
# All supported targets are required to be registered here.
registry = Registry[BackendConfiguration]()
+
+
+def get_supported_backends() -> list:
+ """Get a list of all backends supported by the backend manager."""
+ return sorted(list(registry.items.keys()))
+
+
+def get_supported_systems() -> dict:
+ """Get a list of all systems supported by the backend manager."""
+ return {
+ backend: config.supported_systems for backend, config in registry.items.items()
+ }