From 5fc320d6229fbfd859c871ae48f13df1c1e4fc12 Mon Sep 17 00:00:00 2001 From: huiliang166 Date: Tue, 9 Sep 2025 22:01:57 +0800 Subject: [PATCH] fix lstm avx accuracy failure Signed-off-by: huiliang166 --- .../src/litert/kernel/cpu/nnacl_c/fp32/matmul_avx_fp32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore-lite/src/litert/kernel/cpu/nnacl_c/fp32/matmul_avx_fp32.c b/mindspore-lite/src/litert/kernel/cpu/nnacl_c/fp32/matmul_avx_fp32.c index 7f49814e..4988391e 100644 --- a/mindspore-lite/src/litert/kernel/cpu/nnacl_c/fp32/matmul_avx_fp32.c +++ b/mindspore-lite/src/litert/kernel/cpu/nnacl_c/fp32/matmul_avx_fp32.c @@ -19,6 +19,9 @@ void MatVecMulAvxFp32(const float *a, const float *b, float *c, const float *bias, int act_type, int depth, int cur_col, int col_align) { // one time process 32 out_channel + if (cur_col % C8NUM != 0) { + cur_col = UP_ROUND(cur_col, C8NUM); + } int col_block = C32NUM; int act_flag = C0NUM; if (act_type == ActType_Relu6) { -- Gitee