From 4fa21325ec498adbf467876c2413c054d0e85c5b Mon Sep 17 00:00:00 2001 From: Raul Farkas Date: Wed, 12 Oct 2022 10:48:35 +0100 Subject: 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 --- src/mlia/devices/cortexa/config.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/mlia/devices/cortexa/config.py (limited to 'src/mlia/devices/cortexa/config.py') 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) -- cgit v1.2.1