Patent ID: 8745603

Claim:
A computer-implemented method, comprising: in a runtime system configured to run on a parallel-processing computer system that includes a first processing element and a second processing element, the two processing elements having different instruction set architectures, and memory storing one or more programs for execution by the processing elements, at runtime: receiving from an application executing in conjunction with the runtime system one or more application program interface calls to the runtime system, the application program interface calls corresponding to one or more operation requests to be performed by the parallel-processing computer system; identifying from a plurality of language-specific application program interface modules an application program interface module associated with the runtime system; generating a programming language-independent, processor-independent intermediate representation for at least one of the operation requests using the application program interface module, wherein the intermediate representation includes a first set of instructions for generating optimized compute kernels for the first processing element, a second set of instructions for generating optimized compute kernels for the second processing element, and at least one object that corresponds to a function call to the identified application program interface module in the application; selecting one of the first processing element and the second processing element based on a current state of the runtime system; generating one or more optimized compute kernels from the intermediate representation in accordance with the instruction set architecture of the selected processing element and a corresponding one of the first or second set of instructions for generating optimized compute kernels for the selected processing element, wherein each of the one more optimized compute kernels is a routine that runs on one of the processing elements to perform at least part of the one or more operation requests; and executing the one or more optimized compute kernels on the selected processing element.