mlonmcu.feature package

Submodules

mlonmcu.feature.feature module

MLonMCU Features API

class mlonmcu.feature.feature.BackendFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Backend related feature

add_backend_config(backend, config)[source]
feature_type = 4
get_backend_config(backend)[source]
class mlonmcu.feature.feature.Feature(name, features=None, config=None)[source]

Bases: FeatureBase

Feature of unknown type

feature_type = 0
class mlonmcu.feature.feature.FeatureBase(name, features=None, config=None)[source]

Bases: ABC

Feature base class

DEFAULTS = {'enabled': True}
OPTIONAL = {}
REQUIRED = {}
property enabled
feature_type = None
remove_config_prefix(config)[source]
scope = None
classmethod types()[source]

Find out which types the features is based on.

class mlonmcu.feature.feature.FrameworkFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Framework related feature

add_framework_config(framework, config)[source]
feature_type = 3
get_framework_config(framework)[source]
class mlonmcu.feature.feature.FrontendFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Frontend related feature

add_frontend_config(frontend, config)[source]
feature_type = 2
get_frontend_config(frontend)[source]
update_formats(frontend, input_formats, output_formats)[source]
class mlonmcu.feature.feature.PlatformFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Platform/Compile related feature

add_platform_config(platform, config)[source]
add_platform_defs(platform, defs)[source]
feature_type = 6
get_platform_config(platform)[source]
get_platform_defs(platform)[source]
class mlonmcu.feature.feature.RunFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Run related feature

add_run_config(config)[source]
feature_type = 7
get_run_config()[source]
class mlonmcu.feature.feature.SetupFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Setup/Cache related feature

add_required_cache_flags(required_flags)[source]
add_setup_config(config)[source]
feature_type = 1
get_required_cache_flags()[source]
get_setup_config()[source]
class mlonmcu.feature.feature.TargetFeature(name, features=None, config=None)[source]

Bases: FeatureBase

Target related feature

add_target_callbacks(target, pre_callbacks, post_callbacks)[source]
add_target_config(target, config)[source]
feature_type = 5
get_target_callbacks(target)[source]
get_target_config(target)[source]

mlonmcu.feature.features module

Definition of MLonMCU features and the feature registry.

class mlonmcu.feature.features.HpmCounter(name, features=None, config=None)[source]

Bases: TargetFeature, PlatformFeature

Use RISC-V Performance Counters

DEFAULTS = {'counter_names': [], 'enabled': True, 'enabled_counters': [], 'num_counters': 32, 'supported_counters': 1}
property counter_names
property enabled_counters
get_platform_defs(platform)[source]
get_target_callbacks(target)[source]
property num_counters
property supported_counters
class mlonmcu.feature.features.TVMTuneBase(name, features=None, config=None)[source]

Bases: PlatformFeature

DEFAULTS = {'append': None, 'early_stopping': None, 'enabled': True, 'max_parallel': None, 'num_workers': None, 'results_file': None, 'tasks': None, 'timeout': None, 'trials': None, 'trials_single': None, 'use_rpc': None, 'visualize': None, 'visualize_file': None, 'visualize_live': None}
property append
property early_stopping
get_platform_config(platform)[source]
property max_parallel
property num_workers
property results_file
property tasks
property timeout
property trials
property trials_single
property use_rpc
property visualize
property visualize_file
property visualize_live
mlonmcu.feature.features.get_available_feature_names(feature_type=None)[source]

Utility for getting feature names.

mlonmcu.feature.features.get_available_features(feature_type=None, feature_name=None, deps=False)[source]

Utility for looking up features.

mlonmcu.feature.features.get_matching_features(features, feature_type)[source]
mlonmcu.feature.features.register_feature(name, depends=None)[source]

Decorator for adding a feature to the global registry.

mlonmcu.feature.type module

class mlonmcu.feature.type.FeatureType(value)[source]

Bases: Enum

Enumeration for Feature types.

BACKEND = 4
FRAMEWORK = 3
FRONTEND = 2
OTHER = 0
PLATFORM = 6
RUN = 7
SETUP = 1
TARGET = 5

Module contents