operator
Classes
AotOperator
AotOperator(op: AirOperator, model: AirModel, platform: SocPlatform, prefix: str = 'aot', attributes: dict[str, str] = {})
Base class for all AOT operators.
Execution flow:
1. Initialize the operator.
2. Call resolve() to validate and prepare the operator.
3. Call plan() to set up any necessary planning.
4. Call emit() to generate the operator's code.
Parameters:
-
(opAirOperator) –The AIR operator to wrap.
-
(modelAirModel) –The AIR model.
-
(platformSocPlatform) –The target platform for code generation.
-
(prefixstr, default:'aot') –Prefix for generated code files. Defaults to "aot".
-
(attributesdict[str, str], default:{}) –Attributes for template values. Defaults to {}.
Attributes
Functions
resolve
Public entry point—only runs once, even if called repeatedly.
This method validates the AIR operator and performs any model mutations needed.
compute_values
emit
Generate the source code for the operator.
This method should be overridden by subclasses.
Parameters:
-
(save_pathPath) –Path to save the generated source code.