IP Library Granted Patent US 9,189,242
Granted Patent B2
US 9,189,242 · App. 12/885,299 · Granted Nov 17, 2015

Credit-based streaming multiprocessor warp scheduling

Inventors: John Erik Lindholm (Saratoga, CA); Brett W. Coon (San Jose, CA); Jered Wierzbicki (San Francisco, CA); Robert J. Stoll (Los Altos, CA); Stuart F. Oberman (Sunnyvale, CA)
Assignee: NVIDIA Corporation
G06F9/3851G06F9/3836G06F9/3885G06F9/3887G06F9/3889
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,189,242
App. No.
12/885,299
Granted
Nov 17, 2015
Kind
B2
Abstract

One embodiment of the present invention sets forth a technique for ensuring cache access instructions are scheduled for execution in a multi-threaded system to improve cache locality and system performance. A credit-based technique may be used to control instruction by instruction scheduling for each warp in a group so that the group of warps is processed uniformly. A credit is computed for each warp and the credit contributes to a weight for each warp. The weight is used to select instructions for the warps that are issued for execution.

Claims (55)

1. A method for computing credit values for groups of threads, comprising:

adding a terminated warp credit amount to a slush-fund value upon terminating a warp;

issuing a first instruction for execution by a first group of threads in a streaming multiprocessor during an issue cycle;

determining a warp identifier associated with the first group of threads;

updating a first warp credit for the first group of threads that is associated with the warp identifier;

determining that he slush-fund value indicates that credit is available for addition to a second warp credit; and

updating a second warp credit for a second group of threads that is associated with a different warp identifier in response to determining that the slush-fund value indicates that credit is available for addition to the second warp credit, the second group of threads having an eligible instruction ready for execution that was not issued for execution in the streaming multiprocessor during the issue cycle.

2. The method of claim 1 , further comprising the steps of:

determining a first weight value for the first group of threads based on the first warp credit;

determining a second weight value for the second group of threads based on the second warp credit; and

comparing the first weight value to the second weight value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

3. The method of claim 2 , wherein a first tile identifier indicating a region of an image that is processed by the first group of threads contributes to the first weight value and a second tile identifier indicating a region of an image that is processed by the second group of threads contributes to the second weight value.

4. The method of claim 2 , wherein a first phase identifier indicating a sequence of instructions for execution in the streaming multiprocessor that is the last sequence of instructions in a program or includes a cluster of non-dependent cache access instructions contributes to the first weight value and a second phase identifier indicating a sequence of instructions for execution in the streaming multiprocessor that is the last sequence of instructions in a program or includes a cluster of non-dependent cache access instructions contributes to the second weight value.

5. The method of claim 2 , wherein an indication that an instruction eligible to issue for the first group of threads is being replayed contributes to the first weight value and an indication that an instruction eligible to issue for the second group of threads is being replayed contributes to the second weight value.

6. The method of claim 2 , wherein the first weight value is based on a texture locality value that includes a tile value, a phase value, and a texture value, an age of a tile associated with the first instruction, and a factor indicating if a processing pipeline is oversubscribed.

7. The method of claim 1 , further comprising the step of comparing the first credit value to the second credit value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

8. The method of claim 1 , wherein determining that the slush-fund value indicates that credit is available for addition to the second warp credit comprises determining that the slush-fund value is greater than zero.

9. The method of claim 8 , wherein updating the second warp credit for the second group of threads comprises incrementing the second warp credit by a second value.

10. The method of claim 9 , further comprising decrementing the slush-fund value by a third value that is based on the second value.

11. The method of claim 10 , wherein the third value is equal to a number of victimized threads multiplied by the second value.

12. The method of claim 1 , wherein issuing a first instruction for execution by a first group of threads in a streaming multiprocessor during an issue cycle comprises issuing the first instruction together with a second instruction, wherein the first instruction and the second instruction are both associated with a single phase value, a single tile value, and a single texture.

13. A computer-readable storage medium storing instructions that, when executed by a streaming multiprocessor computes credit values for groups of threads that are executed in the streaming multiprocessor, by performing the steps of:

