Skip to main content

Module opset

Module opset 

Source
Expand description

Opset declaration for the CpuBackend.

The backend’s atomic_opset mirrors bb_ir::tensor_primitives::TENSOR_PRIMITIVES_OPS exactly — the 30-op primitive floor every Backend impl must declare. The ops that aren’t primitives but ARE backed by ndarray kernels in this crate (Relu, Sigmoid, Tanh, Softmax, LeakyRelu, Gelu, Dot, Zeros, Ones, GlobalAveragePool) get listed via extension_opsets(). Lying entries the prior 49-op declaration carried (BatchNorm, LayerNorm, Conv, MaxPool, AveragePool, Scatter, If, Loop) are dropped — they have no kernel.

BackendSubgraph is the framework’s collapse-carrier op; it lives in ai.bytesandbrains.framework and routes through invoke_backend_subgraph, not this opset.

Each entry carries type_relations so the TypeSolver narrows the participating values’ TypeNodes. The canonical relation slices live in bb_ir::types::common_relations.

Constants§

EXTENSION_DOMAIN
Opset domain for the activations + creation + indexing extras the CpuBackend ships. Same canonical ai.onnx namespace; the distinct opset (different version) keeps the floor + extras inspectable as separate declarations.
EXTENSION_OPSET
Extension opset declaration. Returned alongside the primitive floor by CpuBackend::extension_opsets().
EXTENSION_VERSION
Backend-shipped extension version. Separate from the primitive floor so a future opset bump on either side stays independent.
ONNX_DOMAIN
ai.onnx opset domain — primitives + extension ops.
ONNX_V1_OPSET
Primitive-floor opset declaration. Returned by CpuBackend::atomic_opset().
ONNX_VERSION
Primitive-floor opset version.

Statics§

EXTENSION_OPS
Non-primitive ops the CpuBackend backs with ndarray kernels. Surfaces via BackendRuntime::extension_opsets() so the install-time check classifies them correctly (they’re NOT in the primitive floor; users who bind a different backend may not get them).
PRIMITIVE_OPS
30-entry primitive-floor opset returned by BackendRuntime::atomic_opset. Matches bb_ir::tensor_primitives::TENSOR_PRIMITIVES_OPS element-for- element.