paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Efficient parameterized algorithms for data packing

数据打包的高效参数化算法
POPL 3(POPL)2019匹配度 2/10 · 该论文研究数据打包与缓存缺失优化的参数化算法和访问超图树宽,属于编译器/体系结构层面的运行时与内存优化;与用户画像核心关注的静态分析、LLM/Agent 与程序分析交叉、浮点程序分析及贝叶斯程序分析均无直接交集。引用 23 inbox
Krishnendu Chatterjee, Amir Kafshdar Goharshady, Nastaran Okati, Andreas Pavlogiannis
crossref: 2026-09-10

AI 速览

一句话:首次给出数据打包问题的参数化算法与细粒度二分,基于访问超图树宽实现线性时间求解。

数据打包通过将时间邻近访问的数据元素放入同一缓存块来减少缓存缺失,但该问题即使缓存大小为 1 也 NP-hard,且对较大缓存难以近似,现有方法多为无理论保证的启发式。本文从访问超图(数据元素间的亲和关系,超图阶对应亲和组大小)出发,以超图树宽为参数研究数据打包。主要结果:存在仅依赖缓存参数的 q*,若 q* 阶访问超图具常数树宽,则可线性时间求解;而 q*−1 阶访问超图即使常数树宽,问题仍 NP-hard,从而建立以最高常数树宽阶为单参数的细粒度二分,并确定最优阈值 q*。原型实验表明常用算法的访问超图树宽较小,且比先进启发式显著减少缓存缺失。

问题
数据打包旨在将频繁在时间邻近访问的数据元素划分到同一缓存块以最小化缓存缺失,但该问题计算困难(小缓存下也 NP-hard、近似困难),现有启发式缺乏理论保证。
方法
将数据元素间的亲和关系建模为访问超图,以超图树宽为参数设计参数化算法,并利用归约证明下界,建立关于最高常数树宽阶 q* 的细粒度二分。
评估
通过原型实现进行实验评估,显示常用算法的访问超图树宽较小,并与多种先进启发式比较,缓存缺失显著更少。
原文摘要(Abstract)

There is a huge gap between the speeds of modern caches and main memories, and therefore cache misses account for a considerable loss of efficiency in programs. The predominant technique to address this issue has been Data Packing: data elements that are frequently accessed within time proximity are packed into the same cache block, thereby minimizing accesses to the main memory. We consider the algorithmic problem of Data Packing on a two-level memory system. Given a reference sequence R of accesses to data elements, the task is to partition the elements into cache blocks such that the number of cache misses on R is minimized. The problem is notoriously difficult: it is NP-hard even when the cache has size 1, and is hard to approximate for any cache size larger than 4. Therefore, all existing techniques for Data Packing are based on heuristics and lack theoretical guarantees. In this work, we present the first positive theoretical results for Data Packing, along with new and stronger negative results. We consider the problem under the lens of the underlying access hypergraphs, which are hypergraphs of affinities between the data elements, where the order of an access hypergraph corresponds to the size of the affinity group. We study the problem parameterized by the treewidth of access hypergraphs, which is a standard notion in graph theory to measure the closeness of a graph to a tree. Our main results are as follows: we show that there is a number q * depending on the cache parameters such that (a) if the access hypergraph of order q * has constant treewidth, then there is a linear-time algorithm for Data Packing; (b) the Data Packing problem remains NP-hard even if the access hypergraph of order q * −1 has constant treewidth. Thus, we establish a fine-grained dichotomy depending on a single parameter, namely, the highest order among access hypegraphs that have constant treewidth; and establish the optimal value q * of this parameter. Finally, we present an experimental evaluation of a prototype implementation of our algorithm. Our results demonstrate that, in practice, access hypergraphs of many commonly-used algorithms have small treewidth. We compare our approach with several state-of-the-art heuristic-based algorithms and show that our algorithm leads to significantly fewer cache-misses.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot674,
  title = {Efficient parameterized algorithms for data packing},
  author = {Krishnendu Chatterjee and Amir Kafshdar Goharshady and Nastaran Okati and Andreas Pavlogiannis},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3290366}
}