IP Library Granted Patent US 12,299,454
Granted Patent B2
US 12,299,454 · App. 18/182,768 · Granted May 13, 2025

Effective and scalable building and probing of hash tables using multiple GPUs

Inventors: Tim Kaldewey (Bala Cynwyd, PA); Jiri Johannes Kraus (Bonn, DE); Nikolay Sakharnykh (Chicago, IL)
Assignee: NVIDIA Corporation
G06F9/3877G06F9/5061G06F9/544G06F16/2456G06F16/283H04L9/0643
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,299,454
App. No.
18/182,768
Granted
May 13, 2025
Kind
B2
Abstract

Described approaches provide for effectively and scalably using multiple GPUs to build and probe hash tables and materialize results of probes. Random memory accesses by the GPUs to build and/or probe a hash table may be distributed across GPUs and executed concurrently using global location identifiers. A global location identifier may be computed from data of an entry and identify a global location for an insertion and/or probe using the entry. The global location identifier may be used by a GPU to determine whether to perform an insertion or probe using an entry and/or where the insertion or probe is to be performed. To coordinate GPUs in materializing results of probing a hash table a global offset to the global output buffer may be maintained in memory accessible to each of the GPUs or the GPUs may compute global offsets using an exclusive sum of the local output buffer sizes.

Claims (44)

1. A method comprising:

receiving one or more queries indicating one or more join operations corresponding to one or more tables stored in one or more relational databases;

generating a hash table comprising hash values corresponding to one or more first portions of the one or more tables, wherein a plurality of graphics processing units (GPUs) are assigned respective partitions of the hash table that represent respective parts of the hash table;

computing, from an entry corresponding to one or more second portions of the one or more tables, a global location identifier that corresponds to one or more locations in the hash table;

determining, using the global location identifier, the entry corresponds to at least one hash table partition of the partitions of the hash table, the at least one hash table partition assigned to a GPU of the plurality of GPUs; and

probing, using the GPU and based at least on the entry being determined to correspond to the at least one hash table partition assigned to the GPU, the at least one hash table partition corresponding to the GPU to produce one or more results of the one or more join operations.

2. The method of claim 1 , wherein the probing is performed based at least on determining that a hash value of one or more keys of the entry falls within the at least one hash table partition assigned to the GPU.

3. The method of claim 1 , wherein the global location identifier includes a global hash index that identifies a location for the entry in the hash table.

4. The method of claim 1 , further comprising:

filtering, using the GPU, entries from at least a portion of a probe table corresponding to the one or more second portions of the one or more tables based at least on the global location identifier indicating the entries correspond to the GPU to generate a filtered portion of the probe table that does not include the entries; and

transmitting the filtered portion of the probe table to a different GPU of the plurality of GPUs, the transmitting causing one or more probes of the hash table using of one or more entries in the filtered portion of the probe table.

5. The method of claim 1 , wherein the entry is received, by the GPU, from a different GPU of the plurality of GPUs based at least on the entry being determined to correspond to the at least one hash table partition assigned to the GPU.

6. The method of claim 1 , wherein:

The GPU reads the entry from a first portion of a probe table corresponding to the one or more second portions of the one or more tables in a first buffer of the GPU used to analyze the entry in an iteration of the GPU iteratively analyzing entries of the probe table for probing the hash table, and the method further includes:

receiving, from a different GPU of the plurality of GPUs, a second portion of the probe table at a second buffer of the GPU that is used as a staging buffer in the iteration for a subsequent iteration of the GPU iteratively analyzing entries of the probe table for probing the hash table.

7. The method of claim 1 , wherein the one or more queries include one or more OnLine Analytical Processing queries.

8. One or more processors comprising:

one or more circuits to:

receive one or more queries indicating one or more join operations corresponding to one or more tables stored in one or more relational databases;

read, using a first graphics processing unit (GPU) of a plurality of GPUs, an entry corresponding to one or more first portions of the one or more tables;

compute, from the entry, a global location identifier that corresponds to one or more locations in a hash table comprising hash values corresponding to one or more second portions of the one or more tables, wherein the plurality of GPUs are assigned respective partitions of the hash table that represent respective parts of the hash table;

