Let $[q\rangle$ denote the integer set $\{0,1,\ldots,...,q-1\}$ and let $\mathbb{B}=\{0,1\}$. The problem of implementing functions $[q\rangle\rightarrow\mathbb{B}$ on content-addressable memories (CAMs) is considered. CAMs can be classified by the input alphabet and the state alphabet of their cells; for example, in binary CAMs, those alphabets are both $\mathbb{B}$, while in a ternary CAM (TCAM), both alphabets are endowed with a "don't care" symbol. This work is motivated by recent proposals for using CAMs for fast inference on decision trees. In such learning models, the tree nodes carry out integer comparisons, such as testing equality ($x=t$?) or inequality ($x\le t$?), where $x \in [q\rangle$ is an input to the node and $t \in [q\rangle$ is a node parameter. A CAM implementation of such comparisons includes mapping (i.e., encoding) $t$ into internal states of some number $n$ of cells and mapping $x$ into inputs to these cells, with the goal of minimizing $n$. Such mappings are presented for various comparison families, as well as for the set of all functions $[q\rangle\rightarrow\mathbb{B}$, under several scenarios of input and state alphabets of the CAM cells. All those mappings are shown to be optimal in that they attain the smallest possible $n$ for any given $q$.
翻译:设 $[q\rangle$ 表示整数集 $\{0,1,\ldots,...,q-1\}$,$\mathbb{B}=\{0,1\}$。本文研究了在内容可寻址存储器(CAM)上实现函数 $[q\rangle\rightarrow\mathbb{B}$ 的问题。CAM可根据其单元的输入字母表与状态字母表进行分类;例如,在二进制CAM中,这两种字母表均为 $\mathbb{B}$,而在三态CAM(TCAM)中,两种字母表均包含一个"无关"符号。本工作受近期利用CAM加速决策树推理的提议所启发。在此类学习模型中,树节点执行整数比较操作,例如等式测试($x=t$?)或不等式测试($x\le t$?),其中 $x \in [q\rangle$ 为节点输入,$t \in [q\rangle$ 为节点参数。为此类比较操作实现CAM需将 $t$ 映射(即编码)到若干数量为 $n$ 的单元内部状态,并将 $x$ 映射到这些单元的输入,目标是最小化 $n$。本文针对多种比较函数族以及所有函数 $[q\rangle\rightarrow\mathbb{B}$ 的集合,在CAM单元输入与状态字母表的多种场景下,给出了相应映射方案。所有映射均被证明是最优的,即在给定任意 $q$ 下可达到最小可能的 $n$。
Alphabet is mostly a collection of companies. This newer Google is a bit slimmed down, with the companies that are pretty far afield of our main internet products contained in Alphabet instead.https://abc.xyz/