Paper commentary
TileWeave: Heterogeneous Tiling for Sparse Prefill on Mobile SoCs
TileWeave splits sparse attention between mobile NPU and GPU by key reuse
- Problem Block-sparse attention cuts computation, but its irregular key selections clash with mobile NPUs, which need large regular tiles. Neighboring queries pick different key blocks, so coarse tiles waste work on interactions that masking later discards.
- Method TileWeave sends widely shared key blocks to NPU tiles and the rest to the GPU.
- Results On two Snapdragon phones, full-model prefill ran 1.35 to 3.23 times faster than XAttention over 1k to 16k tokens. RULER accuracy matched XAttention.

Figure 1 . Thin blue frames mark NPU query tiles: 64 queries in (1) and 256 in (2)–(4). Small tiles preserve selections but repeat K/V staging and coordination, limiting NPU efficiency. Coarse tiles improve reuse, but dropping exceptions risks accuracy (2), while coarse masked tiles compute unwanted interactions (3). TileWeave keeps shared keys on coarse NPU tiles and preserves exceptions through fine GPU execution (4).
Original paper · CC BY 4.0 · Wentao Ni, Hong Cai, Mingu Lee, Chihao Yu, Zhongming Yu, Hejia Zhang, Kangqi Zhang, Fatih Porikli, Zhijian Liu, Jishen Zhao · TileWeave: Heterogeneous Tiling for Sparse Prefill on Mobile SoCs · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why coarse NPU tiles stall sparse prefill
Block-sparse attention skips query-key block pairs outside the selection, which cuts both computation and data movement. An NPU reaches high throughput on large, regular tiles that reuse their staged inputs. Neighboring queries often pick different, scattered key blocks, so a large tile has to cover their union. Running each small selection separately repeats data staging and limits reuse.
Combining selections into one large tile improves hardware utilization, but it computes extra interactions. Fewer selected blocks don't guarantee lower latency, because the cost depends on how those blocks are grouped into tiles.
Table 1 holds the selected workload fixed and varies only the NPU query tile size Br. At S = 2048, the 64-, 128-, and 256-query tiles take 4.121, 3.277, and 2.344 ms. The 256-query tile is 1.76× faster than the 64-query tile at the same selected work. With a fixed K/V chunk width C, the kernel visits (Nq/Br)⌈S/C⌉ chunks per K/V head. Reducing Br from 256 to 64 quadruples these chunk visits.
Nominal matrix work stays 4HqNqSD whatever Br is, so tile size mainly changes how staging and coordination are amortized.

Table 1 . NPU attention latency in ms (speedup over Br = 64). Larger query tiles improve efficiency, giving up to 1.76× speedup at fixed selected work.
Original paper · CC BY 4.0Dropping rarely shared selections cuts work, but it can remove useful contributions. On Llama-3.2-3B-Instruct at RULER 4k, restoring query-specific exceptions raised accuracy from 85.57 to 86.32. The union scored 86.29 but kept 73.13% of causal pairs, against 62.19% with exceptions. A singly requested block creates three extra coarse interactions, while a fully shared block uses all four.
Cross-query reuse as the dividing rule
The key idea picks the execution path by how many neighboring query blocks request each key block. For one K/V head, the authors count c(b), the number of the four adjacent 64-query blocks that select key block b. A coarse tile performs four 64 × 64 interactions for every block in the union, while the fine selections request only c(b). Summing the excess over the union gives ΔW = Σ over b in U of (4 − c(b)), which the authors use to measure the extra work.
Low reuse does not imply low importance, because the quality contribution of these blocks persists with diagonal attention preserved. Offloading blocks selected by at most two of the four query blocks gave an ideal NPU speedup of 1.49× at 4k and 1.59× at 8k. This speedup is an upper bound, since it assumes the removed work completes for free.
It shows the opportunity exists, but it doesn't measure what a real system would gain.
The remaining requested keys run on the GPU, and only for the query blocks that request them. The NPU evaluates the shared pool for all 256 queries, which keeps coarse tiles and K/V reuse. Since the split is made per tile, the threshold c∗ = 3 controls how much work moves to the GPU.
Selecting blocks with compact scores
Earlier selectors cost too much on the NPU, because they reorder data and run softmax as separate vector operators. On Qwen3-1.7B at 4k, XAttention spent 154 of its 274 ms of selection reordering queries and copying keys. MInference spent 262 of 435 ms on softmax and element-wise operators. Figure 4 puts TileWeave's selection at 6 to 10 percent of dense attention's time.

