| CPC G06F 8/41 (2013.01) [G06F 8/10 (2013.01); G06F 8/31 (2013.01); G06F 8/315 (2013.01); G06F 8/35 (2013.01); G06F 8/36 (2013.01); G06F 8/42 (2013.01); G06F 8/443 (2013.01); G06F 8/447 (2013.01); G06F 8/451 (2013.01); G06F 8/51 (2013.01); G06F 8/52 (2013.01); G06F 8/75 (2013.01); G06F 9/3005 (2013.01); G06F 9/30174 (2013.01); G06F 9/38873 (2023.08); G06F 9/45558 (2013.01); G06F 9/4881 (2013.01)] | 12 Claims |

|
1. 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.
|