IP Library › Granted Patent US 10,430,169
Granted Patent B2
US 10,430,169 · App. 14/627,786 · Granted Oct 1, 2019

Language, function library, and compiler for graphical and non-graphical computation on a graphical processor unit

Inventors: Aaftab A. Munshi (Los Gatos, CA); Kenneth C. Dyke (Los Altos, CA); Rahul U. Joshi (Sunnyvale, CA); Richard W. Schreyer (Scotts Valley, CA)
Assignee: Apple Inc.
G06F8/54G06F8/41G06F8/427
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,430,169
App. No.
14/627,786
Granted
Oct 1, 2019
Kind
B2
Abstract

A compiler and library provide the ability to compile a programming language according to a defined language model into a programming language independent, machine independent intermediate representation, for conversion into an executable on a target programmable device. The language model allows writing programs that perform data-parallel graphics and non-graphics tasks.

Claims (47)

1. A non-transitory machine-readable medium, on which are stored instructions, comprising instructions that, when executed, cause a programmable device to:

receive source code instructions in a programming language that is machine independent;

on a development system, parse and compile the received source code instructions into a programming language independent intermediate representation;

on the development system, link the intermediate representation with a library to form a linked intermediate representation that is part of an application, wherein the library includes both shader type functions and compute type functions;

on the development system, deliver the application without the source code instructions to a user system,

wherein the linked intermediate representation is to be compiled on the user system to yield graphics processor unit (GPU) native code for the user system when the application creates, prior to runtime, graphics pipeline objects that comprise state information and one or more shaders for rendering graphics.

2. The non-transitory machine-readable medium of claim 1 , wherein the library further comprises:

geometric shader functions;

kernel thread group synchronization functions;

fragment shader functions;

texture functions;

atomic functions;

matrix functions;

integer functions;

relational functions;

mathematical functions; and

pack and unpack functions.

3. The non-transitory machine-readable medium of claim 2 , wherein the texture functions comprise:

functions that, when executed, perform sampling from a texture, sampler-less reading from a texture, writing to a texture, and querying a texture by the GPU, and

wherein template arguments for a texture type identify a color type returned when reading from or writing to a texture and how the texture is to be accessed.

4. The non-transitory machine-readable medium of claim 2 , wherein the texture functions comprise texture functions for one-dimensional textures, two-dimensional textures, three-dimensional textures, and cube-map textures.

5. The non-transitory machine-readable medium of claim 2 , wherein the fragment shader functions comprise functions for computation of derivatives, sampler functions, and flow-control functions.

6. A non-transitory machine-readable medium, on which are stored instructions, comprising instructions that, when executed, cause a programmable device to:

by use of a compiler on a development system, parse source code written in a predetermined programming language to generate an intermediate representation that is machine independent; and

on the development system, link the intermediate representation with a library to form a linked intermediate representation for an application, wherein the library comprises shader type functions and compute type functions,

wherein the linked intermediate representation is configured to be compiled on a user system to yield graphics processor native code for the user system when the application creates, prior to runtime, graphics pipeline objects that include state information and one or more shaders for rendering graphics.

7. The non-transitory machine-readable medium of claim 6 , wherein the instructions that, when executed, cause the programmable device to parse source code comprise instructions that, when executed, cause the programmable device to enforce matching of elements in a fragment input type with elements in a vertex output type.

8. The non-transitory machine-readable medium of claim 6 , wherein the instructions that, when executed, cause the programmable device to parse source code comprise instructions that, when executed, cause the programmable device to enforce matching of per-instance vertex outputs with per-instance fragment inputs.

9. The non-transitory machine-readable medium of claim 6 , wherein the predetermined programming language complies with a language model that provides both graphics programs and compute data-parallel tasks for execution on a graphics processor.

10. The non-transitory machine-readable medium of claim 9 , wherein the language model comprises: shader and kernel function qualifiers that restrict how a function may be used.

11. The non-transitory machine-readable medium of claim 10 , wherein graphics functions may be declared with a shader function qualifier and either computer or graphics functions may be declared with a kernel function qualifier.

12. The non-transitory machine-readable medium of claim 11 , wherein the language model further comprises:

attribute qualifiers that identify a location of a resource to use for a function argument; and

sampling and interpolation qualifiers for return types of vertex functions and arguments to fragment functions.

13. The non-transitory machine-readable medium of claim 9 , wherein the language model further comprises scalar, vector, and matrix data types.

14. The non-transitory machine-readable medium of claim 9 , wherein the language model further provides a qualifier for identifying per-vertex and per-fragment input.

15. The non-transitory machine-readable medium of claim 9 , wherein the language model further provides for specification of per-vertex input, and wherein the language model further uses a vertex identifier for reading from and writing to a buffer in a vertex function.

16. An apparatus comprising:

a processor included in a software development computer system;

a memory included in the software development computer system; and

a compiler, stored in the memory and executable on the processor, wherein the compiler is configured to parse and compile source code written in a predetermined programming language and generate a machine-independent intermediate representation,

instructions stored in the memory that, when executed, by the processor, cause the software development computer system to link the intermediate representation with a library to form a linked intermediate representation that is part of an application, wherein the library comprises both shader type functions and compute type functions; and

wherein the linked intermediate representation is configured to be compiled on a user system to yield graphics processor unit (GPU) native code for the user system when the application creates, prior to runtime, graphics pipeline objects that contain state information and one or more shaders for rendering graphics.

17. The apparatus of claim 16 , wherein the compiler is configured to enforce matching of elements in a fragment input type with elements in a vertex output type.

18. The apparatus of claim 16 , wherein the compiler is configured to enforce matching of per-instance vertex outputs with per-instance fragment inputs.

19. The apparatus of claim 16 , wherein the predetermined programming language complies with a language model that provides both graphics shader programs and compute data-parallel tasks for execution on a GPU, and wherein the language model comprises address space qualifiers that specify a region of memory where a function variable or argument is allocated.

20. The apparatus of claim 16 , wherein the predetermined programming language complies with a language model that provides both graphics shader programs and compute data-parallel tasks for execution on a GPU, and wherein the language model comprises shader and kernel function qualifiers that restrict how a function may be used.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 20, 2015
From: MUNSHI, AAFTAB A.; DYKE, KENNETH C.; JOSHI, RAHUL U.; SCHREYER, RICHARD W.
To: APPLE INC.
Reel/Frame 034998/0231 →
Continuity (2)
Provisional Application 62005646 · May 30, 2014
Related Publication 20150347108A1 · Dec 3, 2015