determine, using the global location identifier, the entry corresponds to at least one hash table partition of the partitions of the hash table, the at least one hash table partition assigned to a second GPU of the plurality of GPUs; and

cause the at least one hash table partition to be probed to produce one or more results of the one or more join operations based at least on the entry being determined to correspond to the at least one hash table partition assigned to the second GPU.

9. The one or more processors of claim 8 , wherein the causing the at least one hash table partition to be probed includes transmitting, using the first GPU, at least the entry for probing of the at least one hash table partition using the second GPU.

10. The one or more processors of claim 8 , wherein the causing the hash table partition to be probed includes remotely probing, using the first GPU, the at least one hash table partition at the second GPU.

11. The one or more processors of claim 8 , wherein the causing the at least one hash table partition to be probed is based at least on determining that a hash value of one or more keys of the entry falls within the at least one hash table partition assigned to the second GPU.

12. The one or more processors of claim 8 , wherein the global location identifier includes a global hash index that identifies a location for the entry in the hash table.

13. The one or more processors of claim 8 , wherein the one or more circuits are further to:

filter, using the first GPU, entries from at least a portion of a probe table corresponding to the one or more first portions of the one or more tables based at least on the global location identifier indicating the entries correspond to the first GPU to generate a filtered portion of the probe table that does not include the entries; and

transmit the filtered portion of the probe table to a different GPU of the plurality of GPUs, the transmitting causing one or more probes of the hash table using of one or more entries included in the filtered portion of the probe table.

14. The one or more processors of claim 8 , wherein at least a portion of a probe table corresponding to the one or more first portions of the one or more tables is received, by the first GPU, from a different GPU of the plurality of GPUs based at least on the entry being determined to correspond to the at least one hash table partition assigned to the second GPU.

15. The one or more processors of claim 8 , wherein:

the reading the entry is from a first portion of a probe table corresponding to the one or more first portions of the one or more tables in a first buffer of the GPU used to analyze the entry in an iteration of the GPU iteratively analyzing entries of the probe table for probing the hash table, and the one or more circuits are further to:

receive, from a different GPU of the plurality of GPUs, a second portion of the probe table at a second buffer of the GPU that is used as a staging buffer in the iteration for a subsequent iteration of the GPU iteratively analyzing entries of the probe table for probing the hash table.

16. The one or more processors of claim 8 , wherein the one or more queries include one or more OnLine Analytical Processing queries.

17. A system comprising:

a plurality of graphics processing units (GPUs) to perform collaborative probing of a hash table corresponding to one or more first portions of one or more tables stored in one or more relational databases based at least on one or more queries indicating one or more operations corresponding to the one or more tables, wherein the plurality of GPUs are assigned respective partitions of the hash table that represent respective parts of the hash table, and

wherein a GPU of the plurality of GPUs:

determines, from data read from an entry corresponding to one or more second portions of the one or more tables, a global location identifier that corresponds to one or more locations in the hash table, and

determines, using the global location identifier, the entry corresponds to at least one hash table partition of the partitions of the hash table, the at least one hash table partition assigned to a designated GPU from the plurality of GPUs;

wherein the at least one hash table partition is probed, using the designated GPU, to produce one or more results of the one or more operations based at least on the entry being determined to correspond to the at least one hash table partition assigned to the designated GPU.

18. The system of claim 17 , wherein the GPU provides at least the entry to a different one of the plurality of GPUs based at least on the GPU determining, using the global location identifier, the designated GPU is different than the GPU.

19. The system of claim 17 , wherein the GPU probes the hash table partition based at least on the global location identifier indicating the GPU is the designated GPU.

