Skip to content

[NPU] flex_attention: enable preload + lazy-load for large tensors - #438

Open
OuYangxin12 wants to merge 1 commit into
XPU-Forces:hw/950-perffrom
OuYangxin12:hw/950-perf-flex-attn-preload-lazyload
Open

[NPU] flex_attention: enable preload + lazy-load for large tensors#438
OuYangxin12 wants to merge 1 commit into
XPU-Forces:hw/950-perffrom
OuYangxin12:hw/950-perf-flex-attn-preload-lazyload

Conversation

@OuYangxin12

Copy link
Copy Markdown

Add enable_preload=True and enable_dynamic_cv_pipeline=False to the three kernel launch sites (fwd, bwd-dq, bwd-dkdv). Insert cv_pipeline_lazy_load compile_hint on large 2D data tensors (q, k, v, do) only — scalar index loads and small 1D tensors are excluded since their buffer expansion is negligible and extra DMA would be a net regression.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Add enable_preload=True and enable_dynamic_cv_pipeline=False to the
three kernel launch sites (fwd, bwd-dq, bwd-dkdv).
@OuYangxin12
OuYangxin12 force-pushed the hw/950-perf-flex-attn-preload-lazyload branch from 05043e8 to 8f8df1d Compare August 3, 2026 09:07
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.

1 participant