Patent attributes
A method includes receiving source code of a program to be compiled and compiling the source code of the program. Compiling the source code includes identifying a first function in the source code of the program that is a candidate to be executed by a graphics processing unit (GPU), generating a first intermediate representation and a second intermediate representation for the first function, and inserting a second function in the program in place of the first function, wherein the second function is to select one of the first intermediate representation or the second intermediate representation to be executed. The method further includes providing a compiled program package including the second function, the first intermediate representation and the second intermediate representation.