| CPC G06F 8/443 (2013.01) [G06F 8/48 (2013.01); G06F 11/3452 (2013.01); G06F 11/3457 (2013.01)] | 34 Claims |

|
1. A compiler implemented method, comprising:
receiving a high-level function in a first high-level code;
compiling the high-level function into a first set of low-level instructions to be executed on a hardware or a simulator;
generating at least one meta data during the compiling, wherein the at least one meta data is generated based on a strategy generated by the compiler, wherein the at least one meta data includes information associated with a layer of a machine learning (ML) model being executed on the hardware or the simulator;
transmitting the first set of low-level instructions to the hardware or the simulator;
receiving a plurality of statistical data generated by the hardware or the simulator in response to execution of the first set of low-level instructions;
determining whether to make changes to the compilation associated with the high-level function in the first high-level code based on the plurality of statistical data, wherein the changes to the compilation includes at least one or more of changing a memory layout, replacing one ML library call with another ML library call, modifying a mapping of data to memory blocks, modifying a precision for an instruction, modifying quantization for the instruction, modifying a processing element to perform a particular operation associated with the instruction, reordering of data dimensions, and a change to methodology to split tensors;
recompiling the high-level function into a second set of low-level instructions to be executed on the hardware or the simulator based on the changes to the compilation; and
transmitting the second set of low-level instructions to the hardware or the simulator.
|