matrixlt/onnx/ops does not have a README file

    PackedConvWeight

    pub struct PackedConvWeight {
    c_out : Int
    c_in_per_group : Int
    kh : Int
    kw : Int
    group : Int
    groups : Array[
    PackedMatrixB
    ]
    }

    预打包后的 2D 卷积静态权重:按 group 分组将 W_g[C_out_g, C_in_g * kH * kW] 转置并打包为 16 字节对齐的 PackedMatrixB(K, C_out_g),消除推理热路径上的重复打包与分配。

    PackedConvWeight::group

    fn PackedConvWeight::group(self : PackedConvWeight) -> Int

    返回预打包卷积权重对应的分组数 group。

    PackedConvWeight::shape

    fn PackedConvWeight::shape(self : PackedConvWeight) -> Array[Int]

    返回预打包卷积权重对应的原始 OIHW 形状 [C_out, C_in_per_group, kH, kW]。

    add_f32

    ONNX Add 算子(支持多向广播与可选 V128 SIMD 加速及 BufferPool 复用)。

    avgpool_2d_f32

    fn avgpool_2d_f32(x :
    Tensor
    , kernel_shape : Array[Int], strides : Array[Int], pads : Array[Int], ceil_mode : Bool, count_include_pad : Bool, auto_pad :
    AutoPad
    , pool? :
    BufferPool
    ?) ->
    Tensor
    raise
    TensorError

    ONNX 2D AveragePool 算子(支持可选 BufferPool 复用)。

    batch_norm_f32

    ONNX 推理态 BatchNormalization 算子(支持可选 BufferPool 复用)。

    conv2d_f32

    ONNX 2D Conv 算子:底层复用 matrixlt/ml_kernels/conv::im2col_2d_f32 与 matrixlt/ml_kernels/gemm(支持标量、V128 SIMD 与 BufferPool 缓冲复用)。

    conv2d_prepacked_f32

    使用预打包静态权重 PackedConvWeight 执行 2D Conv(V128 SIMD 零运行期权重打包 + 偏置融合 + BufferPool 复用)。

    flatten_op

    ONNX Flatten 算子:按 axis 展平为 2D 矩阵。

    gemm_f32

    fn gemm_f32(a :
    Tensor
    , b :
    Tensor
    , c :
    Tensor
    ?, alpha? : Float, beta? : Float, trans_a? : Bool, trans_b? : Bool, use_simd? : Bool, pool? :
    BufferPool
    ?) ->
    Tensor
    raise
    TensorError

    ONNX Gemm 算子:Y = alpha * (A' @ B') + beta * C(复用 matrixlt/ml_kernels/gemm 与可选 BufferPool)。

    gemm_prepacked_f32

    使用预打包权重矩阵 PackedMatrixB 执行 V128 SIMD Gemm(运行期零权重打包开销,支持原地偏置融合与 BufferPool)。 要求 packed_b 已经对应有效的 [K, N] 右矩阵(无论原权重是 trans_b=false 还是已转置预打包的 trans_b=true)。

    matmul_f32

    ONNX MatMul 算子(支持 2D、1D 点积及高维批量广播,底层复用 matrixlt/ml_kernels/gemm 与可选 BufferPool)。

    matmul_prepacked_f32

    使用预打包权重矩阵 PackedMatrixB 执行 2D V128 SIMD MatMul(运行期零权重打包开销,支持 BufferPool)。

    maxpool_2d_f32

    fn maxpool_2d_f32(x :
    Tensor
    , kernel_shape : Array[Int], strides : Array[Int], pads : Array[Int], dilations : Array[Int], ceil_mode : Bool, auto_pad :
    AutoPad
    , pool? :
    BufferPool
    ?) ->
    Tensor
    raise
    TensorError

    ONNX 2D MaxPool 算子(支持无填充无空洞快速路径与可选 BufferPool 复用)。

    mul_f32

    ONNX Mul 算子(支持多向广播与可选 V128 SIMD 加速及 BufferPool 复用)。

    pack_conv2d_weight_f32

    在模型加载/会话构建期将 4D OIHW Float32 卷积权重一次性预打包为 PackedConvWeight。

    relu_f32

    ONNX Relu 算子(支持标量与 V128 f32x4_pmax 向量化路径及 BufferPool 复用)。

    reshape_op

    ONNX Reshape 算子:支持 -1 自动推导与 0 复制维度。

    softmax_f32

    ONNX Softmax 算子(数值稳定版,支持任意正负轴与 BufferPool 复用)。

    squeeze_op

    ONNX Squeeze 算子(兼容 Opset < 13 属性与 Opset >= 13 输入张量)。

    sub_f32

    ONNX Sub 算子(支持多向广播与可选 V128 SIMD 加速及 BufferPool 复用)。

    transpose_op

    ONNX Transpose 算子:空 perm 按规范默认反转全部维度。

    unsqueeze_op

    ONNX Unsqueeze 算子(兼容 Opset < 13 属性与 Opset >= 13 输入张量)。