Commit 19c1755
ggml-opencl: drop the FA null-mask assert — it aborts the bidirectional encoder
The GGML_ASSERT(mask != NULL || n_q == 1) added in the previous commit is
wrong: this backend deliberately treats a null mask as bidirectional
(is_causal = 0), and the bidirectional encoder path legitimately dispatches
flash-attn with a null mask and n_q > 1 (the SigLIP/Qwen3-VL vision tower,
n_q = n_kv = 247). The assert therefore fires on a valid call — confirmed by an
on-device SIGABRT during the QVAC-21297 S25 smoke run (ggml_abort in
ggml_cl_compute_forward, right after "flash_attn = enabled").
A null mask + n_q > 1 is indistinguishable from a caller that mistakenly
omitted a causal mask, so there is no safe runtime assertion for this contract;
the existing "null mask ⇒ bidirectional" INVARIANT comment is the correct
documentation. Keep the barrier/divergence fix and the ggml_cl_upscale
zero-source-dim guard.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1acc1c1 commit 19c1755
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9883 | 9883 | | |
9884 | 9884 | | |
9885 | 9885 | | |
9886 | | - | |
9887 | 9886 | | |
9888 | 9887 | | |
9889 | 9888 | | |
| |||
0 commit comments