add
Classes
AddOperator
AddOperator(op: AirOperator, model: AirModel, platform: SocPlatform, prefix: str = 'aot', attributes: dict[str, str] = {})
ADD operator.
This operator computes the element-wise addition of two tensors.
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
has_init
property
ADD initialization is a no-op once routed through the shared kernel.
Functions
shared_kernel_helpers
Route the run body through the shared elementwise-add kernel.
compute_values
emit
Generate the source code for the operator.
Parameters:
-
(save_pathPath) –Path to save the generated code.