Figure 4 . Qwen3-1.7B NPU selection cost relative to dense atten- tion (totals in ms). TileWeave reduces selection to 6–10% of dense attention’s time.
Original paper · CC BY 4.0The selector scores 64-query by 64-key block pairs using four sampled query rows and four pooled key vectors. Query block i contributes rows 0, 16, 32 and 48 of every query head, and each K/V block contributes four pools, each the mean of 16 consecutive keys. Because the dot product is linear, each score equals the mean logit over the 16 keys in its pool.
Each score costs one D-dimensional product, against 16D for XAttention's antidiagonal scores over the same matrix size.
Averaging query samples or heads before scoring can blur distinct query directions, so the authors normalize each sample and head separately over the pools it can see. The probabilities are defined as \[ a_{ijhguv} = \frac{\exp(z_{ijhguv})}{\sum_{(b,w)\in V_{iu}} \exp(z_{ibhguw})}, \quad p_{ijh} = \max_{0\le g<G} \frac{1}{4}\sum_{u=0}^{3}\sum_{v:(j,v)\in V_{iu}} a_{ijhguv} \] The maximum over the G query heads of a group sets the block's score, so a block enters the K/V head's list when any query head needs it.
A block is kept when its probability, scaled by the number of reachable blocks, exceeds τ, as \[ W_{i,h} = \{ j \in A_i : p_{ijh}\,|A_i| > \tau \} \cup \{0, d_i\} \] The sink block zero and the chunk-offset diagonal block d_i are added after thresholding, so they don't distort the other probabilities. One τ serves all layers, heads and lengths; the setting is 0.4277 for Qwen3-1.7B and 0.5582 for Llama-3.2-3B-Instruct.
Assigning key blocks to NPU or GPU
The four adjacent wanted lists are merged into a union U, and c(b) counts how many lists contain each block. The partition is \[ U=\bigcup_{i=0}^{3} W_i, \quad c(b)=\sum_{i=0}^{3}\mathbf{1}[b\in W_i], \quad P=\{b\in U : c(b)\ge c^*\}, \quad E_i=W_i\setminus P \] Blocks in P form the shared pool, which the NPU evaluates for all 256 queries.
Each E_i holds one query block's exceptions, which the GPU evaluates only for its 64 requesting queries.
With c* = 3, a block requested by one or two query blocks becomes a GPU exception. Setting c* = 1 would place the whole union on the NPU, and larger thresholds move more selections to the GPU while reducing pool fill-in. The NPU-only masked tile also executes U, but it keeps only each W_i, so it computes and discards the fill-in. The main configuration uses c* = 3.
The effective key set for each query block is P union E_i, which contains every wanted block. Shared blocks can still pull in neighboring queries' selections, which the naive 64-block baseline doesn't do.
Merging NPU and GPU partials into one output
Each engine reduces its own key subset to a running maximum, a normalizer, and a weighted value sum. The maximum is the largest score in the subset, and the normalizer sums exponentials shifted by that maximum. Because the NPU and GPU compute disjoint key subsets, their partials cover the effective selected set without double counting. An empty subset contributes zero weight and a zero accumulator, so an idle engine doesn't change the formula.
The merge takes the larger of the two maxima and rescales each engine's partial by its exponential offset from that maximum. Dividing the combined weighted sum by the combined normalizer gives the output O, which is exact for the effective selected set. Numerical differences come from the two implementations, and the composition doesn't make the sparse policy equal dense attention.

