Data parallel computing on multiple processors
AssigneeApple Inc.
InventorsAaftab Munshi, Jeremy Sandmel
Life of this patent
Estimating the term…
Abstract
A method and an apparatus that allocate one or more physical compute devices such as CPUs or GPUs 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.
Claims44
A computer implemented method comprising:
- receiving, during runtime of an application program, a capability requirement via arguments of an API (Application Programming Interface) request specified in source code of the application program for one or more processing devices to execute one or more threads of the application program, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- in response to the API request, generating one or more compute identifiers during the runtime for use by the one or more threads, at least one of the one or more compute identifiers specifying the processing devices capable of executing the threads according to the capability requirement, wherein the generating comprises matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching.
A computer implemented method comprising:
- sending, from an application program during runtime of the application program, a capability requirement via arguments of an API (Application Programming Interface) request specified in source code of the application program for one or more processing devices to execute one or more threads of the application program, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- receiving, during the runtime, one or more compute identifiers for use by the one or more threads, the one or more compute identifiers specifying the processing devices capable of executing the threads according to the capability requirement, wherein the compute identifiers are generated by matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching.
A machine-readable non-transitory storage medium having instructions stored therein which, when executed by a machine, cause the machine to perform a method, the method comprising:
- receiving, during runtime of an application program, a capability requirement via arguments of an API (Application Programming Interface) request specified in source code of the application program for one or more processing devices to execute one or more threads of the application program, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- in response to the API request, generating one or more compute identifiers during the runtime for use by the one or more threads, at least one of the one or more compute identifiers specifying the processing devices capable of executing the threads according to the processing capability requirement, wherein the generating comprises matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching.
A machine-readable non-transitory storage medium having instructions stored therein which, when executed by a machine, cause the machine to perform a method, the method comprising:
- sending, from an application program during runtime of the application program, a capability requirement via arguments of an API (Application Programming Interface) request specified in source code of an application program for one or more processing devices to execute one or more threads of the application program, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- receiving, during the runtime, one or more compute identifiers for use by the one or more threads, the one or more compute identifiers specifying the processing devices capable of executing the threads according to the capability requirement, wherein the compute identifiers are generated by matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching.
A parallel computing architecture comprising:
- a host processor;
- a graphics processing unit (GPU) coupled to the host processor;
- a central processing unit (CPU) coupled to the host processor;
- and
- a memory coupled to at least one of the host processor, the CPU, and the GPU, the memory storing a first application program, executing at least in part on the host processor, the first application program having a plurality of threads which are selectively scheduled for execution on either of the GPU and the CPU, the memory storing a system application program which communicates with the first application program through an API (Application Programming Interface) request during runtime of the first application program, the API request specified in source code of the first application program for a capability requirement of the threads, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives, the API request including the capability requirement as arguments, the system application program assigning at least one logical computing device identifier according to the capability requirement to the plurality of threads, the at least one logical computing device identifier specifying at least one of the CPU and the GPU, wherein the logical computing device identifier is generated by matching the capability requirement with a device capability of the CPU or the GPU, and determining one or more matched processing units according to the matching.
A computing unit in a parallel computing architecture, the computing unit comprising:
- at least one processing device identified by a logical computing device identifier;
- and
- a memory coupled to the at least one processing device, the memory to store allocated memory streams and allocated compute kernels, the memory to store an application program compiled from a source code specifying API (Application Programming Interface) requests indicating a capability requirement to execute the application program, the API requests including the capability requirement as arguments, wherein the at least one processing device is identified according to the capability requirement received from the API requests during runtime of the application program, and wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives, and wherein the processing device is identified by matching the capability requirement with a device capability of the processing device.
An apparatus comprising:
- means for receiving, during runtime of an application program, a capability requirement as arguments via an API (Application Programming Interface) request specified in source code of the application program for one or more processing devices to execute one or more threads of the application program, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- means for, in response to the API request, generating one or more compute identifiers during the runtime for use by the one or more threads, at least one of the one or more compute identifiers specifying the processing devices capable of executing the threads according to the capability requirement, wherein the generating comprises matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching, and wherein the processing devices include one or more central processing units (CPUs) or graphics processing units (CPUs).
An apparatus comprising:
- means for sending, from an application program during runtime of the application program, a capability requirement via an API (Application Programming Interface) request specified in source code of the application program for one or more processing devices to execute one or more threads of the application program, the API request sending the capability requirement, wherein the capability requirement includes one or more of:
- attributes associated with a dedicated texturing hardware support, a double precision floating point arithmetic capability, a dedicated local memory, a stream variable cache, a stream image cache, or synchronization primitives;
- and
- means for receiving, during the runtime, one or more compute identifiers for use by the one or more threads, the one or more compute identifiers specifying the processing devices capable of executing the threads according to the capability requirement, wherein the compute identifiers are generated by matching the capability requirement with a device capability of the one or more processing devices, and determining one or more matched processing devices according to the matching, and wherein the one or more processing devices include CPUs (Central Processing Unit) or GPUs (Graphics Processing Unit).
Dependencies are inferred from the claim text.