Skip to content

CPU FA: disable mask optimization#1935

Merged
ikawrakow merged 1 commit into
mainfrom
ik/cpu_fa_disable_mask_opt
Jun 9, 2026
Merged

CPU FA: disable mask optimization#1935
ikawrakow merged 1 commit into
mainfrom
ik/cpu_fa_disable_mask_opt

Conversation

@ikawrakow

@ikawrakow ikawrakow commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Closes #1910.

The failure mode is triggered when processing a batch for a thread that is working on activation rows that have very few not-masked KV cache entries due to SWA. In that case stepping over the mask in steps of k_step may miss the few non-masked entries, thus resulting in processing only fully masked KV cache entries, which triggers the S > 0 assert.

@ikawrakow ikawrakow force-pushed the ik/cpu_fa_disable_mask_opt branch from caaecb8 to 98cf5ce Compare June 8, 2026 06:19
@ikawrakow ikawrakow merged commit a38d292 into main Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: iqk/fa/iqk_fa_templates.h:1175: GGML_ASSERT(S > 0) failed

1 participant