Mojo function
pack_b
pack_b[transpose_b: Bool, simd_size: Int, inner_size: Int, a_type: DType, b_type: DType, c_type: DType, src_shape: DimList, dst_shape: DimList](dst: NDBuffer[b_type, 2, origin, dst_shape], src: NDBuffer[b_type, 2, origin, src_shape], tile_n: Int, tile_k: Int)
Utility function to pack the entire B matrix, such that each [tile_n // inner_size, tile_k, inner_size] tile of src is contiguous in dst.
Tiles (not tile contents) are stored in row major order, so tile[i, j] is tile_n * tile_k bytes away from tile[i, j+1].
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!