NVIDIA / NVIDIA/TileGym

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

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

Open the contributing guide

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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.