IP Library › Granted Patent US 10,489,205
Granted Patent B2
US 10,489,205 · App. 14/138,967 · Granted Nov 26, 2019

Enqueuing kernels from kernels on GPU/CPU

Inventor: Aaftab A. Munshi (Los Gatos, CA)
Assignee: Apple Inc.
G06F9/5027G06F9/5044
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,489,205
App. No.
14/138,967
Granted
Nov 26, 2019
Kind
B2
Abstract

Graphics processing units (GPUs) and other compute units are allowed to enqueue tasks for themselves by themselves, without needing a host processor to queue the work for the GPU. Built-in functions enable kernels to enqueue kernels for execution on a device. In some embodiments, ndrange kernels execute over an N-dimensional range to provide data-parallel operations. Task kernels provide task-parallel operations. In some embodiments, kernels may be defined using clang block syntax. The order of execution of commands on a compute unit may be constrained or allow execution of commands out-of-order. Compute units may control when kernels enqueued by the compute unit begins execution.

Claims (32)

1. A program storage device, on which are stored instructions, comprising instructions that when executed cause one or more compute units to:

enqueue a first kernel by a first compute unit for execution on a second compute unit, wherein the second compute unit is a graphical processing unit, and the first kernel operates over a first range;

determine, based on the execution of the first kernel, that a new range is required; and

enqueue a second kernel by execution of the first kernel on the second compute unit, the second kernel for execution on the second compute unit, wherein the second kernel operates over a second range.

2. The program storage device of claim 1 , wherein the second kernel is a new instance of the first kernel, and the first compute unit and the second compute unit are the same physical or logical compute unit.

3. The program storage device of claim 1 , wherein the instructions further comprise instructions that when executed cause the one or more compute units to control when the second kernel begins execution.

4. The program storage device of claim 3 , wherein the instructions that when executed cause the one or more compute units to control when the second kernel begins execution comprise instructions that when executed cause the one or more compute units to allow the second kernel to begin execution without waiting for the first kernel to complete execution.

5. The program storage device of claim 1 , wherein the instructions that when executed cause the one or more compute units to control when the second kernel begins execution comprise instructions that when executed cause the one or more compute units to cause the second kernel to wait before beginning execution for a workgroup that enqueued the second kernel to complete execution.

6. The program storage device of claim 1 , wherein the instructions further comprise instructions that when executed cause the second compute unit to enqueue a barrier on a queue of commands that blocks execution of commands enqueued on the queue of commands after the barrier until the barrier completes.

7. The program storage device of claim 1 , wherein the instructions further comprise instructions that when executed cause the second compute unit to enqueue a marker on a queue of commands that does not complete until one or more other commands completes.

8. The program storage device of claim 1 , wherein the instructions further comprise instructions that when executed cause the second compute unit to manipulate events that identify commands enqueued on a command queue from the first compute unit.

9. The program storage device of claim 1 , wherein the instructions further comprise instructions that when executed cause the second compute unit to manipulate events that identify commands enqueued on a command queue by the first kernel or the second kernel.

10. A computing device, comprising:

one or more compute units; and

a global memory, coupled to the one or more compute units, on which are stored instructions comprising instructions that when executed cause one or more of the one or more compute units to:

receive a first kernel for execution on a first compute unit of the one or more compute units, wherein the first compute unit is a graphical processing unit and the first kernel operates over a first range;

determine, based on the execution of the first kernel, that a new range is required; and

enqueue a second kernel by execution of the first kernel on a second compute unit, wherein the second kernel operates over a second range.

11. The computing device of claim 10 , wherein the instructions further comprise instructions that when executed cause one or more of the compute units to control an order of execution of commands on the first compute unit by the second kernel.

12. The computing device of claim 10 , wherein the instructions further comprise instructions that when executed cause one or more of the compute units to control when the second kernel begins operation.

13. The computing device of claim 10 , wherein the second kernel is enqueued on a graphic processor compute unit.

14. A method, comprising:

enqueueing a first kernel by a first compute unit for execution on a second compute unit, wherein the second compute unit is a graphical processing unit and the first kernel operates over a first range;

determining, based on the execution of the first kernel, that a new range is required; and

enqueueing a second kernel for execution on the second compute unit by the first kernel, wherein the second kernel operates over a second range.

15. The method of claim 14 , further comprising:

controlling when the second kernel begins execution relative to completion of the first kernel.

16. The method of claim 14 , wherein the first compute unit and the second compute unit are the same physical or logical compute unit.

17. The method of claim 14 , wherein the second compute unit enqueues a barrier on a queue of commands that blocks execution of commands enqueued on the queue of commands after the barrier until the barrier completes.

18. The method of claim 17 , wherein the second compute unit enqueues a marker on a queue of commands that does not complete until one or more other commands completes.

19. The method of claim 14 , wherein the second compute unit manipulates events that identify commands enqueued on a command queue from the first compute unit.

20. The method of claim 19 , wherein the second compute unit manipulates events that identify commands enqueued on a command queue by the first kernel or the second kernel.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2014
From: MUNSHI, AAFTAB A.
To: APPLE INC.
Reel/Frame 032043/0773 →
Continuity (2)
Provisional Application 61856513 · Jul 19, 2013
Related Publication 20150022538A1 · Jan 22, 2015
Cited By (1)
US 12,354,181