Range minimum queries are frequently used in string processing and database applications including biological sequence analysis, document retrieval, and web search. Hence, various data structures have been proposed for improving their efficiency on both CPUs and GPUs.Recent work has also shown that hardware-accelerated ray tracing on modern NVIDIA RTX graphic cards can be exploited to answer range minimum queries by expressing queries as rays, which are fired into a scene of triangles representing minima of ranges at different granularities. While these approaches are promising, they suffer from at least one of three issues: severe memory overhead, high index construction time, and low query throughput. This renders these methods practically unusable on larger arrays: For example, the state-of-art GPU-based approaches LCA and RTXRMQ exceed the memory capacity of an NVIDIA RTX 4090 GPU for input arrays of size >= 2^29. To tackle these problems, in this work, we present a new approach called GPU-RMQ which is based on a hierarchical approach. GPU-RMQ first constructs a hierarchy of range minimum summaries on top of the original array in a highly parallel fashion. For query answering, only the relevant portions of the hierarchy are then processed in an optimized massively-parallel scan operation. Additionally, GPU-RMQ is hybrid in design enabling the use of both ray tracing cores and CUDA cores across different levels of the hierarchy to handle queries. Our experimental evaluation shows that GPU-RMQ outperforms the state-of-the-art approaches in terms of query throughput especially for larger arrays while offering a significantly lower memory footprint and up to two orders-of-magnitude faster index construction. In particular, it achieves up to ~8x higher throughput than LCA, ~17x higher throughput than RTXRMQ, and up to ~4800x higher throughput compared to an optimized CPU-based approach.
翻译:区间最小值查询频繁用于字符串处理和数据库应用中,包括生物序列分析、文档检索和网络搜索。因此,研究者提出了多种数据结构以在CPU和GPU上提升其效率。近期研究还表明,利用现代NVIDIA RTX显卡的硬件加速光线追踪技术,可通过将查询表示为射线并射入代表不同粒度区间最小值的三角形场景来回答区间最小值查询。尽管这些方法颇具前景,但它们至少存在以下三个问题之一:严重的内存开销、高昂的索引构建时间以及低查询吞吐量。这导致这些方法在实际应用中无法处理较大数组:例如,最先进的GPU方法LCA和RTXRMQ在输入数组大小≥2^29时,已超过NVIDIA RTX 4090 GPU的内存容量。为解决这些问题,本文提出了一种基于层级方法的新方案GPU-RMQ。GPU-RMQ首先以高度并行的方式在原数组之上构建区间最小值摘要的层级结构。在回答查询时,仅处理层级结构中的相关部分,并通过优化的大规模并行扫描操作完成计算。此外,GPU-RMQ采用混合设计,可在层级结构的不同层中同时使用光线追踪核心和CUDA核心来处理查询。实验评估表明,GPU-RMQ在查询吞吐量方面优于最先进的方法,尤其针对较大数组,同时其内存占用显著更低,索引构建速度可提升两个数量级。具体而言,与LCA相比其吞吐量提升约8倍,与RTXRMQ相比提升约17倍,与优化的CPU方法相比提升高达约4800倍。