Skip to content

Add packed variable-length bidirectional linear attention - #8

Merged
hp-l33 merged 1 commit into
fla-org:mainfrom
Tytskiy:add-varlen-linear-attn
Aug 10, 2026
Merged

Add packed variable-length bidirectional linear attention#8
hp-l33 merged 1 commit into
fla-org:mainfrom
Tytskiy:add-varlen-linear-attn

Conversation

@Tytskiy

@Tytskiy Tytskiy commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add varlen_linear_attention for packed sequences via cu_seqlens
  • Include naive reference, CUDA correctness tests, and fwd / fwd+bwd benchmarks
  • Document the packed API in flash_bla/ops/linear_attn/README.md

Test plan

  • pytest tests/ops/test_varlen_linear_attn.py
  • python benchmarks/ops/benchmark_varlen_linear_attn.py

Support cu_seqlens-packed sequences with Triton forward/backward, tests, and benchmarks.
@Tytskiy

Tytskiy commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

@hp-l33 could you take a look when you have a chance?

@hp-l33
hp-l33 merged commit dd22276 into fla-org:main Aug 10, 2026

hp-l33 commented Aug 10, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution! This has been merged.

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.

2 participants