IP Library Granted Patent US 10,026,145
Granted Patent B2
US 10,026,145 · App. 15/377,498 · Granted Jul 17, 2018

Resource sharing on shader processor of GPU

Inventors: Alexei Vladimirovich Bourd (San Diego, CA); Maxim Kazakov (San Diego, CA); Chunhui Mei (San Diego, CA); Sumesh Udayakumaran (San Diego, CA)
Assignee: QUALCOMM Incorporated
G06T1/20G06T15/005G06T1/60G06T2210/52
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,026,145
App. No.
15/377,498
Granted
Jul 17, 2018
Kind
B2
Abstract

Techniques for allowing for concurrent execution of multiple different tasks and preempted prioritized execution of tasks on a shader processor. In an example operation, a driver executed by a central processing unit (CPU) configures GPU resources based on needs of a first “host” shader to allow the first shader to execute “normally” on the GPU. The GPU may observe two sets of tasks, “guest” tasks. Based on, for example, detecting an availability of resources, the GPU may determine a “guest” task may be run while the “host” task is running. A second “guest” shader executes on a GPU by using resources that were configured for the first “host” shader if there are available resources and, in some examples, additional resources are obtained through software-programmable means.

Claims (53)

1. A method for operating a graphics processing unit (GPU), the method comprising:

allocating resources of a shader processor of the GPU for a first thread of a first shader based on a first resource footprint of the first shader;

receiving information from a driver identifying a second shader;

receiving an indication that a second resource footprint of the second shader is smaller than the first resource footprint of the first shader;

determining whether one or more processing elements of the shader processor is available based on the resources allocated for the first thread; and

based on the determination that one or more processing elements are available and the indication that the second resource footprint is smaller than the first resource footprint, executing a second thread of the second shader while using the resources allocated for the first thread of the first shader on the shader processor without reconfiguring the resources allocated for the first thread of the first shader.

2. The method of claim 1 , wherein executing the second thread of the second shader comprises executing the second thread of the second shader after the first thread of the first shader completes execution.

3. The method of claim 1 further comprising:

enqueuing the first shader onto a first queue for execution; and

enqueuing the second shader onto a second queue for execution.

4. The method of claim 1 , further comprising allocating resources via a bindless mechanism at runtime to the second shader apart from resources allocated for the first shader.

5. The method of claim 1 , wherein the second shader comprises instructions for at least a portion of a virtual reality time warping operation.

6. The method of claim 1 , wherein the first shader comprises a rendering vertex shader of a previous frame, and the second shader comprises a binning pass vertex shader of a current frame, wherein executing the second thread of the second shader comprises executing the second thread of the binning pass vertex shader in parallel with another thread of the rendering vertex shader.

7. The method of claim 1 , further comprising based on executing the second thread of the second shader while using the resources allocated for the first thread of the first shader on the shader processor, executing a third thread of the first shader.

8. The method of claim 1 , based on an indication that the second resource footprint is larger than the first resource footprint, executing a third thread of the first shader and not executing the second shader while using the resources allocated for the first thread of the first shader.

9. The method of claim 1 , wherein the first resource footprint and the second resource footprint each comprise a plurality of individual resource types and determining whether the second resource footprint of the second shader is smaller than the first resource footprint of the first shader comprises determining whether the second resource footprint is smaller than the first resource footprint with respect to each of the plurality of individual resource types.

10. The method of claim 1 , wherein executing the second thread of the second shader while using the resources allocated for the first thread of the first shader comprises executing the second thread of the second shader while using the resources allocated for the first thread of the first shader without backing up state information of the first thread of the first shader.

11. The method of claim 1 , wherein the first shader comprises a low priority shader and the second shader comprises a high priority shader.

12. An apparatus comprising:

a memory configured to store code for a first shader and a second shader; and

a graphics processing unit (GPU) comprising a shader processor and a command processor, the command processor configured to:

allocate resources of the shader processor for a first thread of the first shader based on a first resource footprint of the first shader;

receive information from a driver identifying the second shader;

receive an indication that a second resource footprint of the second shader is smaller than the first resource footprint of the first shader; and

determine whether one or more processing elements of the shader processor is available based on the resources allocated for the first thread;

the shader processor configured to, based on the determination that one or more processing elements are available and the indication that the second resource footprint is smaller than the first resource footprint, execute a second thread of the second shader while using the resources allocated for the first thread of the first shader without reconfiguring the resources allocated for the first thread of the first shader.

