aot_operator
Classes
AotOperator
AotOperator(ident: int, op: OperatorT, model: ModelT, subgraph: SubGraphT, prefix: str = 'aot', attributes: dict[str, str] = {})
Base class for all AOT operators.
This class provides a common interface for all operators in the HeliosAOT framework.
Parameters:
-
ident
int
) –Operator identifier.
-
op
OperatorT
) –Operator object from LiteRT model.
-
model
ModelT
) –LiteRT model object.
-
subgraph
SubGraphT
) –Subgraph object from LiteRT model.
-
prefix
str
, default:'aot'
) –Prefix for generated files. Defaults to "aot".
-
attributes
dict[str, str]
, default:{}
) –Attributes for template values. Defaults to {}.
Attributes
Functions
validate
Validate the operator. This method should be overridden by subclasses.
Returns:
-
bool
(bool
) –True if the operator configuration is valid/supported, False otherwise.
compute_scratch_size
compute_values
generate_source_code
Generate the source code for the operator.
This method should be overridden by subclasses.
Parameters:
-
save_path
Path
) –Path to save the generated source code.