aboutsummaryrefslogtreecommitdiff
path: root/src/mlia/core/helpers.py
blob: d10ea5d781e94a0179d9f67a27fdf355d75496fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
"""Module for various helper classes."""
# pylint: disable=no-self-use, unused-argument
from typing import Any
from typing import List


class ActionResolver:
    """Helper class for generating actions (e.g. commands with parameters)."""

    def apply_optimizations(self, **kwargs: Any) -> List[str]:
        """Return action details for applying optimizations."""
        return []

    def supported_operators_info(self) -> List[str]:
        """Return action details for generating supported ops report."""
        return []

    def check_performance(self) -> List[str]:
        """Return action details for checking performance."""
        return []

    def check_operator_compatibility(self) -> List[str]:
        """Return action details for checking op compatibility."""
        return []

    def operator_compatibility_details(self) -> List[str]:
        """Return action details for getting more information about op compatibility."""
        return []

    def optimization_details(self) -> List[str]:
        """Return action detail for getting information about optimizations."""
        return []


class APIActionResolver(ActionResolver):
    """Helper class for the actions performed through API."""