From d24c1ba21107d5874a825248f2ee0cb8560417d2 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Thu, 5 Jun 2025 15:10:19 +0100 Subject: [PATCH] Fix minor bug - Incorrect vector size in Conv2D example Signed-off-by: Mohammed Suhail Munshi --- .../conv2d_imatmul_clamp_f16_f16_f16p.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/conv2d_imatmul_clamp_f16_f16_f16p_sme2/conv2d_imatmul_clamp_f16_f16_f16p.cpp b/examples/conv2d_imatmul_clamp_f16_f16_f16p_sme2/conv2d_imatmul_clamp_f16_f16_f16p.cpp index bf47c80d..4dc1514e 100644 --- a/examples/conv2d_imatmul_clamp_f16_f16_f16p_sme2/conv2d_imatmul_clamp_f16_f16_f16p.cpp +++ b/examples/conv2d_imatmul_clamp_f16_f16_f16p_sme2/conv2d_imatmul_clamp_f16_f16_f16p.cpp @@ -285,13 +285,13 @@ int main() { // ------------------------------------------------- // 2. Pack LHS and RHS. // ------------------------------------------------- - auto lhs_packed_size = + auto lhs_packed_size_bytes = kai_get_lhs_packed_size_lhs_imatmul_pack_x16p2vlx2_x16p_sme(out_nhw_size, k_chunk_count, k_chunk_length); - auto rhs_packed_size = kai_get_rhs_packed_size_rhs_imatmul_pack_kxn_x16p2vlx2b_x16_x16_sme( + auto rhs_packed_size_bytes = kai_get_rhs_packed_size_rhs_imatmul_pack_kxn_x16p2vlx2b_x16_x16_sme( out_channels, k_chunk_count, k_chunk_length); - VEC_F16 packed_lhs(lhs_packed_size); - VEC_F16 packed_rhs(rhs_packed_size); + VEC_F16 packed_lhs(lhs_packed_size_bytes / sizeof(float16_t)); + VEC_F16 packed_rhs(rhs_packed_size_bytes / sizeof(float16_t)); // Padding is not used in the indirection buffer, therefore pad_ptr is nullptr // Ptr offset is provided as 0 as it is not needed to apply an offset to each valid pointer provided in the table in -- GitLab