Systems and methods for automatically generating computer programming code and schedules and comparing their performance
AssigneeThe Math Works, Inc.
InventorsIvan Garcia Alsina, Partha Biswas, Jianyi Li
Life of this patent
Estimating the term…
Abstract
Systems and methods utilize an auto-scheduler of a Domain Specific Language (DSL) to schedule one or more portions of a computer program written in a programming language other than the DSL. Portions of the computer program compatible with the DSL may be identified. The portions may be translated to a form compatible with the DSL. The DSL may generate schedules for the portions. Code may be generated for the computer program and the code may be executed. The schedules generated by the DSL may be utilized during execution of the code generated for the computer program.
Claims12
A computer-implemented method comprising:
- accessing a computer program written in a first programming language, the computer program including tensor-based operations that are implemented as programming idioms or vectorized statements of the first programming language;
- receiving information on resources of a target hardware system;
- receiving an identification of a scheduler of a second programming language different from the first programming language;
- generating, by one or more processors, a first Intermediate Representation (IR) of the computer program;
- partitioning the first IR of the computer program into a plurality of partitions wherein the plurality of partitions include the tensor-based operations, the partitioning including searching the first IR for the programming idioms or the vectorized statements;
- generating, by the one or more processors, an IR for the plurality of partitions, the Intermediate Representation for the plurality of partitions compatible with the second programming language;
- generating, by the scheduler of the second programming language, a schedule for the plurality of partitions, wherein the generating the schedule includes analyzing the IR for the plurality of partitions, further wherein the scheduler considers the information on the resources of the target hardware system;
- generating, by the one or more processors, a second IR for the computer program, wherein the second IR for the computer program includes the schedule for the plurality of partitions as generated by the scheduler of the second programming language;
- and
- generating code based on the second IR for the computer program, wherein the code implements the schedule for the plurality of partitions as generated by the scheduler of the second programming language.
Dependencies are inferred from the claim text.