We present a parallel scan (prefix sum) algorithm in the Tensor Core Unit (TCU) model of computation. The TCU model assumes that multiplication between two square matrices of constant size $s$ is a basic operation. In the $(s^2, \ell)$-TCU model, we show that for inputs of size $n$, the algorithm has depth at most $2\lfloor \log_s (n)\rfloor$ and runs in $O(n(1 + \ell /s^2)/p + (s^2 + \ell) \log_s (n))$ time assuming $p$ tensor core units. Equivalently, the algorithm performs $O(n/s^2)$ multiplications of square matrices of size s.
翻译:本文提出了一种在张量核心单元(TCU)计算模型下的并行扫描(前缀和)算法。TCU模型假设两个恒定尺寸$s$的方阵之间的乘法是基本运算。在$(s^2, \ell)$-TCU模型中,我们证明对于规模为$n$的输入,该算法在$p$个张量核心单元下的深度至多为$2\lfloor \log_s (n)\rfloor$,运行时间为$O(n(1 + \ell /s^2)/p + (s^2 + \ell) \log_s (n))$。等价地说,该算法执行$O(n/s^2)$次尺寸为s的方阵乘法运算。