US 12,474,908 B2
Systems and methods for enhancing execution of interpreted computer languages
Ariya Shajii, Weston, MA (US); and Ibrahim Numanagić, Victoria (CA)
Assigned to Exaloop, Inc., Brookline, MA (US)
Filed by Exaloop, Inc., Brookline, MA (US)
Filed on Aug. 29, 2023, as Appl. No. 18/457,724.
Claims priority of provisional application 63/403,350, filed on Sep. 2, 2022.
Prior Publication US 2024/0078100 A1, Mar. 7, 2024
Int. Cl. G06F 8/41 (2018.01)
CPC G06F 8/447 (2013.01) [G06F 8/42 (2013.01); G06F 8/443 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A system for compiling interpreted language code, the system comprising:
at least one processor;
a memory operatively coupled to the at least one processor;
the at least one processor when executing configured to:
accept interpreted language (“IL”) code;
transform the IL code into a first representation, the first representation comprising an abstract syntax tree;
validate data type specification in the IL code;
transform the first representation into an intermediate representation (“IR”) in response to validation;
optimize the IR based on backend specific optimizations, wherein the backend specific optimizations include hardware specific optimization targets,
wherein the interpreted code is Python based, and the at least one processor is configured to:
construct a representation of Python code;
partition the representation of the Python code in order to generate machine code for multiple heterogeneous targets, including a central processing unit (“CPU”), and at least one other target selected from a GPU, FPGA, and TPU;
transform the intermediate representation into a low level virtual machine intermediate representation (“LLVM IR”); and
convert the LLVM IR into an executable comprising compiled code including operations to generate the executable for running on the CPU, a shared library referenced by the executable for interfacing the CPU with the at least one other target, and code specific to the at least one other target.