fix: correct ggml_pad_ext (#1133)

This commit is contained in:
leejet 2025-12-23 21:37:07 +08:00 committed by GitHub
parent 98916e8256
commit 3e812460cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1033,7 +1033,7 @@ __STATIC_INLINE__ struct ggml_tensor* ggml_ext_pad(struct ggml_context* ctx,
int p3 = 0,
bool circular_x = false,
bool circular_y = false) {
return ggml_ext_pad_ext(ctx, x, p0, p0, p1, p1, p2, p2, p3, p3, circular_x, circular_y);
return ggml_ext_pad_ext(ctx, x, 0, p0, 0, p1, 0, p2, 0, p3, circular_x, circular_y);
}
// w: [OCIC, KH, KW]
@ -1062,7 +1062,7 @@ __STATIC_INLINE__ struct ggml_tensor* ggml_ext_conv_2d(struct ggml_context* ctx,
}
if ((p0 != 0 || p1 != 0) && (circular_x || circular_y)) {
x = ggml_ext_pad(ctx, x, p0, p1, 0, 0, circular_x, circular_y);
x = ggml_ext_pad_ext(ctx, x, p0, p0, p1, p1, 0, 0, 0, 0, circular_x, circular_y);
p0 = 0;
p1 = 0;
}