IP Library Granted Patent US 11,573,797
Granted Patent B2
US 11,573,797 · App. 17/474,828 · Granted Feb 7, 2023

Computing 2-body statistics on graphics processing units (GPUs)

Inventors: Yicheng Tu (Tampa, FL); Napath Pitaksirianan (Tampa, FL)
Assignee: UNIVERSITY OF SOUTH FLORIDA
G06F9/30098G06F9/30043
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 11,573,797
App. No.
17/474,828
Granted
Feb 7, 2023
Kind
B2
Abstract

Disclosed are various embodiments for computing 2-body statistics on graphics processing units (GPUs). Various types of two-body statistics (2-BS) are regarded as essential components of data analysis in many scientific and computing domains. However, the quadratic complexity of these computations hinders timely processing of data. According, various embodiments of the present disclosure involve parallel algorithms for 2-BS computation on Graphics Processing Units (GPUs). Although the typical 2-BS problems can be summarized into a straightforward parallel computing pattern, traditional wisdom from (general) parallel computing often falls short in delivering the best possible performance. Therefore, various embodiments of the present disclosure involve techniques to decompose 2-BS problems and methods for effective use of computing resources on GPUs. We also develop analytical models that guide users towards the appropriate parameters of a GPU program. Although 2-BS problems share the same core computations, each 2-BS problem however carries its own characteristics that calls for different strategies in code optimization. Accordingly, various embodiments of the present disclosure involve a software framework that automatically generates high-performance GPU code based on a few parameters and short primer code input.

Claims (74)

1. A system for solving two-body statistics (2-BS) problems with a graphics processing unit (GPU), comprising:

memory and the GPU;

machine readable instructions stored in the memory that, when executed by the GPU, cause the system to at least:

load a first input data block from the memory into a first cache region of the GPU, the first input data block comprising a first array of values;

load a second input data block from the memory into a second cache region of the GPU, the second input data block comprising a second array of values;

compute a distance function between each value in the first data block and each value in the second data block;

allocate a buffer in the memory;

divide the buffer into a plurality of pages;

assign a first page of the plurality of pages to a first thread that computes the distance function;

assign a second page of the plurality of pages to a second thread;

initialize a global pointer that references a position of an available page of the plurality of pages;

in response to one of the plurality of pages becoming full, assign the available page to the thread associated with the page that became full; and

update the global pointer to reference a position of a next available page of the plurality of pages.

2. The system of claim 1 , wherein the machine readable instructions that cause the system to compute the distance function between each value in the first data block and each value in the second data block further cause the system to at least:

load a value from the first array of values into a register of the GPU; and

compute the distance function between the value in the register of the GPU and each value in the second data block.

3. The system of claim 1 , wherein the distance function is provided as an input to the machine readable instructions.

4. The system of claim 1 , wherein the distance function is a first distance function and the machine readable instructions stored in the memory, when executed by the GPU, further cause the system to at least:

load a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

concurrently compute:

the first distance function between each value in the first data block and each value in the second data block; and

a second distance function between each value in the first data block and each value in the third data block.

5. The system of claim 1 , wherein the machine readable instructions stored in the memory, when executed by the GPU, further cause the system to at least:

load a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

compute the distance function between each value in the first data block and each value in the third data block using the second thread.

6. The system of claim 1 , wherein the first input data block is selected from a first data set and the second input data block is selected from a second data set.

7. A method for solving two-body statistics (2-BS) problems with a graphics processing unit (GPU), comprising:

loading a first input data block from memory into a first cache region of the GPU, the first input data block comprising a first array of values;

loading a second input data block from the memory into a second cache region of the GPU, the second input data block comprising a second array of values;

computing a distance function between each value in the first data block and each value in the second data block;

allocating a buffer in the memory;

dividing the buffer into a plurality of pages;

assigning a first page of the plurality of pages to a first thread that computes the distance function;

assigning a second page of the plurality of pages to a second thread;

initializing a global pointer that references a position of an available page of the plurality of pages;

in response to one of the plurality of pages becoming full, assigning the available page to the thread associated with the page that became full; and

updating the global pointer to reference a position of a next available page of the plurality of pages.

8. The method of claim 7 , wherein computing the distance function between each value in the first data block and each value in the second data block further comprises:

loading a value from the first array of values into a register of the GPU; and

computing the distance function between the value in the register of the GPU and each value in the second data block.

9. The method of claim 7 , further comprising receiving the distance function as an input provided by a user.

10. The method of claim 7 , wherein the distance function is a first distance function and the method further comprises:

loading a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

concurrently computing:

the first distance function between each value in the first data block and each value in the second data block; and

a second distance function between each value in the first data block and each value in the third data block.

11. The method of claim 7 , further comprising:

loading a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

computing the distance function between each value in the first data block and each value in the third data block using the second thread.

12. The method of claim 7 , wherein the first input data block is selected from a first data set and the second input data block is selected from a second data set.

13. A non-transitory, computer-readable medium comprising machine-readable instructions that, when executed by a processor of a computing device, cause the computing device to at least:

load a first input data block from memory into a first cache region of a Graphics Processing Unit (GPU), the first input data block comprising a first array of values;

loading a second input data block from the memory into a second cache region of the GPU, the second input data block comprising a second array of values;

computing a distance function between each value in the first data block and each value in the second data block;

allocate a buffer in the memory;

divide the buffer into a plurality of pages;

assign a first page of the plurality of pages to a first thread that computes the distance function;

assign a second page of the plurality of pages to a second thread;

initialize a global pointer that references a position of an available page of the plurality of pages;

in response to one of the plurality of pages becoming full, assign the available page to the thread associated with the page that became full; and

update the global pointer to reference a position of a next available page of the plurality of pages.

14. The non-transitory, computer-readable medium of claim 13 , wherein the machine-readable instructions that cause the computing device to compute the distance function between each value in the first data block and each value in the second data block further cause the computing device to at least:

load a value from the first array of values into a register of the GPU; and

compute the distance function between the value in the register of the GPU and each value in the second data block.

15. The non-transitory, computer-readable medium of claim 13 , wherein the machine-readable instructions further cause the computing device to receive the distance function as an input provided by a user.

16. The non-transitory, computer-readable medium of claim 13 , wherein the distance function is a first distance function and the machine-readable instructions, when executed by the processor, further cause the computing device to at least:

load a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

concurrently compute:

the first distance function between each value in the first data block and each value in the second data block; and

a second distance function between each value in the first data block and each value in the third data block.

17. The non-transitory, computer-readable medium of claim 13 , wherein the machine-readable instructions, when executed by the processor, further cause the computing device to at least:

load a third input data block from the memory into a third cache region, the third input block comprising a third array of values; and

compute the distance function between each value in the first data block and each value in the third data block using the second thread.

18. The non-transitory, computer-readable medium of claim 13 , wherein the first input data block is selected from a first data set and the second input data block is selected from a second data set.

Assignments (2)
CONFIRMATORY LICENSE Recorded Feb 3, 2025
From: UNIVERSITY OF SOUTH FLORIDA
To: NATIONAL SCIENCE FOUNDATION
Reel/Frame 070086/0228 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 12, 2022
From: TU, YICHENG; PITAKSIRIANAN, NAPATH
To: UNIVERSITY OF SOUTH FLORIDA
Reel/Frame 061395/0299 →
Continuity (3)
Continuation 16521852 · Jul 25, 2019
Provisional Application 62738228 · Sep 28, 2018
Related Publication 20220075620A1 · Mar 10, 2022