vllm_omni.diffusion.models.ltx2.ops.fna ¶
TileLang FNA for the LTX-2.5 DiffVAE stage-5 schedule.
This intentionally reuses NATTEN's token permutation. It only replaces the middle BF16 attention kernel for Q tiles (4, 4, 4), KV tiles (4, 4, 8), head_dim=64, stride=dilation=1, and scale=1.0.
Problem dataclass ¶
build_kv_tile_buckets cached ¶
Group Q tiles by an upper bound on their useful KV tile count.
build_kv_tile_map cached ¶
Return packed KV tile ids and valid counts for each permuted Q tile.
build_kv_tile_metadata cached ¶
Pack KV tile id and three separable mask pattern ids into int32.
compile_kernel cached ¶
Compile one T/H/W-dynamic kernel for a fixed KV-count ceiling.
fna3d_tilelang ¶
fna3d_tilelang(
query: Tensor,
key: Tensor,
value: Tensor,
*,
shape: tuple[int, int, int],
window: tuple[int, int, int],
) -> Tensor
Run native stage-5 FNA, or raise for unsupported inputs/launch failures.
Q and KV use the documented token-tiled layout. Batch members share spatial metadata; compilation is cached by target architecture and KV-count bucket.