Skip to content

Commit 52d32c2

Browse files
committed
Fix for 13170
Build fails with compilation error on power pc. This patch fixes the same. Tested with unit tests run via --build <build_dir> && cd <build_dir> && make test Signed-off-by: Shalini Salomi Bodapati <[email protected]>
1 parent b6ce743 commit 52d32c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ggml/src/ggml-cpu/ops.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6117,7 +6117,7 @@ static void ggml_compute_forward_conv_2d_dw_cwhn(
61176117
#ifdef GGML_SIMD
61186118
// Vectorized loop
61196119
for (int64_t c_i = 0; c_i < c_pkg_end; c_i += pkg_size) {
6120-
GGML_F32_VEC sum = GGML_F32_VEC_ZERO;
6120+
GGML_F32_VEC sum[1] = {GGML_F32_VEC_ZERO};
61216121
for (int64_t knl_y = 0; knl_y < p.knl_h; ++knl_y) {
61226122
const int64_t src_y = src_y_base + knl_y * p.dilation_y;
61236123
if (src_y < 0 || src_y >= p.src_h) {
@@ -6130,10 +6130,10 @@ static void ggml_compute_forward_conv_2d_dw_cwhn(
61306130
}
61316131
GGML_F32_VEC k = GGML_F32_VEC_LOAD(knl_data + (knl_y * p.knl_w + knl_x) * c + c_i);
61326132
GGML_F32_VEC s = GGML_F32_VEC_LOAD(src_data + (src_y * p.src_w + src_x) * c + c_i);
6133-
sum = GGML_F32_VEC_FMA(sum, k, s);
6133+
sum[0] = GGML_F32_VEC_FMA(sum[0], k, s);
61346134
}
61356135
}
6136-
GGML_F32_VEC_STORE(dst_data + c_i, sum);
6136+
GGML_F32_VEC_STORE(dst_data + c_i, sum[0]);
61376137
}
61386138
#endif
61396139
// Scalar loop

0 commit comments

Comments
 (0)