IP Library Granted Patent US 9,858,122
Granted Patent B2
US 9,858,122 · App. 15/236,317 · Granted Jan 2, 2018

Data parallel computing on multiple processors

Inventors: Aaftab Munshi (Los Gatos, CA); Jeremy Sandmel (San Mateo, CA)
Assignee: Apple Inc.
G06F9/5044G06F9/4843G06F2209/5018
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,858,122
App. No.
15/236,317
Granted
Jan 2, 2018
Kind
B2
Abstract

A method and an apparatus that allocate one or more physical compute devices such as CPUs (Central Processing Units) or GPUs (Graphical Processing Units) attached to a host processing unit running an application for executing one or more threads of the application are described. The allocation may be based on data representing a processing capability requirement from the application for executing an executable in the one or more threads. A compute device identifier may be associated with the allocated physical compute devices to schedule and execute the executable in the one or more threads concurrently in one or more of the allocated physical compute devices concurrently.

Claims (39)

1. A computer implemented method comprising:

receiving, by a compute platform layer executing on a host processor from an application executing on the host processor, a request to identify any logical compute device that matches a processing requirement for a task corresponding to source code in the application;

evaluating, by the compute platform layer, logical compute devices for a match with the processing requirement, each logical compute device corresponding to one or more physical devices attached to the host processor, wherein the one or more physical devices comprise at least one of a central processing unit and a graphics processing unit;

determining, by the compute platform layer, compute identifiers for each matching logical compute device, the compute identifiers subsequently returned to the application for selection of one or more logical compute devices to execute the task; and

generating, by the compute platform layer, a context for at least one matching logical compute device.

2. The method of claim 1 further comprising

creating, by the compute platform layer, at least one logical compute device.

3. The method of claim 2 , wherein the evaluating comprises:

retrieving capabilities of each physical device from a data structure.

4. The method of claim 3 further comprising:

generating, by the compute platform layer, the data structure when the compute platform layer is initially executed; and

updating, by the compute platform layer, the data structure when a new physical device is attached to the host processor.

5. The method of claim 3 , wherein the evaluating is based on a match score indicating a level of match between the processing requirement and the capabilities of the one or more physical devices corresponding to each logical compute device.

6. The method of claim 1 , wherein the requests from the application are processed by an interpreter during the execution of the application.

7. A non-transitory computer readable storage medium storing instructions that cause a host processor to execute a compute platform layer comprising:

receiving, from an application executing on the host processor, a request to identify any logical compute device that matches a processing requirement for a task corresponding to source code in the application;

evaluating, by the compute platform layer, logical compute devices for a match with the processing requirement, each logical compute device corresponding to one or more physical devices attached to the host processor, wherein the one or more physical devices comprise at least one of a central processing unit and a graphics processing unit;

determining, by the compute platform layer, compute identifiers for each matching logical compute device, the compute identifiers subsequently returned to the application for selection of one or more logical compute devices to execute the task; and

generating, by the compute platform layer, a context for at least one matching logical compute device.

8. The non-transitory computer readable storage medium of claim 7 , wherein the instructions further cause the host processor to create at least one logical compute device.

9. The non-transitory computer readable storage medium of claim 8 , wherein the evaluating comprises:

retrieving capabilities of each physical device from a data structure.

10. The non-transitory computer readable storage medium of claim 9 , wherein the instructions further cause the host processor to generate the data structure when the compute platform layer is initially executed, and update the data structure when a new physical device is attached to the host processor.

11. The non-transitory computer readable storage medium of claim 9 , wherein the evaluating is based on a match score indicating a level of match between the processing requirement and the capabilities of the one or more physical devices corresponding to each logical compute device.

12. The non-transitory computer readable storage medium of claim 7 , wherein the requests from the application are processed by an interpreter during the execution of the application.

13. A system comprising:

a host processor;

one or more physical devices attached to the host processor, wherein the one or more physical devices comprise at least one of a central processing unit and a graphics processing unit; and

a memory coupled to the host processor through a bus, the memory storing instructions for a compute platform layer that, when executed, cause the host processor to

receive, from an application executing on the host processor, a request to identify any logical compute device that matches a processing requirement for a task corresponding to source code in the application;

evaluate logical compute devices for a match with the processing requirement, each logical compute device corresponding to the one or more physical devices;

determine compute identifiers for each matching logical compute device, the compute identifiers subsequently returned to the application for selection of one or more logical compute devices to execute the task; and

generate a context for at least one matching logical compute device.

14. The system of claim 13 , wherein the instructions for the compute platform layer further cause the host processor to create a logical compute device.

15. The system of claim 14 , wherein the evaluating comprises:

retrieving capabilities of each physical device from a data structure.

16. The system of claim 15 , wherein the instructions further cause the host processor to generate the data structure when the compute platform layer is initially executed, and update the data structure when a new physical device is attached to the host processor.

17. The system of claim 15 , wherein the evaluating is based on a match score indicating a level of match between the processing requirement and the capabilities of the one or more physical devices corresponding to each logical compute device.

18. The system of claim 13 , wherein the requests from the application are processed by an interpreter during the execution of the application.

Continuity (6)
Continuation 14163710 · Jan 24, 2014
Continuation 13614975 · Sep 13, 2012
Continuation 11800185 · May 3, 2007
Provisional Application 60925616 · Apr 20, 2007
Provisional Application 60923030 · Apr 11, 2007
Related Publication 20170039092A1 · Feb 9, 2017