Method and apparatus for unifying graphics processing unit computation languages
First Claim
Patent Images
1. A method for unifying Graphics Processing Unit (GPU) computation languages comprising:
- initiating, by at least one processor, execution of an application on a computing device;
in response to initiating execution of the application, running a utility program to identify a computation language associated with a GPU on the computing device, wherein the GPU is associated with a first GPU computation language or a second GPU computation language;
wherein the first GPU computation language includes source code which is not present in the second GPU computation language, andwherein the second GPU computation language includes source code that is not present in the first GPU computation language;
accessing a plurality of macros, wherein each macro of the plurality of macros comprises source code in the first GPU computation language and source code in the second GPU computation language;
expanding each macro in the plurality of macros based on the identified computation language associated with the GPU;
compiling, based on the expanded plurality of macros, a kernel using source code in the identified computation language associated with the GPU; and
executing the kernel on the computing device.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and apparatus for unifying graphics processing unit (GPU) computation languages is disclosed. The method comprises identifying a GPU of a computer system; accessing a plurality of macros representing a difference in source code between a first GPU computation language and a second GPU computation language, expanding each macro in the plurality of macros based on the identified GPU and executing a kernel on the computer system using the expanded macro.
-
Citations
20 Claims
-
1. A method for unifying Graphics Processing Unit (GPU) computation languages comprising:
-
initiating, by at least one processor, execution of an application on a computing device; in response to initiating execution of the application, running a utility program to identify a computation language associated with a GPU on the computing device, wherein the GPU is associated with a first GPU computation language or a second GPU computation language; wherein the first GPU computation language includes source code which is not present in the second GPU computation language, and wherein the second GPU computation language includes source code that is not present in the first GPU computation language; accessing a plurality of macros, wherein each macro of the plurality of macros comprises source code in the first GPU computation language and source code in the second GPU computation language; expanding each macro in the plurality of macros based on the identified computation language associated with the GPU; compiling, based on the expanded plurality of macros, a kernel using source code in the identified computation language associated with the GPU; and executing the kernel on the computing device. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer readable medium for storing computer instructions that, when executed by at least one processor cause the at least one processor to perform a method for unifying Graphics Processing Unit (GPU) computation languages, the method comprising:
-
initiating execution of an application on a computing device; in response to initiating execution of the application, running a utility program to identify a computation language associated with a GPU on the computing device, wherein the GPU is associated with a first GPU computation language or a second GPU computation language; wherein the first GPU computation language includes source code which is not present in the second GPU computation language, and wherein the second GPU computation language includes source code that is not present in the first GPU computation language; accessing a plurality of macros, wherein each macro of the plurality of macros comprises source code in the first GPU computation language and source code in the second GPU computation language; expanding each macro in the plurality of macros based on the identified computational language associated with the GPU; compiling, based on the expanded plurality of macros, a kernel using source code in the identified computation language associated with the GPU; and executing the kernel on the computing device. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. An apparatus for unifying Graphics Processing Unit (GPU) computation languages comprising at least one processor, a memory operatively associated with the at least one processor and having stored therein instructions executable by the at least one processor, wherein the instructions, when executed by the at least one processor, cause the apparatus to:
-
initiate execution of an application; in response to initiating execution of the application, run a utility program to identify a computation language associated with a GPU on the computing device, wherein the GPU is associated with a first GPU computation language or a second GPU computation language; wherein the first GPU computation language includes source code which is not present in the second GPU computation language, and wherein the second GPU computation language includes source code that is not present in the first GPU computation language; access a plurality of macros stored in memory, wherein each macro of the plurality of macros comprises source code in the first GPU computation language and source code in the second GPU computation language; expand each macro in the plurality of macros based on the identity of the identified GPU; and execute a kernel using the expanded macro; wherein the first GPU computation language and the second GPU computation language share code base similarities derived from a common programming language, and wherein each of the plurality of macros corresponds to a difference between a code base of the first GPU computation language and a code base of the second GPU computation language. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification