mlonmcu package
Subpackages
- mlonmcu.cli package
- Subpackages
- Submodules
- mlonmcu.cli.build module
- mlonmcu.cli.cleanup module
- mlonmcu.cli.common module
- mlonmcu.cli.compile module
- mlonmcu.cli.env module
- mlonmcu.cli.export module
- mlonmcu.cli.flow module
- mlonmcu.cli.init module
- mlonmcu.cli.load module
- mlonmcu.cli.main module
- mlonmcu.cli.models module
- mlonmcu.cli.run module
- mlonmcu.cli.setup module
- mlonmcu.cli.tune module
- Module contents
- mlonmcu.context package
- Submodules
- mlonmcu.context.context module
MlonMcuContext
MlonMcuContext.cleanup()
MlonMcuContext.cleanup_sessions()
MlonMcuContext.create_session()
MlonMcuContext.export()
MlonMcuContext.get_session()
MlonMcuContext.get_sessions_runs_idx()
MlonMcuContext.is_clean
MlonMcuContext.load_cache()
MlonMcuContext.load_extensions()
MlonMcuContext.lookup()
MlonMcuContext.print_summary()
get_environment_by_name()
get_environment_by_path()
get_ids()
load_recent_sessions()
lookup_environment()
resolve_environment_file()
setup_logging()
- mlonmcu.context.read_write_filelock module
- Module contents
MlonMcuContext
MlonMcuContext.cleanup()
MlonMcuContext.cleanup_sessions()
MlonMcuContext.create_session()
MlonMcuContext.export()
MlonMcuContext.get_session()
MlonMcuContext.get_sessions_runs_idx()
MlonMcuContext.is_clean
MlonMcuContext.load_cache()
MlonMcuContext.load_extensions()
MlonMcuContext.lookup()
MlonMcuContext.print_summary()
- mlonmcu.environment package
- Submodules
- mlonmcu.environment.config module
BackendConfig
BackendFeatureConfig
BaseConfig
DefaultsConfig
FeatureConfig
FeatureKind
FrameworkConfig
FrameworkFeatureConfig
FrontendConfig
FrontendFeatureConfig
PathConfig
PlatformConfig
PlatformFeatureConfig
RepoConfig
TargetConfig
TargetFeatureConfig
get_config_dir()
get_environments_dir()
get_environments_file()
get_plugins_dir()
init_config_dir()
- mlonmcu.environment.environment module
DefaultEnvironment
Environment
Environment.from_file()
Environment.get_default_backends()
Environment.get_default_frameworks()
Environment.get_default_targets()
Environment.has_backend()
Environment.has_feature()
Environment.has_framework()
Environment.has_frontend()
Environment.has_platform()
Environment.has_target()
Environment.has_toolchain()
Environment.home
Environment.lookup_backend_configs()
Environment.lookup_backend_feature_configs()
Environment.lookup_feature_configs()
Environment.lookup_framework_configs()
Environment.lookup_framework_feature_configs()
Environment.lookup_frontend_configs()
Environment.lookup_frontend_feature_configs()
Environment.lookup_path()
Environment.lookup_platform_configs()
Environment.lookup_platform_feature_configs()
Environment.lookup_target_configs()
Environment.lookup_target_feature_configs()
Environment.lookup_var()
Environment.supports_feature()
Environment.to_file()
UserEnvironment
- mlonmcu.environment.init module
- mlonmcu.environment.list module
- mlonmcu.environment.loader module
- mlonmcu.environment.templates module
- mlonmcu.environment.writer module
- Module contents
- mlonmcu.feature package
- Submodules
- mlonmcu.feature.feature module
- mlonmcu.feature.features module
HpmCounter
TVMTuneBase
TVMTuneBase.DEFAULTS
TVMTuneBase.append
TVMTuneBase.early_stopping
TVMTuneBase.get_platform_config()
TVMTuneBase.max_parallel
TVMTuneBase.num_workers
TVMTuneBase.results_file
TVMTuneBase.tasks
TVMTuneBase.timeout
TVMTuneBase.trials
TVMTuneBase.trials_single
TVMTuneBase.use_rpc
TVMTuneBase.visualize
TVMTuneBase.visualize_file
TVMTuneBase.visualize_live
get_available_feature_names()
get_available_features()
get_matching_features()
register_feature()
- mlonmcu.feature.type module
- Module contents
- mlonmcu.flow package
- Subpackages
- Submodules
- mlonmcu.flow.backend module
Backend
Backend.DEFAULTS
Backend.FEATURES
Backend.OPTIONAL
Backend.REQUIRED
Backend.add_platform_config()
Backend.add_platform_defs()
Backend.export_artifacts()
Backend.generate()
Backend.generate_artifacts()
Backend.get_platform_config()
Backend.get_platform_defs()
Backend.has_tuner
Backend.load_model()
Backend.name
Backend.needs_target
Backend.process_features()
Backend.set_tuning_records()
Backend.supports_model()
get_parser()
init_backend_features()
main()
- mlonmcu.flow.framework module
- Module contents
- mlonmcu.models package
- Submodules
- mlonmcu.models.convert_data module
- mlonmcu.models.frontend module
CoremarkFrontend
DhrystoneFrontend
EmbenchFrontend
ExampleFrontend
Frontend
Frontend.DEFAULTS
Frontend.FEATURES
Frontend.OPTIONAL
Frontend.REQUIRED
Frontend.add_platform_config()
Frontend.add_platform_defs()
Frontend.export_artifacts()
Frontend.generate()
Frontend.generate_artifacts()
Frontend.get_platform_config()
Frontend.get_platform_defs()
Frontend.lookup_models()
Frontend.process_features()
Frontend.process_metadata()
Frontend.produce_artifacts()
Frontend.supports_formats()
Frontend.use_inout_data
LayerGenFrontend
MathisFrontend
MibenchFrontend
ONNXFrontend
PBFrontend
PackedFrontend
PaddleFrontend
PolybenchFrontend
RelayFrontend
SimpleFrontend
TaclebenchFrontend
TfLiteFrontend
TfLiteFrontend.DEFAULTS
TfLiteFrontend.FEATURES
TfLiteFrontend.OPTIONAL
TfLiteFrontend.REQUIRED
TfLiteFrontend.analyze_enable
TfLiteFrontend.analyze_script
TfLiteFrontend.generate()
TfLiteFrontend.pack_script
TfLiteFrontend.produce_artifacts()
TfLiteFrontend.split_layers
TfLiteFrontend.visualize_enable
TfLiteFrontend.visualize_script
- mlonmcu.models.group module
- mlonmcu.models.lookup module
- mlonmcu.models.metadata module
- mlonmcu.models.model module
- mlonmcu.models.options module
- mlonmcu.models.utils module
- Module contents
LayerGenFrontend
ONNXFrontend
PBFrontend
PackedFrontend
TfLiteFrontend
TfLiteFrontend.DEFAULTS
TfLiteFrontend.FEATURES
TfLiteFrontend.OPTIONAL
TfLiteFrontend.REQUIRED
TfLiteFrontend.analyze_enable
TfLiteFrontend.analyze_script
TfLiteFrontend.generate()
TfLiteFrontend.pack_script
TfLiteFrontend.produce_artifacts()
TfLiteFrontend.split_layers
TfLiteFrontend.visualize_enable
TfLiteFrontend.visualize_script
print_summary()
- mlonmcu.platform package
- Submodules
- mlonmcu.platform.espidf module
EspIdfPlatform
EspIdfPlatform.DEFAULTS
EspIdfPlatform.FEATURES
EspIdfPlatform.REQUIRED
EspIdfPlatform.baud
EspIdfPlatform.check()
EspIdfPlatform.close()
EspIdfPlatform.compile()
EspIdfPlatform.create_target()
EspIdfPlatform.espidf_install_dir
EspIdfPlatform.espidf_src_dir
EspIdfPlatform.flash()
EspIdfPlatform.flash_only
EspIdfPlatform.generate()
EspIdfPlatform.get_idf_cmake_args()
EspIdfPlatform.get_idf_serial_args()
EspIdfPlatform.get_supported_targets()
EspIdfPlatform.idf_exe
EspIdfPlatform.init_directory()
EspIdfPlatform.invoke_idf_exe()
EspIdfPlatform.monitor()
EspIdfPlatform.port
EspIdfPlatform.prepare()
EspIdfPlatform.project_template
EspIdfPlatform.use_idf_monitor
EspIdfPlatform.wait_for_user
- mlonmcu.platform.espidf_target module
- mlonmcu.platform.lookup module
- mlonmcu.platform.microtvm module
- mlonmcu.platform.microtvm_backend module
- mlonmcu.platform.microtvm_target module
- mlonmcu.platform.mlif module
MlifPlatform
MlifPlatform.DEFAULTS
MlifPlatform.FEATURES
MlifPlatform.OPTIONAL
MlifPlatform.REQUIRED
MlifPlatform.close()
MlifPlatform.compile()
MlifPlatform.configure()
MlifPlatform.create_target()
MlifPlatform.debug_symbols
MlifPlatform.fail_on_error
MlifPlatform.fuse_ld
MlifPlatform.garbage_collect
MlifPlatform.gen_data_artifact()
MlifPlatform.generate()
MlifPlatform.get_cmake_args()
MlifPlatform.get_definitions()
MlifPlatform.get_supported_targets()
MlifPlatform.goal
MlifPlatform.ignore_data
MlifPlatform.init_directory()
MlifPlatform.input_data_path
MlifPlatform.llvm_dir
MlifPlatform.lto
MlifPlatform.mem_only
MlifPlatform.mlif_dir
MlifPlatform.model_support_dir
MlifPlatform.optimize
MlifPlatform.output_data_path
MlifPlatform.prebuild_lib_dir
MlifPlatform.prepare()
MlifPlatform.prepare_environment()
MlifPlatform.skip_check
MlifPlatform.slim_cpp
MlifPlatform.srecord_dir
MlifPlatform.strip_strings
MlifPlatform.template
MlifPlatform.toolchain
MlifPlatform.unroll_loops
MlifPlatform.validate_outputs
MlifPlatform.verbose_makefile
- mlonmcu.platform.mlif_target module
- mlonmcu.platform.platform module
BuildPlatform
CompilePlatform
Platform
Platform.DEFAULTS
Platform.FEATURES
Platform.OPTIONAL
Platform.REQUIRED
Platform.get_supported_backends()
Platform.get_supported_targets()
Platform.init_directory()
Platform.print_outputs
Platform.process_features()
Platform.supports_build
Platform.supports_compile
Platform.supports_flash
Platform.supports_monitor
Platform.supports_tune
TargetPlatform
TunePlatform
- mlonmcu.platform.tvm module
- mlonmcu.platform.tvm_backend module
- mlonmcu.platform.tvm_target module
- mlonmcu.platform.zephyr module
ZephyrPlatform
ZephyrPlatform.DEFAULTS
ZephyrPlatform.FEATURES
ZephyrPlatform.REQUIRED
ZephyrPlatform.baud
ZephyrPlatform.build_dir
ZephyrPlatform.close()
ZephyrPlatform.compile()
ZephyrPlatform.create_target()
ZephyrPlatform.flash()
ZephyrPlatform.flash_only
ZephyrPlatform.generate()
ZephyrPlatform.get_serial()
ZephyrPlatform.get_supported_targets()
ZephyrPlatform.get_west_cmake_args()
ZephyrPlatform.init_directory()
ZephyrPlatform.invoke_west()
ZephyrPlatform.monitor()
ZephyrPlatform.optimize
ZephyrPlatform.port
ZephyrPlatform.prepare()
ZephyrPlatform.project_template
ZephyrPlatform.wait_for_user
ZephyrPlatform.zephyr_install_dir
ZephyrPlatform.zephyr_sdk_dir
ZephyrPlatform.zephyr_venv_dir
- mlonmcu.platform.zephyr_target module
- Module contents
Platform
Platform.DEFAULTS
Platform.FEATURES
Platform.OPTIONAL
Platform.REQUIRED
Platform.get_supported_backends()
Platform.get_supported_targets()
Platform.init_directory()
Platform.print_outputs
Platform.process_features()
Platform.supports_build
Platform.supports_compile
Platform.supports_flash
Platform.supports_monitor
Platform.supports_tune
get_platforms()
register_platform()
- mlonmcu.session package
- Subpackages
- Submodules
- mlonmcu.session.run module
Run
Run.DEFAULTS
Run.FEATURES
Run.OPTIONAL
Run.REQUIRED
Run.add_backend()
Run.add_backend_by_name()
Run.add_feature()
Run.add_feature_by_name()
Run.add_features()
Run.add_features_by_name()
Run.add_framework()
Run.add_frontend()
Run.add_frontend_by_name()
Run.add_frontends()
Run.add_frontends_by_name()
Run.add_model()
Run.add_model_by_name()
Run.add_platform()
Run.add_platform_by_name()
Run.add_platforms()
Run.add_platforms_by_name()
Run.add_postprocess()
Run.add_postprocess_by_name()
Run.add_postprocesses()
Run.add_postprocesses_by_name()
Run.add_target()
Run.add_target_by_name()
Run.artifacts
Run.build()
Run.build_platform
Run.compile()
Run.compile_platform
Run.copy()
Run.export()
Run.export_optional
Run.export_stage()
Run.from_file()
Run.frontend
Run.get_all_configs()
Run.get_all_feature_names()
Run.get_all_postprocess_names()
Run.get_all_sub_artifacts()
Run.get_frontend_name()
Run.get_platform_name()
Run.get_reason_text()
Run.get_report()
Run.has_stage()
Run.init_component()
Run.init_directory()
Run.last_stage
Run.load()
Run.lock()
Run.next_stage
Run.postprocess()
Run.prefix
Run.process()
Run.process_features()
Run.run()
Run.stage_subdirs
Run.target_optimized_layouts
Run.target_optimized_schedules
Run.target_platform
Run.target_to_backend
Run.toDict()
Run.tune()
Run.tune_enabled
Run.tune_platform
Run.unlock()
Run.write_run_file()
RunStage
add_any()
- mlonmcu.session.session module
Session
Session.DEFAULTS
Session.active
Session.close()
Session.create_run()
Session.discard()
Session.enumerate_runs()
Session.failing
Session.get_reports()
Session.open()
Session.prefix
Session.process_runs()
Session.report_fmt
Session.request_run_idx()
Session.runs_dir
Session.update_latest_run_symlink()
SessionStatus
- Module contents
- mlonmcu.setup package
- Submodules
- mlonmcu.setup.cache module
- mlonmcu.setup.gen_requirements module
- mlonmcu.setup.setup module
Setup
Setup.DEFAULTS
Setup.FEATURES
Setup.OPTIONAL
Setup.REQUIRED
Setup.clean_cache()
Setup.clean_dependencies()
Setup.generate_requirements()
Setup.get_dependency_order()
Setup.install_dependencies()
Setup.invoke_single_task()
Setup.process_features()
Setup.setup_progress_bar()
Setup.verbose
Setup.visualize()
Setup.write_cache_file()
Setup.write_env_file()
- mlonmcu.setup.task module
- mlonmcu.setup.tasks module
- mlonmcu.setup.utils module
- Module contents
- mlonmcu.target package
- Subpackages
- Submodules
- mlonmcu.target.common module
- mlonmcu.target.elf module
- mlonmcu.target.host_x86 module
- mlonmcu.target.metrics module
- mlonmcu.target.target module
Target
Target.DEFAULTS
Target.FEATURES
Target.OPTIONAL
Target.REQUIRED
Target.add_backend_config()
Target.add_platform_config()
Target.add_platform_defs()
Target.exec()
Target.export_artifacts()
Target.generate()
Target.generate_artifacts()
Target.get_arch()
Target.get_backend_config()
Target.get_hardware_details()
Target.get_metrics()
Target.get_platform_config()
Target.get_platform_defs()
Target.get_target_system()
Target.inspect()
Target.parse_exit()
Target.print_outputs
Target.process_features()
Target.reconfigure()
Target.repeat
- Module contents
Corstone300Target
Corstone300Target.DEFAULTS
Corstone300Target.FEATURES
Corstone300Target.REQUIRED
Corstone300Target.cmsis_dir
Corstone300Target.cmsisnn_dir
Corstone300Target.enable_dsp
Corstone300Target.enable_ethosu
Corstone300Target.enable_fpu
Corstone300Target.enable_mvei
Corstone300Target.ethosu_num_macs
Corstone300Target.ethosu_platform_dir
Corstone300Target.exec()
Corstone300Target.extra_args
Corstone300Target.fvp_exe
Corstone300Target.gcc_prefix
Corstone300Target.get_arch()
Corstone300Target.get_backend_config()
Corstone300Target.get_default_fvp_args()
Corstone300Target.get_ethosu_fvp_args()
Corstone300Target.get_metrics()
Corstone300Target.get_platform_defs()
Corstone300Target.model
Corstone300Target.parse_stdout()
Corstone300Target.timeout_sec
EtissPulpinoTarget
HostX86Target
OVPSimTarget
OVPSimTarget.DEFAULTS
OVPSimTarget.FEATURES
OVPSimTarget.REQUIRED
OVPSimTarget.end_to_end_cycles
OVPSimTarget.exec()
OVPSimTarget.extensions
OVPSimTarget.gdbserver_attach
OVPSimTarget.gdbserver_enable
OVPSimTarget.gdbserver_port
OVPSimTarget.get_backend_config()
OVPSimTarget.get_default_ovpsim_args()
OVPSimTarget.get_metrics()
OVPSimTarget.get_platform_defs()
OVPSimTarget.ovpsim_exe
OVPSimTarget.parse_stdout()
OVPSimTarget.variant
RiscvQemuTarget
RiscvQemuTarget.DEFAULTS
RiscvQemuTarget.FEATURES
RiscvQemuTarget.REQUIRED
RiscvQemuTarget.attr
RiscvQemuTarget.elen
RiscvQemuTarget.embedded_vext
RiscvQemuTarget.enable_vext
RiscvQemuTarget.exec()
RiscvQemuTarget.extensions
RiscvQemuTarget.get_cpu_str()
RiscvQemuTarget.get_metrics()
RiscvQemuTarget.get_platform_defs()
RiscvQemuTarget.get_qemu_args()
RiscvQemuTarget.get_target_system()
RiscvQemuTarget.parse_stdout()
RiscvQemuTarget.riscv32_qemu_exe
RiscvQemuTarget.vext_spec
RiscvQemuTarget.vlen
SpikeTarget
SpikeTarget.DEFAULTS
SpikeTarget.FEATURES
SpikeTarget.REQUIRED
SpikeTarget.exec()
SpikeTarget.extensions
SpikeTarget.get_backend_config()
SpikeTarget.get_metrics()
SpikeTarget.get_platform_defs()
SpikeTarget.isa
SpikeTarget.parse_stdout()
SpikeTarget.spike_exe
SpikeTarget.spike_pk
SpikeTarget.spikepk_extra_args
Target
Target.DEFAULTS
Target.FEATURES
Target.OPTIONAL
Target.REQUIRED
Target.add_backend_config()
Target.add_platform_config()
Target.add_platform_defs()
Target.exec()
Target.export_artifacts()
Target.generate()
Target.generate_artifacts()
Target.get_arch()
Target.get_backend_config()
Target.get_hardware_details()
Target.get_metrics()
Target.get_platform_config()
Target.get_platform_defs()
Target.get_target_system()
Target.inspect()
Target.parse_exit()
Target.print_outputs
Target.process_features()
Target.reconfigure()
Target.repeat
get_targets()
register_target()
Submodules
mlonmcu.artifact module
Artifacts defintions internally used to refer to intermediate results.
- class mlonmcu.artifact.Artifact(name, content=None, path=None, data=None, raw=None, fmt=ArtifactFormat.UNKNOWN, flags=None, archive=False, optional=False)[source]
Bases:
object
Artifact type.
- export(dest, extract=False)[source]
Export the artifact to a given path (file or directory) and update its path.
- property exported
Returns true if the artifact was writtem to disk.
- class mlonmcu.artifact.ArtifactFormat(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
Enumeration of artifact types.
- ARCHIVE = 13
- BIN = 11
- DATA = 6
- IMAGE = 5
- JSON = 9
- MLF = 3
- MODEL = 4
- NUMPY = 7
- PARAMS = 8
- PATH = 10
- RAW = 11
- SHARED_OBJECT = 12
- SOURCE = 1
- TEXT = 2
- UNKNOWN = 0
mlonmcu.config module
Collection of utilities to manage MLonMCU configs.
- mlonmcu.config.filter_config(config, prefix, defaults, optionals, required_keys)[source]
Filter the global config for a given component prefix.
- Returns:
- cfgdict
The filteres configuration.
- Raises:
- AssertionError: If a required key is missing.
- mlonmcu.config.remove_config_prefix(config, prefix, skip=None)[source]
Iterate over keys in dict and remove given prefix.
- Returns:
- retdict
The transformed configuration.
- mlonmcu.config.resolve_required_config(required_keys, optional=None, features=None, config=None, cache=None, hints=None, default_flags=None)[source]
Utility which iterates over a set of given config keys and resolves their values using the passed config and/or cache.
- Parameters:
- required_keysList[str]
- featuresList[Feature]
- configdict
- cacheTaskCache
Optional task cache parsed from the cache.ini file in the deps directory.
- hintsList[str]
List of additional flags which can be provided as a hint to lookup a cache config.
- default_flagsdict
User-provided mapping of cache flags for some cache entries.
- Returns:
- resultdict
mlonmcu.logging module
Loging utilities for MLonMCU
- mlonmcu.logging.get_formatter(minimal=False)[source]
Returns a log formatter for one on two predefined formats.
mlonmcu.mlonmcu module
Main module.
mlonmcu.plugins module
Utilities for MLonMCUs extension mechanism.
mlonmcu.report module
Definitions of the Report class used by MLonMCU sessions and runs.
mlonmcu.utils module
- mlonmcu.utils.ask_user(text, default: bool, yes_keys=['y', 'j'], no_keys=['n'], interactive=True)[source]
- mlonmcu.utils.get_base_prefix_compat()[source]
Get base/real prefix, or sys.prefix if there is none.
mlonmcu.version module
Version module for mlonmcu.
Module contents
Top-level package for ML on MCU.