- 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 n≥229 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: 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 (c) and group size (g) 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 3: Streaming multiprocessor and memory/caching layout of the RTX 4090, highlighting the architectural targets for coalesced kernel design.
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 (n≤224), vectorized loads with chunk size c=8 are optimal. For large arrays, coalesced loading with chunk size c=32 and group size g=16 aligns well with GPU cache lines and delivers highest throughput.
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× and 13× overhead, respectively.
- Index construction time for GPU-RMQ is up to 100× faster than LCA, c0 faster than RTXRMQ, and c1 faster than state-of-the-art CPU approaches.
- Query throughput for large workloads yields up to c2 improvement over LCA and c3 over RTXRMQ. Compared to highly-parallelized CPU methods, GPU-RMQ is up to c4 faster.
Figure 7: Comparative memory footprint scaling of GPU-resident methods, with GPU-RMQ exhibiting minimal overhead and sustained viability for large arrays.
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 c5-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).