attention_mask is discarded in fmha_interface_wrapper: is a varlen or padding-mask prefill kernel wanted?

Open
#191 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 8 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
python

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.

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.

Dominant language
Python
Stars
830
Forks
92
Avg merge
8d 11h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/TileGym

All issues in NVIDIA/TileGym

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.