US2006107250A1PendingUtilityA1

Interpreter for simplified programming of graphics processor units in general purpose programming languages

47
Assignee: MICROSOFT CORPPriority: Nov 5, 2004Filed: Dec 3, 2004Published: May 18, 2006
Est. expiryNov 5, 2024(expired)· nominal 20-yr term from priority
G06F 9/45508G06F 8/45G06T 15/005
47
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Although GPUs have been harnessed to solve non-graphics problems, these solutions are not widespread because GPUs remain difficult to program. Instead, an interpreter simplifies the task of programming a GPU by providing language constructs such as a set of data types and operations that are more familiar to non-graphics programmers. The interpreter maps these familiar language constructs to the more difficult graphics programming languages such as DirectX®, OpenGL®, Cg®, and/or HLSL®.

Claims

exact text as granted — not AI-modified
1 . One or more computer readable media on which is stored computer instructions comprising: 
 creation function calls comprising one or more multi-dimensional data parallel array assignment functions having an input parameter comprising a standard language array and an output parameter comprising a reference to a graph representing a node comprising a multi-dimensional data parallel array assigned to the standard language array input parameter;    operation function calls comprising one or more parallel array operations    having, an input parameter comprising one or more graphs of one or more nodes representing multi-dimensional data parallel arrays, an input parameter indicating a parallel operation to perform on one or more graphs, and an output parameter comprising a reference representing a result of the parallel operation;    an interpreter adapted to perform a method comprising,    response to receiving plural creation and operation function calls, creating a graph representation of parallel processing requests represented by operation function calls, returning a pointer to the graph representation as an output parameter of an operation function call, wherein the graph representation comprises plural parallel processing operations and plural standard arrays resident in memory of a central-processing unit,    evaluating plural parallel processing requests represented by the graph representation, the evaluation comprising,    traversing the graph representation and constructing a shader graph comprising plural pixel shader programs, and    invoking a graphic-processing unit to perform parallel processing operations on pixel shader programs of the shader graph, wherein a standard array is copied to graphics memory as input to at least one pixel shader program.    
   
   
       2 . The one or more computer readable media of  claim 1 , wherein the evaluation further comprises copying an output of a pixel shader program from graphics memory to memory of the central-processing unit.  
   
   
       3 . The one or more computer readable media of  claim 1 , wherein the interpreter is further adapted to return a reference to the output of the pixel shader program copied to memory of the central-processing unit responsive to receiving an export function call.  
   
   
       4 . The one or more computer readable media of  claim 1 , wherein an input parameter comprising a standard language array is received in a form of a bitmap.  
   
   
       5 . The one or more computer readable media of  claim 1 , wherein an input parameter comprising a standard language array is received in a form of a collection of elements with an element data type.  
   
   
       6 . The one or more computer readable media of  claim 5 , wherein the element data type is an integer data type, a float data type, or a Boolean data type.  
   
   
       7 . The one or more computer readable media of  claim 1 , wherein operation function calls comprise a set of application programming interfaces having an inner-product operation, an outer-product operation, and arithmetic operations.  
   
   
       8 . The one or more computer readable media of  claim 7 , wherein arithmetic operations comprise unary, binary, and ternary operations.  
   
   
       9 . The one or more computer readable media of  claim 1 , wherein operation function calls comprise at least one of the following operations: logical operations, scalar reductions, partial reductions, selection operations, replication operations, permutation operations, scatter operations, gather operations, shift operations, rotate operations, pad operations, concatenation operations, ravel operations, or random number generation operations.  
   
   
       10 . The one or more computer readable media of  claim 1 , wherein the graph representation is a tree, roots of the tree are operations, and leaves of the tree are operands comprising standard language arrays.  
   
   
       11 . The one or more computer readable media of  claim 1 , wherein the shader graph is a tree, and leaves of the tree comprise pixel shader programs.  
   
   
       12 . The one or more computer readable media of  claim 1 , wherein a specific operation function call is a selection operation and an input parameter further comprises a start element, a count element, and a stride element used to identify selected elements for the result of the parallel operation.  
   
   
       13 . The one or more computer readable media of  claim 1 , wherein a specific operation function call is a drop dimension operation and an input parameter further comprises a dimension to drop from the result of the parallel operation.  
   
   
       14 . The one or more computer readable media of  claim 1 , wherein a specific operation function call is a scalar reduction and the input parameter indicating the parallel operation indicates one of the following operations: a sum of elements, a product of elements, a largest element, or a smallest of elements.  
   
   
       15 . A method of providing parallel processing by a second component receiving requests from a first component, the method comprising: 
 first component issues plurals calls, each call with plural parameters comprising one or more graphs representing one or more multi-dimensional parallel arrays and an output parameter representing a call result, wherein calls represent requests for parallel processing;    second component receives plural calls and extracts parameters; and    second component evaluates requests for parallel processing comprising,    building a larger graph representation of plural calls, wherein nodes of the larger graph representation comprise operators and operands, and operators represent parallel processing operations and operands comprise standard language arrays resident in memory of a central processing unit,    traversing the larger graph representation and constructing a shader graph comprising plural pixel shader programs, and    invoking a graphic-processing unit to perform parallel processing comprising executing pixel shader programs in the shader graph wherein one or more standard language arrays are copied to graphics memory as input to pixel shader programs.    
   
   
       16 . The method of  claim 15 , wherein an issued call signature represents a specific parallel processing request.  
   
   
       17 . The method of  claim 15 , wherein a call issued by the first component further comprises an input parameter indicating a parallel processing request.  
   
   
       18 . The method of  claim 15 , wherein an output of a pixel shader program is copied from graphics memory to memory of the central processing unit and returned to the first component as the call result.  
   
   
       19 . A computer system comprising: 
 a central processing unit coupled to a bus and computer memory, the computer memory storing a first component and a second component;    a graphics processing unit comprising graphics memory wherein the graphics processing unit is coupled to the central processing unit via the bus;    the first component containing logic for issuing plurals calls, each call with plural parameters comprising one or more graphs representing one or more multi-dimensional parallel arrays and an output parameter representing a call result, wherein calls represent requests for parallel processing;    the second component containing logic for receiving plural calls and extracting parameters; and    the second component containing logic for evaluating parallel processing requests comprising,    building a larger graph representation of plural calls, wherein nodes of the larger graph representation comprise operators and operands, and operators represent parallel processing operations and operands comprise standard language arrays resident in computer memory,    traversing the larger graph representation and constructing a shader graph comprising plural pixel shader programs, and    invoking a graphic-processing unit to perform parallel processing comprising executing pixel shader programs from the shader graph wherein one or more standard language arrays are copied to graphics memory as input to pixel shader programs.    
   
   
       20 . The system of  claim 19 , wherein the evaluation further comprises copying an output of a pixel shader program from graphics memory to the memory of the central-processing unit.  
   
   
       21 . The system of  claim 19 , wherein logic for evaluating further comprises returning to the first component in the output parameter representing the call result, the output of a pixel shader program copied to the computer memory.  
   
   
       22 . The system of  claim 19  wherein logic for evaluating parallel processing requests invokes the central processing unit to execute at least one received call representing a parallel processing request.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.