transform_pipeline
Classes
TransformPipeline
Holds a sequence of AotTransform instances and applies them in order.
Parameters:
-
transforms
list[AotTransform]
) –List of AotTransform instances to apply.
Functions
apply
apply(model: ModelT, subgraph: SubGraphT, operations: list[Type[AotOperator]]) -> tuple[litert.ModelT, litert.SubGraphT, list[Type[AotOperator]]]
Apply the sequence of transforms to the model, subgraph, and operations. Args: model (litert.ModelT): The model to transform. subgraph (litert.SubGraphT): The subgraph to transform. operations (list[Type["AotOperator"]]): The list of operations to transform.
Returns:
from_config
classmethod
Build a pipeline from a TransformsConfig, preserving the registry order and enabling/disabling as per cfg.transforms.
Parameters:
-
cfg
TransformsConfig
) –Configuration object containing transform settings.
Returns:
-
TransformPipeline
(TransformPipeline
) –An instance of TransformPipeline with the specified transforms.
Functions
apply_wildcard_and_validate
Apply wildcard and validate the transforms configuration.
Parameters:
-
cfg
TransformsConfig
) –Configuration object containing transform settings.
Returns:
-
TransformsConfig
(TransformsConfig
) –Updated configuration object with validated transforms.