boundlab.interp.base.Gemm#

class boundlab.interp.base.Gemm[source]#

Bases: OpHandler

ONNX Gemm: alpha * op(x) @ op(weight) + beta * bias, lowered to the transpose / matmul / mul / add handlers.

Methods

__init__

condition

Whether this handler applies to these operands (default: always).

handle

Transform the operands; sub-operations go through interp.<op> so the enclosing domain's handlers apply to them too.

override_handler

A copy of this handler that takes precedence over other when both are ready for the same call.

op: str = 'gemm'#
handle(interp, x, weight, bias=None, *, alpha=1.0, beta=1.0, transA=0, transB=0, **kwargs)[source]#

Transform the operands; sub-operations go through interp.<op> so the enclosing domain’s handlers apply to them too.

condition(*args, **kwargs)#

Whether this handler applies to these operands (default: always).

override_handler(other)#

A copy of this handler that takes precedence over other when both are ready for the same call.

overrides: list[type[OpHandler]] = []#