Papers
Topics
Authors
Recent
Search
2000 character limit reached

GPU-RMQ: Accelerating Range Minimum Queries on Modern GPUs

Published 2 Apr 2026 in cs.DB, cs.DC, and cs.DS | (2604.01811v1)

Abstract: 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 >= 229. 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.

Summary

  • The paper presents a hierarchical hybrid RMQ data structure that significantly outperforms existing GPU methods in throughput and index construction time.
  • It employs hardware-optimized strategies including cooperative thread groups, configurable chunk sizes, and hybrid CUDA/RT core processing to minimize memory footprint and enhance performance.
  • Empirical results demonstrate up to 4800× speedup and sustained scalability across various GPU generations, making it effective for large-scale applications.

GPU-RMQ: A Hierarchical and Hardware-Conscious Approach to High-Throughput Range Minimum Queries on Modern GPUs

Introduction

Efficient resolution of range minimum queries (RMQs), which compute the minimum value within an arbitrary interval of an array, is a critical subroutine in fields such as computational genomics, document retrieval, and large-scale text processing. Recent methods have exploited the massive concurrency offered by GPUs, including approaches that leverage both CUDA and hardware-accelerated ray tracing cores on modern NVIDIA architectures. However, these solutions are constrained by severe memory overheads, costly index construction, and insufficient throughput at scale.

"GPU-RMQ: Accelerating Range Minimum Queries on Modern GPUs" (2604.01811) presents a hierarchical, hybrid, and heavily hardware-optimized data structure for RMQs, achieving substantial improvements in scalability, query throughput, and construction time over prior art. This essay synthesizes the technical contributions, experimental analysis, and broader implications for future GPU data structure engineering.

Limitations of Existing GPU-Based RMQ Approaches

Prior GPU-based algorithms for RMQs, such as LCA-based methods utilizing Euler tours and geometric ray tracing via BVH in RTXRMQ, present several limitations. Both LCA and RTXRMQ exceed the 24 GB memory budget of an NVIDIA RTX 4090 for arrays of size n229n \geq 2^{29} due to storing redundant or heavyweight index structures. Moreover, their index construction phases are prohibitively slow and query runtime per RMQ increases drastically with input size, especially outside GPU caches. Figures in the study illustrate that both the memory footprint and runtime for these solutions scale poorly with input size. Figure 1

Figure 1

Figure 1

Figure 1: Memory requirements for state-of-the-art GPU RMQ approaches, illustrating severe overheads compared to GPU-RMQ and naïve GPU scan.

GPU-RMQ Architecture and Algorithmic Innovations

GPU-RMQ is built on a hierarchical minima summary scheme, effectively a multi-level structure storing partial range minima at progressively coarser granularity. Each upper layer is constructed from non-overlapping fixed-size chunks in the previous layer, supporting logarithmic-depth range decomposition. This enables batch answering of RMQs by scanning only relevant segments of the hierarchy, thus reducing the number of global memory accesses for each query.

For optimal throughput, GPU-RMQ employs:

  • Highly parallel construction: Each hierarchy layer is generated using cooperative thread groups, exploiting full GPU occupancy.
  • Configurable chunk and group sizes: Parameters such as chunk size (cc) and group size (gg) are tuned to maximize cache and memory bandwidth utilization.
  • Hybrid layer processing: The structure optionally integrates RT core-based processing for the top layer, while lower layers utilize CUDA cores, achieving hardware concurrency.
  • Optimized query assignment: Two mechanisms, multi-load and warp-local queuing (WLQ), balance memory-access count and thread utilization, with WLQ generally yielding superior memory bandwidth utilization.

The core operation—scanning for minima—is realized via two strategies: vector loading (for small chunks) and coalesced loading (for larger, cache-aligned batches), further reducing effective memory latency. Figure 2

Figure 3: Streaming multiprocessor and memory/caching layout of the RTX 4090, highlighting the architectural targets for coalesced kernel design.

Figure 4

Figure 2: Execution time profile for coalesced versus non-coalesced memory access on batched GPU workloads, demonstrating the throughput advantage of carefully aligned thread assignments.

Empirical Analysis: Tuning and Comparison with Baselines

