Portable pure-MoonBit V128 SIMD GEMM, vecmath, and im2col numerical kernels (zero FFI, 4-target)
moon add matrixlt/ml_kernelsfn im2col_2d_f32(input : FixedArray[Float], in_base : Int, channels : Int, in_h : Int, in_w : Int, kh : Int, kw : Int, stride_h : Int, stride_w : Int, pad_top : Int, pad_left : Int, dil_h : Int, dil_w : Int, out_h : Int, out_w : Int, col : FixedArray[Float]) -> Unitfn im2col_2d_nhwc_f32(input : FixedArray[Float], in_base : Int, channels : Int, in_h : Int, in_w : Int, kh : Int, kw : Int, stride_h : Int, stride_w : Int, pad_top : Int, pad_left : Int, dil_h : Int, dil_w : Int, out_h : Int, out_w : Int, col_t : FixedArray[Float]) -> Unitfn matmul_2d_prepacked_nchw_simd_f32(a : FixedArray[Float], a_offset : Int, packed_b : PackedMatrixB, bias : FixedArray[Float]?, bias_offset : Int, out : FixedArray[Float], out_offset : Int, m : Int) -> Unitfn matmul_2d_prepacked_simd_f32(a : FixedArray[Float], a_offset : Int, packed_b : PackedMatrixB, out : FixedArray[Float], out_offset : Int, m : Int) -> Unitfn matmul_2d_scalar_f32(a : FixedArray[Float], a_offset : Int, b : FixedArray[Float], b_offset : Int, out : FixedArray[Float], out_offset : Int, m : Int, k : Int, n : Int) -> Unitfn matmul_2d_simd_f32(a : FixedArray[Float], a_offset : Int, b : FixedArray[Float], b_offset : Int, out : FixedArray[Float], out_offset : Int, m : Int, k : Int, n : Int) -> Unitfn pack_f32_to_bytes(src : FixedArray[Float]) -> FixedArray[Byte]fn pack_matrix_b_transposed_f32(b_t : FixedArray[Float], b_offset : Int, n : Int, k : Int) -> PackedMatrixBInstall
Download zipPortable pure-MoonBit V128 SIMD GEMM, vecmath, and im2col numerical kernels (zero FFI, 4-target)