TL;DR
QUILL is an algorithm-architecture co-designed accelerator that tackles the severe memory bottlenecks of Deformable DETR models. By dynamically reordering attention queries for spatial proximity and fusing the entire attention pipeline into a single-pass hardware engine, QUILL achieves up to $7.29\times$ higher throughput and $47.3\times$ better energy efficiency than an NVIDIA RTX 4090 GPU.
What Problem Does This Paper Address?
Detection Transformers (DETR) have revolutionized object detection, but their standard dense attention mechanisms are computationally expensive. To fix this, Multi-Scale Deformable Attention (MSDeformAttn) was introduced, sampling only a small handful of spatial locations per query. While this mathematically slashes FLOPs, it creates a massive hardware headache.
Because the sampled locations are sparse and data-dependent, they result in highly irregular, scattered memory accesses. On modern hardware like GPUs, this translates to severe cache misses, low arithmetic intensity, and frequent memory bank conflicts. Ironically, optimization techniques like query pruning actually make the problem worse by further scattering the surviving queries across space, destroying any remaining data locality.
Methods
The authors introduce QUILL, an accelerator built on two main pillars to turn irregular sparsity into hardware-friendly locality:
- Distance-based Out-of-Order Querying (DOOQ) & Aligned Prefetch: Instead of processing queries sequentially, QUILL uses a runtime scheduling unit that inspects a window of upcoming queries and reorders them based on spatial proximity (using $\ell_1$ distance). This ensures that consecutive queries look at overlapping regions of the feature map, dramatically boosting cache hits. This predictable look-ahead schedule drives a double-buffered, region-based prefetch loop that completely overlaps memory fetch with computation.
- Fused MSDeformAttn Core Engine: Standard implementations execute bilinear interpolation, Softmax weighting, aggregation, and linear projection as separate micro-kernel passes, spilling intermediate data back and forth to memory. QUILL fuses all of these operations into a single-pass hardware pipeline. It also utilizes conflict-aware level buffers to eliminate bank conflicts during $2\times2$ fractional pixel fetches.
Datasets
The design was evaluated end-to-end using the standard COCO 2017 object detection dataset across multiple state-of-the-art model variants, including Deformable DETR, Sparse DETR, and Co-DETR (ViT-L).
Key Insights and Ideas
- The FLOPs vs. Latency Paradox: Algorithmic efficiency does not equal hardware efficiency. MSDeformAttn successfully cuts down FLOPs, but its sparse memory footprint leaves processing elements starved for data, stalling on memory transfers.
- Sparsity Penalizes Standard Caches: Techniques like query pruning reduce compute but shuffle queries in space, rendering standard sliding-window or sequential caches useless.
- Scheduling as a Locality Lever: You don't need to change a model's mathematical outputs to make it hardware-friendly. By simply changing the order of execution at runtime via DOOQ, QUILL restores spatial and temporal locality without altering model semantics.
Key Results
QUILL was implemented in synthesizable RTL (Chisel) and evaluated against both an NVIDIA RTX 4090 GPU and prior specialized accelerators:
- Vs. RTX 4090 GPU: QUILL delivers up to $7.29\times$ higher throughput and $47.3\times$ better energy efficiency (at batch size 1), with the highest gains observed in heavily pruned, sparse models.
- Vs. SOTA Accelerators: QUILL outperforms prior specialized hardware like DEFA by $3.26\text{--}9.82\times$ in throughput and $2.01\text{--}6.07\times$ in energy efficiency, largely because DEFA cannot handle sparse/pruned models efficiently and lacks a fully fused pipeline.
- Accuracy Preservation: Using mixed-precision quantization (8-bit weights/activations for linear layers, 16-bit for attention aggregation), QUILL stays within $\le 0.9$ AP of the baseline FP32 models.
Limitations and Future Work
While QUILL demonstrates excellent scaling, the authors note a few areas for future exploration:
- Adaptive Tuning: The lookup window size ($w_d$) and prefetch radius ($r$) are currently fixed or statically set. Implementing an online, adaptive mechanism to tune these parameters based on real-time query distributions could further optimize the cache hit rate.
- Broader Sparse Ops: The schedule-aware prefetch loop concept could be extended to other highly irregular vision and spatial operations, such as 3D point cloud convolutions or sparse cross-attention in video transformers.
- Compiler Integration: Developing a dedicated compiler/runtime to auto-tune micro-architectural knobs (like parallelism factors and GEMM tiling sizes) would make the architecture easier to deploy across diverse hardware configurations.
Summary updated