operator
Classes
DepthwiseConv2DOperator
DepthwiseConv2DOperator(op: AirOperator, model: AirModel, platform: SocPlatform, prefix: str = 'aot', attributes: dict[str, str] = {})
DEPTHWISE_CONV_2D operator.
This operator performs depthwise convolution on the input tensor using the specified filter tensor.
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 {}.
Functions
ctx_buf_required
Whether the selected depthwise kernel dereferences ctx->buf.
The float lowering is deliberately excluded: when
:meth:_resolve_float_scratch declines to allocate, the shape is one
the float kernel serves from a route that never reads ctx->buf, so
an unbacked context is a documented, supported state there, not a bug.
For the integer lowering the requirement is the selected kernel's,
narrowed by the platform capability that makes upstream's
get_buffer_size non-zero (see :data:_CTX_BUF_KERNELS).
Returns:
-
bool–Trueif the selected kernel needs a non-NULLctx.buf.
compute_values
emit
Generate the source code for the operator.
Parameters:
-
(save_pathPath) –Path to save the generated code.