diff options
author | Raul Farkas <raul.farkas@arm.com> | 2022-10-12 10:48:35 +0100 |
---|---|---|
committer | Raul Farkas <raul.farkas@arm.com> | 2022-10-18 14:29:23 +0100 |
commit | 4fa21325ec498adbf467876c2413c054d0e85c5b (patch) | |
tree | 892d68467bc6666e9daf74ab4d141810dcec1ac6 /src/mlia/devices/cortexa/config.py | |
parent | 89c1f4bafb51dbbed705b6960810d90825318b13 (diff) | |
download | mlia-4fa21325ec498adbf467876c2413c054d0e85c5b.tar.gz |
MLIA-409 Create new Cortex-A device skeleton
* Add Cortex-A device skeleton
* Add unit tests for the Cortex-A device skeleton
* Update profiles.json by adding the new "cortex-a" profile
* Add new cortex-a factory to the get_advisor method in api.py
* Disable performance and optimization commands for the cortex-a
profile.
* Update trademarks section in README.md
* Update pyproject.toml to not run similarity check in imports
Change-Id: I2e228aaada1e2d3c5cc329d70572b51962ff517f
Diffstat (limited to 'src/mlia/devices/cortexa/config.py')
-rw-r--r-- | src/mlia/devices/cortexa/config.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mlia/devices/cortexa/config.py b/src/mlia/devices/cortexa/config.py new file mode 100644 index 0000000..ec0cf0a --- /dev/null +++ b/src/mlia/devices/cortexa/config.py @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. +# SPDX-License-Identifier: Apache-2.0 +"""Cortex-A configuration.""" +from __future__ import annotations + +from mlia.devices.config import IPConfiguration +from mlia.utils.filesystem import get_profile + + +class CortexAConfiguration(IPConfiguration): # pylint: disable=too-few-public-methods + """Cortex-A configuration.""" + + def __init__(self, target_profile: str) -> None: + """Init Cortex-A target configuration.""" + target_data = get_profile(target_profile) + + target = target_data["target"] + if target != "cortex-a": + raise Exception(f"Wrong target {target} for Cortex-A configuration") + super().__init__(target) |