model
Classes
AirModel
In-memory graph IR for AOT codegen.
Attributes:
-
name
(str
) –Name of the model.
-
version
(str
) –Version of the model.
-
description
(str
) –Description of the model.
-
tensors
(dict[str, AirTensor]
) –Mapping from tensor ID to its AirTensor metadata.
-
operators
(list[AirOperator]
) –Topologically ordered list of operators (nodes) in the graph.
-
input_ids
(list[str]
) –IDs of tensors that serve as model inputs.
-
output_ids
(list[str]
) –IDs of tensors that serve as model outputs.
Attributes
Functions
add_tensor
Register a new tensor in the model.
Raises:
-
ValueError
–If a tensor with the same ID already exists.
remove_tensor
add_operator
Append a new operator to the execution list.
Raises:
-
ValueError
–If an operator with the same ID already exists.
get_tensor
topo_sort
Return operators in execution order.
Assumes operators
was populated in valid topological order.