boundlab.interp.base.interpret#

boundlab.interp.base.interpret = {<class 'boundlab.interp.Add'>: Add(op='add'), <class 'boundlab.interp.BroadcastTo'>: BroadcastTo(op='broadcast_to'), <class 'boundlab.interp.Cast'>: Cast(op='cast'), <class 'boundlab.interp.Identity'>: Identity(op='identity'), <class 'boundlab.interp.Neg'>: Neg(op='neg'), <class 'boundlab.interp.ReduceMean'>: ReduceMean(op='reduce_mean'), <class 'boundlab.interp.ReduceSum'>: ReduceSum(op='reduce_sum'), <class 'boundlab.interp.Reshape'>: Reshape(op='reshape'), <class 'boundlab.interp.Squeeze'>: Squeeze(op='squeeze'), <class 'boundlab.interp.Sub'>: Sub(op='sub'), <class 'boundlab.interp.Transpose'>: Transpose(op='transpose'), <class 'boundlab.interp.Unsqueeze'>: Unsqueeze(op='unsqueeze'), <class 'boundlab.interp.base.DivSimple'>: <boundlab.interp.base.DivSimple object>, <class 'boundlab.interp.base.Gemm'>: <boundlab.interp.base.Gemm object>, <class 'boundlab.interp.base.MarkedIdentity'>: <boundlab.interp.base.MarkedIdentity object>, <class 'boundlab.interp.base.MatmulSimple'>: <boundlab.interp.base.MatmulSimple object>, <class 'boundlab.interp.base.MulSimple'>: <boundlab.interp.base.MulSimple object>}#

The domain-independent base interpreter.

Bundles the operators every domain shares — implemented purely against the Expr primitives, so they are exact for any component class: add/sub/neg, mul/div/matmul with at least one concrete operand, gemm, the shape operators, reductions, identity and cast. Domains extend it: Interpreter(base.interpret, <nonlinear handlers>, ...).