mlonmcu.platform.mlif package

Submodules

mlonmcu.platform.mlif.mlif module

MLIF Platform

class mlonmcu.platform.mlif.mlif.MlifPlatform(features=None, config=None)[source]

Bases: CompilePlatform, TargetPlatform

Model Library Interface Platform class.

DEFAULTS = {'build_dir': None, 'debug': False, 'debug_symbols': False, 'fail_on_error': False, 'fuse_ld': None, 'garbage_collect': True, 'goal': 'generic_mlonmcu', 'ignore_data': True, 'input_data_path': None, 'lto': False, 'mem_only': False, 'model_support_dir': None, 'num_threads': 4, 'optimize': None, 'output_data_path': None, 'prebuild_lib_path': None, 'print_outputs': False, 'skip_check': False, 'slim_cpp': True, 'strip_strings': False, 'template': 'ml_interface', 'toolchain': 'gcc', 'verbose_makefile': False}
FEATURES = {'arm_dsp', 'arm_mvei', 'auto_vectorize', 'benchmark', 'cmsisnn', 'cmsisnnbyoc', 'debug', 'muriscvnn', 'muriscvnnbyoc', 'pext', 'validate', 'vext', 'xpulp'}
OPTIONAL = {'llvm.install_dir', 'srecord.install_dir'}
REQUIRED = {'mlif.src_dir'}
close()[source]
compile(target, src=None, model=None, data_file=None)[source]
configure(target, src, _model)[source]
create_target(name)[source]
property debug_symbols
property fail_on_error
property fuse_ld
property garbage_collect
gen_data_artifact()[source]
generate(src, target, model=None) Tuple[dict, dict][source]
get_cmake_args()[source]
get_definitions()[source]
get_supported_targets()[source]
property goal
property ignore_data
init_directory(path=None, context=None)[source]
property input_data_path
property llvm_dir
property lto
property mem_only
property mlif_dir
property model_support_dir
property optimize
property output_data_path
property prebuild_lib_dir
prepare()[source]
prepare_environment()[source]
property skip_check
property slim_cpp
property srecord_dir
property strip_strings
property template
property toolchain
property validate_outputs
property verbose_makefile

mlonmcu.platform.mlif.mlif_target module

class mlonmcu.platform.mlif.mlif_target.MlifExitCode(value)[source]

Bases: IntEnum

An enumeration.

ERROR = 16
INVALID_SIZE = 17
OUTPUT_MISSMATCH = 18
classmethod values()[source]
mlonmcu.platform.mlif.mlif_target.create_mlif_platform_target(name, platform, base=<class 'mlonmcu.target.target.Target'>)[source]
mlonmcu.platform.mlif.mlif_target.get_mlif_platform_targets()[source]

Module contents

MLonMCU MLIF platform

class mlonmcu.platform.mlif.MlifPlatform(features=None, config=None)[source]

Bases: CompilePlatform, TargetPlatform

Model Library Interface Platform class.

DEFAULTS = {'build_dir': None, 'debug': False, 'debug_symbols': False, 'fail_on_error': False, 'fuse_ld': None, 'garbage_collect': True, 'goal': 'generic_mlonmcu', 'ignore_data': True, 'input_data_path': None, 'lto': False, 'mem_only': False, 'model_support_dir': None, 'num_threads': 4, 'optimize': None, 'output_data_path': None, 'prebuild_lib_path': None, 'print_outputs': False, 'skip_check': False, 'slim_cpp': True, 'strip_strings': False, 'template': 'ml_interface', 'toolchain': 'gcc', 'verbose_makefile': False}
FEATURES = {'arm_dsp', 'arm_mvei', 'auto_vectorize', 'benchmark', 'cmsisnn', 'cmsisnnbyoc', 'debug', 'muriscvnn', 'muriscvnnbyoc', 'pext', 'validate', 'vext', 'xpulp'}
OPTIONAL = {'llvm.install_dir', 'srecord.install_dir'}
REQUIRED = {'mlif.src_dir'}
close()[source]
compile(target, src=None, model=None, data_file=None)[source]
configure(target, src, _model)[source]
create_target(name)[source]
property debug_symbols
property fail_on_error
property fuse_ld
property garbage_collect
gen_data_artifact()[source]
generate(src, target, model=None) Tuple[dict, dict][source]
get_cmake_args()[source]
get_definitions()[source]
get_supported_targets()[source]
property goal
property ignore_data
init_directory(path=None, context=None)[source]
property input_data_path
property llvm_dir
property lto
property mem_only
property mlif_dir
property model_support_dir
property optimize
property output_data_path
property prebuild_lib_dir
prepare()[source]
prepare_environment()[source]
property skip_check
property slim_cpp
property srecord_dir
property strip_strings
property template
property toolchain
property validate_outputs
property verbose_makefile