IP Library Granted Patent US 9,513,975
Granted Patent B2
US 9,513,975 · App. 13/462,649 · Granted Dec 6, 2016

Technique for computational nested parallelism

Inventors: Stephen Jones (San Francisco, CA); Philip Alexander Cuadra (San Francisco, CA); Daniel Elliot Wexler (Soda Springs, CA); Ignacio Llamas (Sunnyvale, CA); Lacky V. Shah (Los Altos Hills, CA); Jerome F. Duluk, Jr. (Palo Alto, CA); Christopher Lamb (San Jose, CA)
Assignee: NVIDIA Corporation
G06F9/522G06T1/20G06F2209/483
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 9,513,975
App. No.
13/462,649
Granted
Dec 6, 2016
Kind
B2
Abstract

One embodiment of the present invention sets forth a technique for performing nested kernel execution within a parallel processing subsystem. The technique involves enabling a parent thread to launch a nested child grid on the parallel processing subsystem, and enabling the parent thread to perform a thread synchronization barrier on the child grid for proper execution semantics between the parent thread and the child grid. This technique advantageously enables the parallel processing subsystem to perform a richer set of programming constructs, such as conditionally executed and nested operations and externally defined library functions without the additional complexity of CPU involvement.

Claims (83)

1. A computer-implemented method for executing a child thread grid that is associated with a parent thread within a parallel processor, the method comprising:

receiving a first launch request from the parent thread for executing the child thread grid, wherein the parent thread executes within a first streaming multiprocessor within the parallel processor;

launching the child thread grid within a second streaming multiprocessor within the parallel processor independently of a central processing unit coupled to the parallel processor by performing a memory barrier operation to flush all pending write data from the parent thread to memory in order to ensure memory consistency between the parent thread and the child thread grid;

receiving a thread synchronization barrier request from the parent thread, wherein the parent thread is configured to block a first programming instruction of the parent thread corresponding to the thread synchronization barrier request from executing;

suspending execution of the parent thread;

receiving a notification that the child thread grid has completed executing; and

causing the parent thread to resume executing.

2. The method of claim 1 , wherein launching the child thread grid further comprises:

transmitting the first launch request to a first task descriptor queue; and

causing the child thread grid to begin executing within the second streaming multiprocessor based on the first launch request.

3. The method of claim 2 , wherein causing the child thread grid to begin executing comprises:

selecting the first launch request from the first task descriptor queue;

loading the child thread grid into the second streaming multiprocessor; and

initiating execution of the child thread grid at a predetermined instruction within the child thread grid.

4. The method of claim 2 , wherein suspending execution of the parent thread comprises:

saving execution state for the parent thread to a continuation buffer; and

de-allocating computation resources in the first streaming multiprocessor associated with the parent thread.

5. The method of claim 4 , wherein causing the parent thread to resume executing comprises:

transmitting a second launch request for executing the parent thread to the first task descriptor queue;

loading the parent thread within a third streaming multiprocessor based on the second launch request;

invalidating one or more caches associated with the third streaming multiprocessor;

restoring execution state for the parent thread from the continuation buffer into the third streaming multiprocessor;

causing the parent thread to continue executing, at a second programming instruction following to the first programming instruction.

6. The method of claim 5 , wherein transmitting the second launch request comprises

transmitting a third launch request for executing a scheduler thread to a second task descriptor queue in response to the child thread grid completing; and

causing the scheduler thread to execute,

wherein the scheduler thread is configured to generate and transmit the second launch request.

7. The method of claim 5 , wherein restoring execution state for the parent thread comprises executing a restoration program associated with the parent thread that reads the continuation buffer and restores execution state for the parent thread within the third streaming multiprocessor.

8. A parallel processing subsystem configured to execute a child thread grid that is associated with a parent thread within a parallel processor, the parallel processing subsystem comprising:

a memory system configured to store a plurality of task descriptor queues and a plurality of continuation buffers; and

an execution subsystem coupled to the memory system and configured to perform nested operations by:

receiving a first launch request from the parent thread for executing the child thread grid, wherein the parent thread executes within a first streaming multiprocessor within the parallel processor;

launching the child thread grid within a second streaming multiprocessor within the parallel processor independently of a central processing unit coupled to the parallel processor by performing a memory barrier operation to flush all pending write data from the parent thread to memory in order to ensure memory consistency between the parent thread and the child thread grid;

receiving a thread synchronization barrier request from the parent thread, wherein the parent thread is configured to block a first programming instruction of the parent thread corresponding to the thread synchronization barrier request from executing;

suspending execution of the parent thread;

receiving a notification that the child thread grid has completed executing; and

causing the parent thread to resume executing.

9. The parallel processing subsystem of claim 8 , wherein to launch the child grid, the execution subsystem is further configured to:

transmit the first launch request to a first task descriptor queue included in the plurality of task descriptor queues; and

cause the child thread grid to begin executing within the second streaming multiprocessor based on the first launch request.

10. The parallel processing subsystem of claim 9 , wherein to cause the child thread grid to begin executing, the execution subsystem is further configured to:

