File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -5657,6 +5657,10 @@ static struct ggml_tensor * ggml_soft_max_impl(
5657
5657
GGML_ASSERT(mask->ne[1] >= a->ne[1]);
5658
5658
}
5659
5659
5660
+ if (max_bias > 0.0f) {
5661
+ GGML_ASSERT(mask);
5662
+ }
5663
+
5660
5664
bool is_node = false;
5661
5665
5662
5666
if (a->grad) {
@@ -6440,6 +6444,7 @@ struct ggml_tensor * ggml_flash_attn_ext(
6440
6444
float max_bias) {
6441
6445
GGML_ASSERT(ggml_can_mul_mat(k, q));
6442
6446
// TODO: check if vT can be multiplied by (k*qT)
6447
+
6443
6448
if (mask) {
6444
6449
GGML_ASSERT(ggml_is_contiguous(mask));
6445
6450
GGML_ASSERT(mask->ne[2] == 1);
@@ -6449,6 +6454,10 @@ struct ggml_tensor * ggml_flash_attn_ext(
6449
6454
//GGML_ASSERT(ggml_can_repeat_rows(mask, qk));
6450
6455
}
6451
6456
6457
+ if (max_bias > 0.0f) {
6458
+ GGML_ASSERT(mask);
6459
+ }
6460
+
6452
6461
bool is_node = false;
6453
6462
6454
6463
if (q->grad || k->grad || v->grad) {
You can’t perform that action at this time.
0 commit comments