afe.backends.apu.tvm_apu_compiler

Compilation of Relay IR to object code for the TVM runtime.

Classes

LibType

An object file format that can be produced by TVM.

CompiledTVMObjectFile

A reference to an object file that was compiled by TVM.

Functions

compile_to_arm(→ CompiledTVMObjectFile)

Compile a TVM IRModule to ARM code that can be executed using the TVM runtime.

Module Contents

class afe.backends.apu.tvm_apu_compiler.LibType[source]

An object file format that can be produced by TVM.

shared_object = '.so'[source]
tar = '.tar'[source]
class afe.backends.apu.tvm_apu_compiler.CompiledTVMObjectFile[source]

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.

tvm_target: str[source]
path: str[source]
afe.backends.apu.tvm_apu_compiler.compile_to_arm(model: tvm.ir.module.IRModule, filename: str, lib_type: LibType) CompiledTVMObjectFile[source]

Compile a TVM IRModule to ARM code that can be executed using the TVM runtime.

Parameters:
  • model – Relay IR module to compile

  • filename – Name of file to create

  • lib_type – Object code format to use

Returns:

A reference to the compiled file