Model Compiler API Reference
The Model Compiler exposes the afe Python package, which the SiMa.ai Neat toolchain uses to import, quantize, simulate, and compile models into the MPK format consumed by the runtime. The pages below are auto-generated from the afe.apis source via griffe; each module page lists the classes, functions, and constants it exports along with their signatures.
Compilation
Drive a compilation job end-to-end, from a calibrated network to MPK artifacts.
afe.apis.compilation_job— 1 class, 1 function The API for controlling a compilation job. This API is intended for use in a user-defined module that is passed to the command-line interface.afe.apis.compilation_job_base— 3 constants Shared data type definitions related to compilation jobs.afe.apis.compile— 1 function Load a YAML file and use the JSON and npz file that are referred in the YAML to load the pre-calibrated AwesomeNet, quantize it, and generate MLC files.
Model Lifecycle
Load, save, execute, and quantize models in AFE's internal representation.
afe.apis.loaded_net— 1 class, 1 function, 1 constantafe.apis.model— 1 class
Versioned Public APIs
Stable and pre-release surfaces for importing, quantizing, executing, and simulating models. New integrations should target the release API and migrate forward; the pre-release API exposes experimental capabilities ahead of stabilization.
afe.apis.release_v1— 3 functions This is the development API for AFE. It supports importing models, loading and storing AFE's internal format, quantizing, executing, and simulating.afe.apis.prerelease_v1— 13 functions This is the pre-release API for AFE. It supports importing models, loading and storing AFE's internal format, quantizing, executing, and simulating.
Execution & Analysis
Simulate compiled models and analyze tensor statistics.
afe.apis.simulate— 1 function Load a YAML file and use the MLC files referred in the YAML to generate the trace files.afe.apis.statistic— 6 functions, 1 constant Analysis of statistics on tensors.
Transforms
Pre- and post-processing tensor transformations that can be attached to a model's inputs or outputs.
afe.apis.transform— 1 class, 21 functions Tensor transformations that can be applied to a model's input or output.
Types & Error Handling
Shared type definitions, error-handling controls, and internal exception sanitization used across the AFE APIs.
afe.apis.defines— 15 classes, 3 functions, 8 constants This file contains definitions of the types exposed by the development API for AFE.afe.apis.error_handling_variables— 1 function, 2 constantsafe.apis._sanitize_errors— 3 functions