COMPILER FOR MACHINE LEARNING PROGRAMS
In variants, a program optimization method can include: receiving a program; determining a set of proxy inputs for the program; generating a set of intermediate traces for the program; and generating a set of execution traces for the program, wherein the set of execution traces can include executor fusions associated with device kernels for hardware accelerators. During runtime, program results can be computed by executing an execution trace instead of executing the program.
1 . A processing system comprising a compiler, configured to:
receive a code set;
determine a set of proxy inputs for the code set, wherein each proxy input lacks a data value and shares input parameters with an input from the code set;
generate an intermediary trace for the code set using the set of proxy inputs, wherein the preliminary trace comprises a sequence of primitive operations; and
generate an execution trace by optimizing the preliminary trace, wherein optimizing the preliminary trace comprises replacing subsets of primitive operations from the intermediary trace with executor fusions associated with device kernels, wherein the execution trace is executed instead of the code set during runtime.