20. The system of claim 17 , wherein the plurality of GPUs are logically arranged in a ring, and the probing further includes each GPU of the plurality of GPUs providing a plurality of entries of a respective portion of a probe table corresponding to the one or more second portions of the one or more tables to a neighbor GPU in the ring.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 21, 2023
From: KALDEWEY, TIM; KRAUS, JIRI JOHANNES; SAKHARNYKH, NIKOLAY
To: NVIDIA CORPORATION
Reel/Frame 063044/0432 →
Continuity (3)
Continuation 16656375 · Oct 17, 2019
Provisional Application 62749511 · Oct 23, 2018
Related Publication 20230214225A1 · Jul 6, 2023
References Cited (40)
US 8055856B2 · Coon · 2011 [cited by examiner]
US 8185459B2 · Wall · 2012 [cited by examiner]
US 8392463B2 · Gautam · 2013 [cited by examiner]
US 9213732B2 · Müller · 2015 [cited by examiner]
US 9600852B2 · Demouth · 2017 [cited by applicant]
US 9971808B2 · Kamath · 2018 [cited by examiner]
US 10002303B2 · Wall · 2018 [cited by examiner]
US 10331669B2 · Kamath · 2019 [cited by examiner]
US 11030714B2 · Das · 2021 [cited by applicant]
US 11604654B2 · Kaldewey et al. · 2023 [cited by applicant]
US 20080028181A1 · Tong et al. · 2008 [cited by applicant]
US 20090240860A1 · Coon · 2009 [cited by examiner]
US 20090285471A1 · Wall · 2009 [cited by examiner]
US 20110202745A1 · Bordawekar · 2011 [cited by examiner]
US 20110264626A1 · Gautam et al. · 2011 [cited by applicant]
US 20120224763A1 · Wall · 2012 [cited by examiner]
US 20130141444A1 · Gautam · 2013 [cited by examiner]
US 20140330801A1 · Kaldewey · 2014 [cited by examiner]
US 20140333635A1 · Demouth · 2014 [cited by applicant]
US 20140337313A1 · Becerra et al. · 2014 [cited by applicant]
US 20150286639A1 · Bordawekar · 2015 [cited by applicant]
US 20160147450A1 · Derby · 2016 [cited by examiner]
US 20160378751A1 · Kamath et al. · 2016 [cited by applicant]
US 20160378754A1 · Kamath · 2016 [cited by examiner]
US 20170228373A1 · Mueller · 2017 [cited by examiner]
US 20180137163A1 · Bensberg · 2018 [cited by examiner]
US 20190236752A1 · Das · 2019 [cited by examiner]
US 20210133917A1 · Tu · 2021 [cited by examiner]
US 20230214225A1 · Kaldewey et al. · 2023 [cited by applicant]
CN 103559017A · 2014 [cited by applicant]
CN 105612490A · 2016 [cited by applicant]
CN 106415540A · 2017 [cited by applicant]
Notice of Allowance for U.S. Appl. No. 16/656,375, filed Oct. 17, 2019, mailed Nov. 3, 2022, 10 pgs. [cited by applicant]
International Preliminary Report on Patentability for PCT Application No. PCT/US2019/056801, filed Oct. 17, 2017, mailed May 6, 2021, 8 pgs. [cited by applicant]
International Search Report and Written Opinion in PCT Application No. PCT/US2019/056801, filed Oct. 17, 2019, mailed Mar. 27, 2020, 9 pgs. [cited by applicant]
Kaldeway, et al. “GPU Acceleration for OLAP”, presented at GPU Technology Conference, S8289—How to Get the Most out of GPU Accelerated Database Operators, Mar. 26-29, 2018, 51 pgs. [cited by applicant]
Karnagel, et al.; “Big Data Causing Big (TLB) Problems: Taming Random Memory Accesses on The GPU”; In Proceedings of the 13th International Workshop on Data Management on New Hardware, 2017, 10 pgs. [cited by applicant]
Kaldewey, et al.; “GPU Join Processing Revisited”, In Proceedings of the Eighth International Workshop on Data Management on New Hardware, ACM, 2012, 8 pgs. [cited by applicant]
Kaldewey, Tim; Notice of Registration for Chinese Patent Application No. 201980083821.7, filed Jun. 17, 2021, mailed Jul. 30, 2024, 5 pgs. [cited by applicant]
Kaldeway, Tim; First Office Action for Chinese Patent Application No. 201980083821.7, filed Jun. 17, 2021, mailed Feb. 4, 2024, 13 pgs. [cited by applicant]