13. The apparatus of claim 12 , wherein the shader processor configured to execute the second thread of the second shader comprises the shader processor configured to execute the second thread of the second shader after the first thread of the first shader completes execution.

14. The apparatus of claim 12 wherein the GPU is configured to:

enqueue the first shader onto a first queue for execution; and

enqueue the second shader onto a second queue for execution.

15. The apparatus of claim 12 , wherein the command processor is configured to allocate resources via a bindless mechanism at runtime to the second shader apart from the resources allocated for the first shader.

16. The apparatus of claim 12 , wherein the second shader comprises instructions for at least a portion of a virtual reality time warping operation.

17. The apparatus of claim 12 , wherein the first shader comprises a rendering vertex shader of a previous frame and the second shader comprises a binning pass vertex shader of a current frame, and wherein the shader processor is configured to execute the second thread of the binning pass vertex shader in parallel with another thread of the rendering vertex shader.

18. The apparatus of claim 12 , wherein the shader processor is configured to, based on the execution of the second thread of the second shader while using the resources allocated for the first thread of the first shader on the shader processor, execute a third thread of the first shader.

19. The apparatus of claim 12 , wherein the shader processor is configured to, based on an indication that the second resource footprint is larger than the first resource footprint, execute a third thread of the first shader and not executing the second shader while using the resources allocated for the first thread of the first shader.

20. The apparatus of claim 12 , wherein the first resource footprint and the second resource footprint each comprise a plurality of individual resource types and wherein the command processor is configured to determine whether the second resource footprint is smaller than the first resource footprint with respect to each of the plurality of individual resource types.

21. The apparatus of claim 12 , wherein the shader processor is configured to execute the second thread of the second shader while using the resources allocated for the first thread of the first shader without backing up state information of the first thread of the first shader.

22. The apparatus of claim 12 , wherein the first shader comprises a low priority shader and the second shader comprises a high priority shader.

23. A non-transitory computer-readable storage medium including instructions stored thereon that, when executed, cause at least one processor of to:

allocate resources of a shader processor of the GPU for a first thread of a first shader based on a first resource footprint of the first shader;

receive information from a driver identifying a second shader;

receive an indication that a second resource footprint of the second shader is smaller than the first resource footprint of the first shader;

determine whether one or more processing elements of the shader processor is available based on the resources allocated for the first thread; and

based on the determination that one or more processing elements are available and the indication that the second resource footprint is smaller than the first resource footprint, execute a second thread of the second shader while using the resources allocated for the first thread of the first shader on the shader processor without reconfiguring the resources allocated for the first thread of the first shader.

24. The non-transitory computer-readable storage medium of claim 23 , wherein the first resource footprint and the second resource footprint each comprise a plurality of individual resource types and determining whether the second resource footprint of the second shader is smaller than the first resource footprint of the first shader comprises determining whether the second resource footprint is smaller than the first resource footprint with respect to each of the plurality of individual resource types.

25. The non-transitory computer-readable storage medium of claim 23 , wherein the instructions, when executed, further cause at least one processor to execute the second thread of the second shader while using the resources allocated for the first thread of the first shader without backing up state information of the first thread of the first shader.

26. The non-transitory computer-readable storage medium of claim 23 , wherein the first shader comprises a rendering vertex shader of a previous frame and the second shader comprises a binning pass vertex shader of a current frame and wherein the instructions, when executed, further cause at least one processor to execute the second thread of the binning pass vertex shader in parallel with another thread of the rendering vertex shader.

27. An apparatus for operating a graphics processing unit (GPU), the method comprising:

means for allocating resources of a shader processor of the GPU for a first thread of a first shader based on a first resource footprint of the first shader;

means for receiving information from a driver identifying a second shader;

means for receiving an indication that a second resource footprint of the second shader is smaller than the first resource footprint of the first shader;

means for determining whether one or more processing elements of the shader processor is available based on the resources allocated for the first thread; and

means for executing a second thread of the second shader while using the resources allocated for the first thread of the first shader on the shader processor based on the determination that one or more processing elements are available and the indication that the second resource footprint is smaller than the first resource footprint without reconfiguring the resources allocated for the first thread of the first shader.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 22, 2016
From: BOURD, ALEXEI VLADIMIROVICH; KAZAKOV, MAXIM; MEI, CHUNHUI; UDAYAKUMARAN, SUMESH
To: QUALCOMM INCORPORATED
Reel/Frame 040746/0004 →
Continuity (1)
Related Publication 20180165786A1 · Jun 14, 2018
Cited By (4)
US 12,190,164 US 12,333,339 US 12,354,181 US 12,596,572