afe.backends.apu.tvm_apu_compiler ================================= .. py:module:: afe.backends.apu.tvm_apu_compiler .. autoapi-nested-parse:: Compilation of Relay IR to object code for the TVM runtime. Classes ------- .. autoapisummary:: afe.backends.apu.tvm_apu_compiler.LibType afe.backends.apu.tvm_apu_compiler.CompiledTVMObjectFile Functions --------- .. autoapisummary:: afe.backends.apu.tvm_apu_compiler.compile_to_arm Module Contents --------------- .. py:class:: LibType An object file format that can be produced by TVM. .. py:attribute:: shared_object :value: '.so' .. py:attribute:: tar :value: '.tar' .. py:class:: CompiledTVMObjectFile A reference to an object file that was compiled by TVM. The file path must be relative to the directory where all the model compilation's output files are written. The TVM target string is saved for error checking and diagnostics. .. py:attribute:: tvm_target :type: str .. py:attribute:: path :type: str .. py:function:: compile_to_arm(model: tvm.ir.module.IRModule, filename: str, lib_type: LibType) -> CompiledTVMObjectFile Compile a TVM IRModule to ARM code that can be executed using the TVM runtime. :param model: Relay IR module to compile :param filename: Name of file to create :param lib_type: Object code format to use :return: A reference to the compiled file