IP Library Granted Patent US 10,922,085
Granted Patent B2
US 10,922,085 · App. 16/825,129 · Granted Feb 16, 2021

Scheduling of threads for execution utilizing load balancing of thread groups

Inventors: Balaji Vembu (Folsom, CA); Abhishek R. Appu (El Dorado Hills, CA); Joydeep Ray (Folsom, CA); Altug Koker (El Dorado Hills, CA)
Assignee: INTEL CORPORATION
G06F9/3851G06F9/46G06F9/4843G06F9/4881G06F9/5027G06F9/522G06F9/545G06F12/0866G06F12/0897G06F15/16G06F15/76G06T1/20G06T1/60G06F2209/5018G06T2200/28
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 10,922,085
App. No.
16/825,129
Granted
Feb 16, 2021
Kind
B2
Abstract

An apparatus to facilitate thread scheduling is disclosed. The apparatus includes logic to store barrier usage data based on a magnitude of barrier messages in an application kernel and a scheduler to schedule execution of threads across a plurality of multiprocessors based on the barrier usage data.

Claims (31)

1. An apparatus comprising:

one or more processors including a graphics processor, the one or more processors to analyze an application kernel to determine a magnitude of barrier messages in the application kernel and generate barrier usage data having a value corresponding to the magnitude of barrier messages in the application kernel; and

a memory to store the barrier usage data;

wherein the graphics processor includes:

a plurality of streaming multiprocessors, each streaming multiprocessor including a plurality of cores for execution of threads, and

a scheduler to schedule a plurality of thread groups for execution by the plurality of streaming multiprocessors according to a scheduling policy, the scheduling policy being based at least in part on load balancing of thread groups across the plurality of streaming multiprocessors, wherein the scheduler is to perform load balancing by performing one or more cost functions based at least in part on thread groups scheduled for the plurality of streaming multiprocessors, the barrier usage data, or both, wherein the one or more cost functions include a first cost function based on thread groups scheduled for each of the plurality of streaming multiprocessors and a second cost function based at least in part on the barrier usage data, the first cost function providing for determining a maximum of a number of free threads in each of the plurality of multiprocessors after scheduling threads of a thread group.

2. The apparatus of claim 1 , wherein the second cost function provides for determining a product of a first value, the first value being a barrier usage weight value, multiplied times a second value, the second value being based on a number of different streaming multiprocessors used by the thread group after scheduling threads of a thread group.

3. The apparatus of claim 2 , wherein the barrier usage weight value is a barrier usage weight value for the application kernel determined by a compiler.

4. The apparatus of claim 1 , wherein scheduling the thread groups to the plurality of streaming multiprocessors includes minimizing a final cost function based on the first cost function and the second cost function.

5. The apparatus of claim 4 , wherein the final cost function is a weighted sum of the first cost function and the second cost function.

6. The apparatus of claim 5 , wherein a weighting for one or both of the first cost function and the second cost function is a programmable value.

7. A method comprising:

analyzing an application kernel to determine a magnitude of barrier messages in the application kernel;

generating barrier usage data having a value corresponding to the magnitude of barrier messages in the application kernel;

receiving a plurality of thread groups for scheduling to a plurality of streaming multiprocessors of a graphics processor; and

scheduling execution of the plurality of thread groups to streaming multiprocessors of the plurality of streaming multiprocessors according to a scheduling policy, the scheduling policy being based at least in part on load balancing of thread groups across the plurality of streaming multiprocessors, wherein performing load balancing includes performing one or more cost functions based at least in part on thread groups scheduled for the plurality of streaming multiprocessors, the barrier usage data, or both, wherein the one or more cost functions include a first cost function based on thread groups scheduled for each of the plurality of streaming multiprocessors and a second cost function based at least in part on the barrier usage data, the first cost function providing for determining a maximum of a number of free threads in each of the plurality of multiprocessors after scheduling threads of a thread group.

8. The method of claim 7 , wherein the second cost function provides for determining a product of a first value, the first value being a barrier usage weight value, multiplied times a second value, the second value being based on a number of different streaming multiprocessors used by the thread group after scheduling threads of a thread group.

9. The method of claim 8 , wherein the barrier usage weight value is a barrier usage weight value for the application kernel determined by a compiler.

10. The method of claim 7 , wherein scheduling the thread groups to the plurality of streaming multiprocessors includes minimizing a final cost function based on the first cost function and the second cost function.

11. The method of claim 10 , wherein the final cost function is a weighted sum of the first cost function and the second cost function.

12. The method of claim 11 , wherein a weighting for one or both of the first cost function and the second cost function is a programmable value.

13. A non-transitory computer readable medium having instructions, which when executed by one or more processors, cause the processors to perform operations comprising:

analyzing an application kernel to determine a magnitude of barrier messages in the application kernel;

generating barrier usage data having a value corresponding to the magnitude of barrier messages in the application kernel;

receiving a plurality of thread groups for scheduling to a plurality of streaming multiprocessors of a graphics processor; and

scheduling execution of the plurality of thread groups to streaming multiprocessors of the plurality of streaming multiprocessors according to a scheduling policy, the scheduling policy being based at least in part on load balancing of thread groups across the plurality of streaming multiprocessors, wherein performing load balancing includes performing one or more cost functions based at least in part on thread groups scheduled for the plurality of streaming multiprocessors, the barrier usage data, or both, wherein the one or more cost functions include a first cost function based on thread groups scheduled for each of the plurality of streaming multiprocessors and a second cost function based at least in part on the barrier usage data, the first cost function providing for determining a maximum of a number of free threads in each of the plurality of multiprocessors after scheduling threads of a thread group.

14. The computer readable medium of claim 13 , wherein the second cost function provides for determining a product of a first value, the first value being a barrier usage weight value, multiplied times a second value, the second value being based on a number of different streaming multiprocessors used by the thread group after scheduling threads of a thread group.

15. The computer readable medium of claim 14 , wherein the barrier usage weight value is a barrier usage weight value for the application kernel determined by a compiler.

16. The computer readable medium of claim 13 , wherein scheduling the thread groups to the plurality of streaming multiprocessors includes minimizing a final cost function based on the first cost function and the second cost function.

17. The computer readable medium of claim 16 , wherein the final cost function is a weighted sum of the first cost function and the second cost function.

18. The computer readable medium of claim 17 , wherein a weighting for one or both of the first cost function and the second cost function is a programmable value.

Continuity (3)
Continuation 16388444 · Apr 18, 2019
Continuation 15477017 · Apr 1, 2017
Related Publication 20200285480A1 · Sep 10, 2020