attention_mask is discarded in fmha_interface_wrapper: is a varlen or padding-mask prefill kernel wanted?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 811
- Forks
- 87
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 9
Description
fmha_interface_wrapper in src/tilegym/ops/attn_interface.py accepts attention_mask from the HF attention interface but never passes it on; fmha itself only supports dense causal input. So padded batches at batch_size > 1 attend over padding tokens on the patched path.
Is a varlen-style (cu_seqlens packed, FlashAttention-varlen-like) or padding-mask-aware prefill kernel something you would want as an external contribution to ops/cutile/experimental/, in the style of the SWA prefill from #107? Or is this territory already covered by the roadmap's "Autoregressive Flash Attention (WIP Internal)" or the planned Flex Attention work?
Asking for scope before writing anything; happy to write up a concrete design in this thread if it is wanted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/tilegym/ops/attn_interface.py at fmha_interface_wrapper and inspect how attention_mask is received and how fmha handles dense causal input. Read the SWA prefill work in #107 and compare it with the roadmap items named in the issue. The next step is to establish an agreed scope and design; implementation is not yet defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100