Heterogeneous CPU-GPU Epsilon Grid Joins: Static and Dynamic Work Partitioning Strategies

Abstract Given two datasets (or tables) A and B and a search distance $$\epsilon$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mi>ϵ</mml:mi> </mml:math> , the distance similarity join, denoted as $$A \ltimes _\epsilon B$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>A</mml:mi> <mml:msub> <mml:mo>⋉</mml:mo> <mml:mi>ϵ</mml:mi> </mml:msub> <mml:mi>B</mml:mi> </mml:mrow> </mml:math> , finds the pairs of points ( $$p_a$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>a</mml:mi> </mml:msub> </mml:math> , $$p_b$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>b</mml:mi> </mml:msub> </mml:math> ), where $$p_a \in A$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>a</mml:mi> </mml:msub> <mml:mo>∈</mml:mo> <mml:mi>A</mml:mi> </mml:mrow> </mml:math> and $$p_b \in B$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>b</mml:mi> </mml:msub> <mml:mo>∈</mml:mo> <mml:mi>B</mml:mi> </mml:mrow> </mml:math> , and such that the distance between $$p_a$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>a</mml:mi> </mml:msub> </mml:math> and $$p_b$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:msub> <mml:mi>p</mml:mi> <mml:mi>b</mml:mi> </mml:msub> </mml:math> is $$\le \epsilon$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mo>≤</mml:mo> <mml:mi>ϵ</mml:mi> </mml:mrow> </mml:math> . If $$A = B$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>A</mml:mi> <mml:mo>=</mml:mo> <mml:mi>B</mml:mi> </mml:mrow> </mml:math> , then the similarity join is equivalent to a similarity self-join, denoted as $$A \bowtie _\epsilon A$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mi>A</mml:mi> <mml:msub> <mml:mo>⋈</mml:mo> <mml:mi>ϵ</mml:mi> </mml:msub> <mml:mi>A</mml:mi> </mml:mrow> </mml:math> . We propose in this paper Heterogeneous Epsilon Grid Joins ( HEGJoin ), a heterogeneous CPU-GPU distance similarity join algorithm. Efficiently partitioning the work between the CPU and the GPU is a challenge. Indeed, the work partitioning strategy needs to consider the different characteristics and computational throughput of the processors (CPU and GPU), as well as the data-dependent nature of the similarity join that accounts in the overall execution time (e.g., the number of queries, their distribution, the dimensionality, etc.). In addition to HEGJoin , we design in this paper a dynamic and two static work partitioning strategies. We also propose a performance model for each static partitioning strategy to perform the distribution of the work between the processors. We evaluate the performance of all three partitioning methods by considering the execution time and the load imbalance between the CPU and GPU as performance metrics. HEGJoin achieves a speedup of up to $$5.46\times$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mn>5.46</mml:mn> <mml:mo>×</mml:mo> </mml:mrow> </mml:math> ( $$3.97\times$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mn>3.97</mml:mn> <mml:mo>×</mml:mo> </mml:mrow> </mml:math> ) over the GPU-only (CPU-only) algorithms on our first test platform and up to $$1.97\times$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mn>1.97</mml:mn> <mml:mo>×</mml:mo> </mml:mrow> </mml:math> ( $$12.07\times$$ <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"> <mml:mrow> <mml:mn>12.07</mml:mn> <mml:mo>×</mml:mo> </mml:mrow> </mml:math> ) on our second test platform over the GPU-only (CPU-only) algorithms.