Skip to content

Commit a9ee71e

Browse files
committed
fix api
1 parent e3e8122 commit a9ee71e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ggml_extend.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,13 +1282,17 @@ __STATIC_INLINE__ struct ggml_tensor* ggml_ext_attention_ext(struct ggml_context
12821282
}
12831283

12841284
if (mask_in != nullptr) {
1285+
// the need for padding got removed in ggml 4767bda
1286+
// ensure we can still use the old version for now
1287+
#ifdef GGML_KQ_MASK_PAD
12851288
int mask_pad = 0;
12861289
if (mask_in->ne[1] % GGML_KQ_MASK_PAD != 0) {
12871290
mask_pad = GGML_PAD(L_q, GGML_KQ_MASK_PAD) - mask_in->ne[1];
12881291
}
12891292
if (mask_pad > 0) {
12901293
mask_in = ggml_pad(ctx, mask_in, 0, mask_pad, 0, 0);
12911294
}
1295+
#endif
12921296
mask_in = ggml_cast(ctx, mask_in, GGML_TYPE_F16);
12931297
}
12941298

0 commit comments

Comments
 (0)