adding a terminated warp credit amount to a slush-fund value upon terminating a warp;

issuing a first instruction for execution by a first group of threads in the streaming multiprocessor during an issue cycle;

determining a warp identifier associated with the first group of threads;

updating a first warp credit for the first group of threads that is associated with the warp identifier;

determining that the slush-fund value indicates that credit is available for addition to a second warp credit; and

updating the second warp credit for a second group of threads that is associated with a different warp identifier in response to determining that the slush-fund value indicates that credit is available for addition to the second warp credit, the second group of threads having an eligible instruction ready for execution that was not issued for instruction in the streaming multiprocessor during the issue cycle.

14. The non-transitory computer-readable storage medium of claim 13 , further comprising the steps of:

determining a first weight value for the first group of threads based on the first warp credit;

determining a second weight value for the second group of threads based on the second warp credit; and

comparing the first weight value to the second weight value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

15. The non-transitory computer-readable storage medium of claim 14 , wherein an indication that an instruction eligible to issue for the first group of threads is being replayed contributes to the first weight value and an indication that an instruction eligible to issue for the second group of threads is being replayed contributes to the second weight value.

16. The non-transitory computer-readable storage medium of claim 13 , further comprising the step of comparing the first credit value to the second credit value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

17. A system for computing credit values for groups of threads that are executed in a streaming multiprocessor, the system comprising:

a warp scheduler and instruction unit configured to:

add a terminated warp credit amount to a slush-fund value upon terminating a warp;

issue a first instruction for execution by a first group of threads in a streaming multiprocessor during an issue cycle;

determine a warp identifier associated with the first group of threads;

update a first warp credit for the first group of threads that is associated with the warp identifier;

determine that the slush-fund value indicates that credit is available for addition to a second warp credit; and

update a second warp credit for a second group of threads that is associated with a different warp identifier in response to determining that the slush-fund value indicated that credit is available for addition to the second warp credit, the second group of threads having an eligible instruction ready for execution that was not issued for execution in the streaming multiprocessor during the issue cycle.

18. The system of claim 17 , further comprising a memory storing instructions that, when executed by the streaming multiprocessor, configures the streaming multiprocessor to:

issue the first instruction;

determine the warp identifier;

update the first warp credit; and

update the second warp credit.

19. The system of claim 17 , wherein the warp scheduler and instruction unit is further configured to:

determine a first weight value for the first group of threads based on the first warp credit;

determine a second weight value for the second group of threads based on the second warp credit; and

compare the first weight value to the second weight value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

20. The system of claim 19 , wherein a first tile identifier indicating a region of an image that is processed by the first group of threads contributes to the first weight value and a second tile identifier indicating a region of an image that is processed by the second group of threads contributes to the second weight value.

21. The system of claim 19 , wherein a first phase identifier indicating a sequence of instructions for execution in the streaming multiprocessor that is the last sequence of instructions in a program or includes a cluster of non-dependent cache access instructions contributes to the first weight value and a second phase identifier indicating a sequence of instructions for execution in the streaming multiprocessor that is the last sequence of instructions in a program or includes a cluster of non-dependent cache access instructions contributes to the second weight value.

22. The system of claim 19 , wherein an indication that an instruction eligible to issue for the first group of threads is being replayed contributes to the first weight value and an indication that an instruction eligible to issue for the second group of threads is being replayed contributes to the second weight value.

23. The system of claim 17 , wherein the warp scheduler and instruction unit is further configured to compare the first credit value to the second credit value to select a second instruction for execution in the streaming multiprocessor by either the first group of threads or the second group of threads.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 17, 2010
From: LINDHOLM, JOHN ERIK; COON, BRETT W.; WIERZBICKI, JERED; STOLL, ROBERT J.; OBERMAN, STUART F.
To: NVIDIA CORPORATION
Reel/Frame 025009/0340 →
Continuity (2)
Provisional Application 61245626 · Sep 24, 2009
Related Publication 20110072244A1 · Mar 24, 2011