mlonmcu.flow.tvm package
Subpackages
- mlonmcu.flow.tvm.backend package
- Submodules
- mlonmcu.flow.tvm.backend.backend module
TVMBackend
TVMBackend.DEFAULTS
TVMBackend.FEATURES
TVMBackend.OPTIONAL
TVMBackend.REQUIRED
TVMBackend.custom_unroll
TVMBackend.desired_layout
TVMBackend.desired_layout_map
TVMBackend.desired_layout_ops
TVMBackend.disable_vectorize
TVMBackend.disabled_passes
TVMBackend.dump
TVMBackend.extra_target_details
TVMBackend.extra_targets
TVMBackend.generate()
TVMBackend.generate_wrapper
TVMBackend.get_graph_and_params_from_mlf()
TVMBackend.get_target_details()
TVMBackend.get_tuning_records()
TVMBackend.get_tvmc_compile_args()
TVMBackend.invoke_tvmc()
TVMBackend.invoke_tvmc_compile()
TVMBackend.load_model()
TVMBackend.name
TVMBackend.needs_target
TVMBackend.num_threads
TVMBackend.opt_level
TVMBackend.pass_config
TVMBackend.print_outputs
TVMBackend.refresh_model_info
TVMBackend.registry
TVMBackend.relay_debug
TVMBackend.set_tuning_records()
TVMBackend.target_device
TVMBackend.target_keys
TVMBackend.target_mabi
TVMBackend.target_march
TVMBackend.target_mattr
TVMBackend.target_mcpu
TVMBackend.target_model
TVMBackend.target_mtriple
TVMBackend.target_num_cores
TVMBackend.tophub_url
TVMBackend.tvm_build_dir
TVMBackend.tvm_configs_dir
TVMBackend.tvm_pythonpath
TVMBackend.tvmc_custom_script
TVMBackend.tvmc_extra_args
TVMBackend.use_tlcpack
TVMBackend.use_tuning_results
- mlonmcu.flow.tvm.backend.model_info module
ModelInfo
ONNXModelInfo
PBModelInfo
PaddleModelInfo
RelayModelInfo
RelayTensorInfo
TensorInfo
TfLiteModelInfo
TfLiteTensorInfo
get_fallback_model_info()
get_model_format()
get_model_info()
get_onnx_model_info()
get_paddle_model_info()
get_pb_model_info()
get_relay_model_info()
get_supported_formats()
get_tfgraph_inout()
get_tflite_model_info()
parse_relay_main()
shape_from_str()
- mlonmcu.flow.tvm.backend.python_utils module
- mlonmcu.flow.tvm.backend.tuner module
- mlonmcu.flow.tvm.backend.tvmaot module
- mlonmcu.flow.tvm.backend.tvmaotplus module
- mlonmcu.flow.tvm.backend.tvmc_utils module
check_allowed()
gen_extra_target_details_args()
gen_target_details_args()
get_bench_tvmc_args()
get_data_tvmc_args()
get_desired_layout_args()
get_disabled_pass_tvmc_args()
get_input_shapes_tvmc_args()
get_pass_config_tvmc_args()
get_rpc_tvmc_args()
get_runtime_executor_tvmc_args()
get_target_tvmc_args()
get_tuning_records_tvmc_args()
get_tvmaot_tvmc_args()
get_tvmrt_tvmc_args()
- mlonmcu.flow.tvm.backend.tvmcg module
- mlonmcu.flow.tvm.backend.tvmllvm module
- mlonmcu.flow.tvm.backend.tvmrt module
- mlonmcu.flow.tvm.backend.wrapper module
- Module contents
TVMAOTBackend
TVMAOTPlusBackend
TVMBackend
TVMBackend.DEFAULTS
TVMBackend.FEATURES
TVMBackend.OPTIONAL
TVMBackend.REQUIRED
TVMBackend.custom_unroll
TVMBackend.desired_layout
TVMBackend.desired_layout_map
TVMBackend.desired_layout_ops
TVMBackend.disable_vectorize
TVMBackend.disabled_passes
TVMBackend.dump
TVMBackend.extra_target_details
TVMBackend.extra_targets
TVMBackend.generate()
TVMBackend.generate_wrapper
TVMBackend.get_graph_and_params_from_mlf()
TVMBackend.get_target_details()
TVMBackend.get_tuning_records()
TVMBackend.get_tvmc_compile_args()
TVMBackend.invoke_tvmc()
TVMBackend.invoke_tvmc_compile()
TVMBackend.load_model()
TVMBackend.name
TVMBackend.needs_target
TVMBackend.num_threads
TVMBackend.opt_level
TVMBackend.pass_config
TVMBackend.print_outputs
TVMBackend.refresh_model_info
TVMBackend.registry
TVMBackend.relay_debug
TVMBackend.set_tuning_records()
TVMBackend.target_device
TVMBackend.target_keys
TVMBackend.target_mabi
TVMBackend.target_march
TVMBackend.target_mattr
TVMBackend.target_mcpu
TVMBackend.target_model
TVMBackend.target_mtriple
TVMBackend.target_num_cores
TVMBackend.tophub_url
TVMBackend.tvm_build_dir
TVMBackend.tvm_configs_dir
TVMBackend.tvm_pythonpath
TVMBackend.tvmc_custom_script
TVMBackend.tvmc_extra_args
TVMBackend.use_tlcpack
TVMBackend.use_tuning_results
TVMCGBackend
TVMLLVMBackend
TVMRTBackend
Submodules
mlonmcu.flow.tvm.framework module
Definitions for TVMFramework.
- class mlonmcu.flow.tvm.framework.TVMFramework(features=None, config=None)[source]
Bases:
Framework
TVM Framework specialization.
- DEFAULTS = {'crt_config_dir': '/home/runner/work/mlonmcu/mlonmcu/mlonmcu/../resources/frameworks/tvm/crt_config', 'extra_incs': [], 'extra_libs': []}
- FEATURES = {'cmsisnnbyoc', 'muriscvnnbyoc'}
- REQUIRED = {'tvm.src_dir'}
- property crt_config_dir
- property extra_incs
- property extra_libs
- name = 'tvm'
- property tvm_src
Module contents
TVM framework module.
- class mlonmcu.flow.tvm.TVMAOTBackend(runtime='crt', fmt='mlf', system_lib=False, features=None, config=None)[source]
Bases:
TVMBackend
- DEFAULTS = {'alignment_bytes': 16, 'arena_size': None, 'autotuned_mode': None, 'autotuned_results_file': None, 'custom_unroll': False, 'debug_arena': False, 'desired_layout': None, 'desired_layout_map': None, 'desired_layout_ops': None, 'disable_vectorize': 'auto', 'disabled_passes': [], 'dump': [], 'extra_pass_config': {'tir.usmp.enable': False}, 'extra_target_details': None, 'extra_targets': None, 'generate_wrapper': 'auto', 'num_threads': 4, 'opt_level': 3, 'print_outputs': False, 'refresh_model_info': False, 'relay_debug': None, 'target_device': None, 'target_keys': None, 'target_mabi': None, 'target_march': None, 'target_mattr': None, 'target_mcpu': None, 'target_model': None, 'target_mtriple': None, 'target_num_cores': None, 'tophub_url': None, 'tvmc_custom_script': None, 'tvmc_extra_args': [], 'unpacked_api': False, 'use_tuning_results': False}
- FEATURES = {'autotuned', 'cmsisnnbyoc', 'debug_arena', 'disable_legalize', 'fuse_ops', 'moiopt', 'muriscvnnbyoc', 'uma_backends', 'unpacked_api', 'usmp'}
- property alignment_bytes
- property arena_size
- property debug_arena
- name = 'tvmaot'
- property unpacked_api
- class mlonmcu.flow.tvm.TVMAOTPlusBackend(runtime='crt', fmt='mlf', system_lib=False, features=None, config=None)[source]
Bases:
TVMAOTBackend
- DEFAULTS = {'alignment_bytes': 16, 'arena_size': 0, 'autotuned_mode': None, 'autotuned_results_file': None, 'custom_unroll': False, 'debug_arena': False, 'desired_layout': None, 'desired_layout_map': None, 'desired_layout_ops': None, 'disable_vectorize': 'auto', 'disabled_passes': [], 'dump': [], 'extra_pass_config': {'tir.usmp.algorithm': 'hill_climb', 'tir.usmp.enable': True}, 'extra_target_details': None, 'extra_targets': None, 'generate_wrapper': 'auto', 'num_threads': 4, 'opt_level': 3, 'print_outputs': False, 'refresh_model_info': False, 'relay_debug': None, 'target_device': None, 'target_keys': None, 'target_mabi': None, 'target_march': None, 'target_mattr': None, 'target_mcpu': None, 'target_model': None, 'target_mtriple': None, 'target_num_cores': None, 'tophub_url': None, 'tvmc_custom_script': None, 'tvmc_extra_args': [], 'unpacked_api': True, 'use_tuning_results': False}
- name = 'tvmaotplus'
- class mlonmcu.flow.tvm.TVMCGBackend(runtime='crt', fmt='mlf', system_lib=True, features=None, config=None)[source]
Bases:
TVMRTBackend
- REQUIRED = {'utvmcg.exe'}
- name = 'tvmcg'
- class mlonmcu.flow.tvm.TVMRTBackend(runtime='crt', fmt='mlf', system_lib=True, features=None, config=None)[source]
Bases:
TVMBackend
- DEFAULTS = {'arena_size': 1048576, 'autotuned_mode': None, 'autotuned_results_file': None, 'custom_unroll': False, 'debug_arena': False, 'desired_layout': None, 'desired_layout_map': None, 'desired_layout_ops': None, 'disable_vectorize': 'auto', 'disabled_passes': [], 'dump': [], 'extra_pass_config': {}, 'extra_target_details': None, 'extra_targets': None, 'generate_wrapper': 'auto', 'num_threads': 4, 'opt_level': 3, 'print_outputs': False, 'refresh_model_info': False, 'relay_debug': None, 'target_device': None, 'target_keys': None, 'target_mabi': None, 'target_march': None, 'target_mattr': None, 'target_mcpu': None, 'target_model': None, 'target_mtriple': None, 'target_num_cores': None, 'tophub_url': None, 'tvmc_custom_script': None, 'tvmc_extra_args': [], 'use_tuning_results': False}
- FEATURES = {'autotuned', 'cmsisnnbyoc', 'debug_arena', 'disable_legalize', 'fuse_ops', 'moiopt', 'muriscvnnbyoc', 'uma_backends'}
- property arena_size
- property debug_arena
- name = 'tvmrt'