A comprehensive parameter sweep experimentally identifies chunk and group size configurations yielding optimal performance across array sizes. For small arrays (n224n \leq 2^{24}), vectorized loads with chunk size c=8c = 8 are optimal. For large arrays, coalesced loading with chunk size c=32c = 32 and group size g=16g = 16 aligns well with GPU cache lines and delivers highest throughput. Figure 5

Figure 4: Normalized query time for GPU-RMQ variants as a function of chunk size and group size for different array sizes, reinforcing the importance of hardware-conscious tuning.

Through stepwise ablation and end-to-end evaluation, the following are established:

  • Memory footprint of GPU-RMQ is at most 30% above a naïve GPU full scan; LCA and RTXRMQ incur up to 5×5\times and 13×13\times overhead, respectively.
  • Index construction time for GPU-RMQ is up to 100×100\times faster than LCA, cc0 faster than RTXRMQ, and cc1 faster than state-of-the-art CPU approaches.
  • Query throughput for large workloads yields up to cc2 improvement over LCA and cc3 over RTXRMQ. Compared to highly-parallelized CPU methods, GPU-RMQ is up to cc4 faster. Figure 6

    Figure 7: Comparative memory footprint scaling of GPU-resident methods, with GPU-RMQ exhibiting minimal overhead and sustained viability for large arrays.

    Figure 8

    Figure 9: Average query time per RMQ across range sizes and array cardinalities, with GPU-RMQ dominating all baselines as array size increases.

Technical Implications and Profiling Insights

Detailed profiling on NVIDIA Nsight Compute reveals that GPU-RMQ exploits cache locality in upper hierarchy layers and maximizes utilization of memory coalescing. The design ensures that large-range queries hit cache- and bandwidth-efficient layers, narrowing the performance gap between small and large queries.

By contrast, LCA’s reliance on random accesses and uncoalesced traversals leads to severe memory bottlenecks and warp stalls, resulting in poor scalability beyond cache-resident working sets.

Furthermore, the study demonstrates that the theoretical benefits of hybrid CUDA/RT core computations are currently impeded by the overheads and limitations of the OptiX API (e.g., thread scheduling, lack of warp intrinsics). For existing hardware generations, pure CUDA-based hierarchical scan with optimized assignment remains preferable.

Portability and Generation-Dependence

The advantage of GPU-RMQ persists across architectural transitions: it maintains superior performance and array size viability even on both earlier (RTX 3090, Ampere) and state-of-the-art (RTX 6000 Pro, Blackwell) cards. With 96 GB of memory, RTX 6000 Pro allows GPU-RMQ to process cc5-element arrays, whereas previous methods are bottlenecked by auxiliary structure size.

Theoretical and Practical Impact

GPU-RMQ positions itself as an efficient, robust, and scalable reference design for batch RMQs, directly translatable into acceleration for string matching, sequence analysis, and large-scale retrieval workloads. The design philosophy—hierarchical summarization, parameter tunability, and hardware-pragmatic loading/assignment—can be generalized to other scan-heavy or range-query-intensive data structures.

In practice, GPU-RMQ enables in-core, high-throughput RMQ computations on arrays previously inaccessible to GPU-based solutions, directly supporting workflow acceleration for computational genomics (e.g., Minimap2 chaining module) and distributed text indexing.

Future Directions

While current results indicate that hybrid GPU resource utilization (CUDA+RT cores) does not surpass state-of-the-art, future revisions to hardware and low-level APIs may reduce these overheads. GPU-RMQ’s design is thus forward compatible with changes in GPU architecture, and its optimizations can inform future development of spatial indices, scan stacks, and even GPU-optimized tree-like data structures.

Conclusion

GPU-RMQ constitutes a significant advance in the design of parallel RMQ data structures for modern GPUs, combining hierarchical reduction, memory footprint minimization, and hardware-aware kernel optimization. By outperforming all competing CPU and GPU approaches across array sizes and workload types on commercial hardware, GPU-RMQ sets a new standard for high-throughput scan-heavy algorithms on accelerators. These principles are poised for broad adoption in general-purpose GPU data structure libraries and in performance-critical computational fields (2604.01811).

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We found no open problems mentioned in this paper.

Collections

Sign up for free to add this paper to one or more collections.