select the first launch request from the first task descriptor queue;

load the child thread grid into the second streaming multiprocessor; and

initiate executing the child thread grid at a predetermined instruction within the child thread grid.

11. The parallel processing subsystem of claim 9 , wherein to cause the child thread grid to begin executing, the execution subsystem is further configured to:

save execution state for the parent thread to a continuation buffer residing within the plurality of continuation buffers; and

de-allocate computation resources in the first streaming multiprocessor associated with the parent thread.

12. The parallel processing subsystem of claim 8 , wherein to cause the parent thread to resume executing, the execution subsystem is further configured to:

transmit a second launch request for executing the parent thread to the first task descriptor queue;

load the parent thread within a third streaming multiprocessor within the parallel processor based on the second launch request;

invalidate one or more caches associated with the third streaming multiprocessor;

restore execution state for the parent thread from the continuation buffer into the third streaming multiprocessor;

cause the parent thread to continue executing at a second programming instruction subsequent to the first programming instruction.

13. The parallel processing subsystem of claim 12 , wherein to transmit the second launch request, the execution subsystem is further configured to:

transmit a third launch request for executing a scheduler thread to a second task descriptor queue included in the plurality of task descriptor queues, in response to the child thread grid completing; and

cause the scheduler thread to execute, wherein the scheduler thread is configured to generate and transmit the second launch request.

14. The parallel processing subsystem of claim 12 , wherein to restore execution state for the parent thread, the execution subsystem is further configured to execute a restoration program associated with the parent thread that reads the continuation buffer and restores execution state for the parent thread within the third streaming multiprocessor.

15. The parallel processing subsystem of claim 8 , wherein the execution subsystem comprises:

a scheduler configured to read launch requests from a first task descriptor queue, a second task descriptor queue, and a third task descriptor queue and to generate work assignment requests from the launch requests; and

a distributor configured to allocate the work assignment requests to the first streaming multiprocessor, the second streaming multiprocessor, and a third streaming multiprocessor within the parallel processor,

wherein the third task descriptor queue is configured to receive task requests generated from a central processing unit coupled to the parallel processing subsystem.

16. The parallel processing subsystem of claim 15 , wherein the scheduler is further configured to prioritize launch requests residing in the first task descriptor queue, the second task descriptor queue, and the third task descriptor queue.

17. A computing system, comprising:

a parallel processing subsystem configured to execute a child thread grid that is associated with a parent thread within a parallel processor, the parallel processing subsystem including:

a memory system configured to store a plurality of task descriptor queues and a plurality of continuation buffers; and

an execution subsystem coupled to the memory system and configured to perform nested operations by:

receiving a first launch request from the parent thread for executing the child thread grid, wherein the parent thread executes within a first streaming multiprocessor within the parallel processor;

launching the child thread grid within a second streaming multiprocessor within the parallel processor independently of a central processing unit coupled to the parallel processor by performing a memory barrier operation to flush all pending write data from the parent thread to memory in order to ensure memory consistency between the parent thread and the child thread grid;

receiving a thread synchronization barrier request from the parent thread, wherein the parent thread is configured to block a first programming instruction of the parent thread corresponding to the thread synchronization barrier request from executing;

suspending execution of the parent thread;

receiving a notification that the child thread grid has completed executing; and

causing the parent thread to resume executing.

18. The computing device of claim 17 , wherein to launch the child grid, the execution subsystem is further configured to:

transmit the first launch request to a first task descriptor queue included in the plurality of task descriptor queues; and

cause the child thread grid to begin executing within the second streaming multiprocessor based on the first launch request.

19. The computing device of claim 18 , wherein to suspend execution of the parent thread, the execution subsystem is further configured to:

save execution state for the parent thread to a continuation buffer residing within the plurality of continuation buffers; and

de-allocate computation resources in the first streaming multiprocessor associated with the parent thread.

20. The computing device of claim 19 , wherein to restore execution state for the parent thread, the execution subsystem is further configured to execute a restoration program associated with the parent thread that reads the continuation buffer and restores execution state for the parent thread within a third streaming multiprocessor within the parallel processor.

21. The parallel processing subsystem of claim 17 , wherein the execution subsystem comprises:

a scheduler configured to read launch requests from a first task descriptor queue, a second task descriptor queue, and a third task descriptor queue and to generate work assignment requests from the launch requests;

a distributor configured to allocate the work assignment requests to the first streaming multiprocessor, the second streaming multiprocessor, and a third streaming multiprocessor within the parallel processor;

wherein the third task descriptor queue is configured to receive task requests generated by a central processing unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 13, 2012
From: JONES, STEPHEN; CUADRA, PHILIP ALEXANDER; WEXLER, DANIEL ELLIOT; LLAMAS, IGNACIO; SHAH, LACKY V.; DULUK, JR., JEROME F.; LAMB, CHRISTOPHER
To: NVIDIA CORPORATION
Reel/Frame 028546/0232 →
Continuity (1)
Related Publication 20130298133A1 · Nov 7, 2013