Figure 5 . Fine-grained schedules on a shared time axis (1024 queries, eight K/V heads). Endpoints are measured two-round means from the historical 4k Qwen3-1.7B/SM8750 study using the earlier threshold scorer; selection finishes before t= 0 and other model operators are excluded. Tile intervals are approximate; store/merge marks encode no duration. GPU completion spans 0.37–1.47 ms from a nearby trace, with intermediate groups interpolated. Timing calibration illustrates overlap and relative latency, not a single event trace.
Original paper · CC BY 4.0GPU work depends on the NPU's selections, so the first eight tiles keep the union U on the NPU, covering GPU startup. Later tiles follow Equation 6, and the accuracy runs include the union fill-in from those first tiles in the effective mask. The GPU follows the NPU's store order in query-block and K/V-head stages, publishing each stage when its last workgroup finishes.
Figure 5 compares three schedules on a shared time axis with 1024 queries and eight K/V heads. The naive NPU-only schedule takes 2.661 ms, against 2.315 ms for the NPU-only union. The split schedule takes 1.996 ms, which is 1.33x faster than naive and 1.16x faster than the union. These timings come from the earlier 4k Qwen3-1.7B study on SM8750 with the older threshold scorer, so they show overlap rather than an event trace.
Accuracy against XAttention and dense attention
The RULER comparison covers Qwen3-1.7B and Llama-3.2-3B-Instruct, with 13 tasks of 500 prompts each at 4k, 8k, and 16k tokens. Accuracy runs use CUDA reference implementations with dequantized F16 weights and dense greedy decoding in every method, so only prefill attention differs. With Qwen3-1.7B at 4k, TileWeave scores 86.37, compared to 86.31 for XAttention and 87.12 for dense attention.
With Qwen3-1.7B at 8k and 16k, TileWeave scores 77.19 and 69.99, versus 77.16 and 70.08 for XAttention. Relative to dense attention, the Qwen3 mean drops by at most 2.3 points.
With Llama-3.2-3B-Instruct at 4k, TileWeave scores 86.32, compared to 86.00 for XAttention. At 8k and 16k, the Llama scores are 82.98 and 80.19, versus 82.64 and 80.13 for XAttention. The Llama mean stays at most 0.5 points below dense attention. ShadowAttn is generally more accurate, with a notable advantage on Qwen3's common-words extraction task.
Both block-sparse methods lose accuracy on that task, so the gap there reflects the shared block selection.
LongBench uses six tasks with 200 prompts each, or 150 for MultiFieldQA-en, truncated to 16k tokens. On LongBench with Qwen3-1.7B, TileWeave averages 26.59, compared to 27.06 for XAttention and 26.79 for dense attention. With Llama-3.2-3B-Instruct, TileWeave averages 36.54, against 36.37 for XAttention and 37.10 for dense attention. Both models stay within 0.5 points of XAttention and 0.6 points of dense attention, using the RULER settings without retuning per dataset.
The split doesn't cost accuracy relative to XAttention, but the LongBench results don't show an improvement either. The Llama gain over XAttention on RULER is small, so the evidence supports parity more than a clear improvement.
Phone prefill and attention speedups
Full-model prefill on the phones is measured with Qwen3-1.7B on SM8750 and SM8850, from 1k to 16k prompt tokens. On SM8750, TileWeave matches dense attention at 1k and is faster from 2k on, at 1.05×, 1.17×, 1.37×, and 1.58× for 2k, 4k, 8k, and 16k. The gain grows with length, which the authors tie to the quadratic growth of attention work.
On SM8850, TileWeave is 1.03×, 1.08×, 1.17×, 1.29×, and 1.44× faster than dense attention from 1k to 16k, and 1.41–3.23× faster than XAttention. The authors attribute much of XAttention's cost to its per-head masks, which run as 64-query tiles in two GQA lanes.
Attention latency is measured directly on each chunk, including selection and coordination. On SM8750, TileWeave's attention is 1.14×, 1.51×, 1.92×, and 2.14× faster than dense attention at 2k, 4k, 8k, and 16k. XAttention's attention is 2.2–3.0× slower than dense attention on SM8750, although it executes fewer blocks than TileWeave. Its selection is only 12–18% of its attention time in a profiled prefill, and the rest is spent running its per-head masks.
ShadowAttn's CPU version is much slower, with prefill of 1.04 s at 1k and 539 s at 16k on SM8750. TileWeave is 2.2–48.6× faster than the CPU version on SM8750 and 3.2–63.2× faster on SM8850. The GPU version of ShadowAttn is faster than its CPU version from 2k onward, yet TileWeave stays 2.3–12.6× faster on SM8750. These speedups are measured in separate runs from the attention latency, so the two sets of numbers are not combined.
Which parts carry the gain
Pooled keys are the selector choice that the ablation favors on Qwen3-1.7B at RULER 4k. Sampling two of 16 keys per representative instead lowers the score by 0.56 points, mostly on UUID multi-key and multi-value retrieval. Those UUID tasks drop to 84.60 from 89.00 and to 85.70 from 88.30, because sampling only two of 16 keys misses the target tokens.
Pooling the query samples too reaches 86.80, a gain of 0.43 points over TileWeave's 86.37. That gain costs about 1.5 times the selection's NPU time, so the authors kept sampled queries.XAttention's antidiagonal scores reach 86.67, but each score takes 16 products instead of one.
With execution fixed at naive 64-block attention, swapping XAttention's scorer for the pooled-key selector speeds attention 1.47 and 1.46 times at 8k and 16k. Adding the split on top of the naive pooled-key row raises the attention gain to 1.52 times at 8k and 1.63 times at 16k. End to end, the scorer makes prefill 1.20 and 1.27 times faster, while the split adds 1.24 and 1.34 times.
Per layer, the pooled-key selector costs 3.4 and 10.0 ms of NPU time at 4k and 8k, against 9.5 and 27.8 ms for XAttention's scoring and cumulative selection.
On Llama-3.2-3B-Instruct, the group-maximum selector and threshold stay fixed while the three executions run on SM8750. The masked tile keeps 51.1% of causal pairs, TileWeave keeps 58.0%, and the union keeps 70.1%. At 8k, TileWeave's attention runs 1.24 times faster than the union and 1.29 times faster than the masked tile. Full-model prefill gains are 1.11 to 1.16 times over the union and 1.13 to 1.18 times over the masked tile at 8k and 16k.
The reuse threshold c* = 3 runs fewer blocks than c* = 2 and makes attention 1.09 and 1.10 times faster at 8k and 16k. Prefill with c* = 3 is 1.03 and 1.05 times faster at 8k and 16k, as Table 7 shows. RULER moves by −0.51 to −0.12 points on Qwen3-1.7B and −0.25 to +0.15 points on Llama-3.2-3B-Instruct, and LongBench moves by at most 0.06.
Limits of the evidence
The policy comparison in Table 2 doesn't match density, so it can't rank the policies at equal retained pairs. Each policy recomputes its pools from its own activations, and the authors call these fixed-configuration policies rather than density-matched selectors. The exception ablation covers only Llama-3.2-3B-Instruct at RULER 4k, with one selector and one threshold.
The coarsening control on Qwen3 at RULER 4k scored 86.39 with 64-token axes and 84.00 when both axes were 256. That control ran only on Qwen3 at RULER 4k, so it doesn't show how coarsening behaves on Llama-3.2-3B-Instruct.
The accuracy runs use CUDA reference implementations with dequantized F16 weights, not the phone kernels that produce the speed numbers. Accuracy and phone speed therefore come from different runs, so the paper doesn't pair each speedup with a matched accuracy measurement. Each sparse method uses one setting per model across all lengths and benchmarks, so the results show no per-dataset tuning.
TileWeave's threshold is 0.4277 for Qwen3-1.7B and 0.5582 for Llama-3.2-3B-Instruct.
RULER is evaluated on 13 tasks with 500 prompts each at every length. LongBench uses 200 prompts per dataset, with 150 for MultiFieldQA-en, which makes each dataset score a small sample. The 0.75-point gain from restoring exceptions has a paired 95% bootstrap interval from 0.37 to 1.14, a narrow margin on one model. The phone latency numbers rest on five RULER variable-tracking prompts per length, with two or three interleaved rounds.
Paper info
- Authors
- Wentao Ni, Hong Cai, Mingu Lee, Chihao Yu, Zhongming Yu, Hejia Zhang, Kangqi Zhang, Fatih Porikli, Zhijian Liu, Jishen Zhao
- Venue
- arXiv · Preprint
- First published
- 2026-10-30
- Added
- 2026-11-7
- Updated
- 2026-10-30
- Version
- v1
- arXiv
- 2611.00408
- Category
- cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Smartphone applications increasingly require large language models to process long contexts, whereas high prefill latency and memory demands constrain local inference. Block-sparse attention reduces computation and memory traffic, but its irregular selections conflict with mobile NPUs' preference for large, regular tiles. Efficient execution must exploit cross-query reuse while avoiding redundant computation and preserving selections needed for accuracy. In this paper, we present TileWeave, which partitions sparse attention by this cross-query reuse: highly shared key blocks run in coarse NPU tiles, while low-reuse blocks run on the GPU only for the query blocks that selected them. In addition, we design an NPU-native pooled-key selector that keeps selection inexpensive, and a runtime that publishes GPU partials in the order the NPU consumes them and merges them in its existing output store. On RULER, HeteroSparse matches XAttention's accuracy with Qwen3-1.7B and improves it with Llama-3.2-3B-Instruct; its mean LongBench scores match XAttention as well. On Snapdragon SM8750 and SM8850 phones, it achieves 1.35--3.23$\times$ faster full-model prefill than XAttention over 1k--16k tokens and up to 1.58$\times$ faster than dense attention.
Quote from the paper
Wentao Ni, Hong Cai, Mingu Lee, Chihao Yu, Zhongming Yu, Hejia Zhang, Kangqi Zhang, Fatih Porikli, Zhijian Liu, Jishen Zhao (2026). TileWeave: Heterogeneous Tiling for Sparse Prefill on Mobile SoCs. arXiv:2611.00408v1. https://arxiv.org/abs/2611.00408v1
BibTeX
@misc{ni2026tileweave,
title = {{TileWeave: Heterogeneous Tiling for Sparse Prefill on Mobile SoCs}},
author = {Wentao Ni and Hong Cai and Mingu Lee and Chihao Yu and Zhongming Yu and Hejia Zhang and Kangqi Zhang and Fatih Porikli and Zhijian Liu and Jishen Zhao},
year = {2026},
eprint = {2611.00408},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.00408v1}
}