Compiler based on machine learning (ML) models

Through a compiler based on the machine learning model, the problem of low compilation time of existing compilers on different programming languages ​​and hardware devices is solved, automated compilation and performance optimization are achieved, and the efficiency of the compilation process is improved.

CN116541011BActive Publication Date: 2025-02-21HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210431262.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2022-01-25
Filing Date
2022-04-22
Publication Date
2025-02-21
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

Existing compilers are inefficient when compiled for different programming languages ​​and hardware devices, requiring a lot of expertise and man-hours, resulting in latency and inefficiency.

Method used

Using a compiler based on machine learning (ML) model, it trains the ML model to execute and improve the operations of the local compiler, and realizes automated compilation and optimization of source code across languages ​​and across devices.

Benefits of technology

Improves the efficiency and automation of the compilation process, enables executable files running on different computing devices without changing the source code, and provides performance optimization and source code recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116541011B_ABST
    Figure CN116541011B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a compiler based on a machine learning (ML) model. Systems and methods for implementing a compiler, language translator, and / or decompiler based on a machine learning (ML) model are provided. For example, the system may receive a first source code in a first programming language, tokenize the first source code file to form a tokenized code, generate a sequence vector of the tokenized code, and provide the sequence vector of the tokenized code as input to a trained ML model compiler. The output of the trained ML model compiler may create a second executable file or source code in a second programming language.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Computer programmers create source code (e.g., human-readable instructions) to perform actions on a computing device (e.g., multiply two matrices of numbers, sort data in ascending or descending order, label people in an image, recognize faces, etc.). The source code is then compiled into a binary file containing machine instructions (e.g., executable code) that is executed on local hardware (e.g., a computing device) or transmitted to run on distributed hardware. The source code can also be debugged while executing on the hardware.

[0002] In practice, source code compiled into executable code may be implemented using different programming languages ​​(e.g., C, FORTRAN, Python, C++, Java, Scala, etc.) and executed on different kinds of hardware (e.g., CPU, GPU, FPGA, etc.). Thousands of man-hours and multiple levels of expertise in computer programming, cross-compilation, code optimization, and code porting are required to manually enable executable code for different computing environments and devices, resulting in inefficiencies and delays.

[0003] A compiler is an executable program that converts source code written in a specific programming language into a machine executable file. Modern compilers are a large number of logical arrangements that systematically analyze the syntax of the programming language, all variables and dependencies within the source code, and generate hardware instructions to perform those actions of the source code on a specific computing device. Compilers are complex machine executables that require a lot of work to generate these executable files for computing devices, and are usually limited to compiling for a single programming language. BRIEF DESCRIPTION OF THE DRAWINGS

[0004] The present disclosure according to one or more various embodiments is described in detail with reference to the following drawings. The drawings are provided for illustration purposes only and merely depict typical or example embodiments.

[0005] Figure 1 A computing device for implementing an ML model-based compiler according to some examples of the present disclosure is illustrated.

[0006] Figure 2 The standard compiler, native compiler, or local compiler is illustrated.

[0007] Figure 3-Figure 6 A computing device for implementing an ML model-based compiler according to some examples of the present disclosure is illustrated.

[0008] Figure 7 Cross-compiling source code for different computing devices according to some examples of the present disclosure is illustrated.

[0009] Figure 8Cross-compiling source code for different computing devices according to some examples of the present disclosure is illustrated.

[0010] Fig. 9 A process for training an ML model-based compiler according to some examples of the present disclosure is illustrated.

[0011] Fig.10 A process for tokenizing a source language and embedding it into a target language according to some examples of the present disclosure is illustrated.

[0012] Fig.11 Illustrated is a process for tokenizing and embedding source code for compilation according to some examples of the present disclosure.

[0013] Fig.12 are example computing components that can be used to implement various features of the embodiments described in this disclosure.

[0014] Fig.13 are example computing components that can be used to implement various features of the embodiments described in this disclosure.

[0015] Fig.14 Depicts a block diagram of an example computer system in which various embodiments described herein may be implemented.

[0016] The drawings are not exhaustive and do not limit the disclosure to the precise forms disclosed. DETAILED DESCRIPTION

[0017] As described herein, a standard compiler, native compiler, or local compiler (used interchangeably throughout) implemented on a computer device is an executable program that converts source code written in a specific programming language into a machine executable file. A local compiler can create executable code to run on the same local computing device or another remote computing device. A good compiler will not only generate an executable file that can execute the code correctly, but will also try to execute the source code efficiently in the shortest time for the corresponding hardware running the code.

[0018] The embodiments described herein implement a compiler based on a machine learning (ML) model to improve or replace a local compiler. For example, instead of providing source code to a local compiler to generate an executable file containing machine executable code, a trained ML model is used to perform the operations of the local compiler and improve it. The compiler based on the ML model can be trained to operate as a local compiler, or it can be configured to run as a cross-compiler that converts source code or compiled executable code into source code written in a different programming language or configured to be executed on a different computer.

[0019] The ML model-based compiler can be trained to run in place of a native compiler. For example, the ML model-based compiler can convert source code in a first language to source code in a second language, convert source code to compiled executable code (or vice versa, convert compiled executable code back to source code), where the executable code runs on a first device or a second device, convert compiled executable code for a first device to compiled executable code for a second device, or convert compiled executable code to run on a first device or a second device.

[0020] To create an ML model-based compiler, a different process can be used to train the ML model-based compiler to perform the actions of a local compiler. For example, the ML model-based compiler can be trained using a larger set of sample source code in order to learn to convert the source code into a corresponding executable file (e.g., instead of compiling it). The ML model-based compiler can be trained using executable code in a first digital format (e.g., binary, hexadecimal, octal, or other digital format) that can be converted into a different digital format. This will produce a larger set of text pairs, including input text as source code and output text as a corresponding executable file in digital format. With a larger set of these text pairs, the ML model-based compiler can be trained to generate output text from a given input text (e.g., like translating from French to Spanish).

[0021] To begin training a compiler based on an ML model, simplified source code can be provided to help train the ML model on some initial features, like the classic "hello world" code. As the ML model becomes "smarter" (e.g., by learning patterns and weights that correspond to the training process), the training process can add more, longer or more complex features. For example, the second stage of the training process can assign a text string to a variable and print the contents of the variable to a display of a computing device dedicated to generating output, rather than printing the text string directly to the terminal of the computing device (e.g., printf("Hello world\n") vs. char var

[12] = "Hello world"; printf("%s\n", var)).

[0022] Later iterations of the training process may add more complexity in the source code, such as various programming language features found in open source code or other examples. For example, programming language features may include comment lines, line breaks, assignment statements, declarations, algorithm loops, case statements, if / then / else statements, and other multi-iteration instructions. Various programming language features may be added until all features of a standard compiler (e.g., a native or local compiler for a computing device) are represented in the training code sample of the ML model-based compiler. Each sample source code instruction may have a corresponding digital format representing executable code.

[0023] Once the ML model-based compiler is trained using various programming language features, the ML model can be optimized for execution speed. For example, source code text can be provided to the compiler from different sources (e.g., GNU or ) to generate text pairs for input and output. Each of these different compilers can generate different executable files that are derived from different instruction set architectures (ISAs) corresponding to each hardware device. Larger sets of text pairs can be provided to the ML model-based compiler for additional training. Once completed, the ML model can perform the functions of the compiler using various native or local compiler optimizations, and can also find optimizations that are not currently present in any native or local compiler learned through the training process.

[0024] There are various technical advantages, including generating a compiler based on an ML model to (1) act as a source code translator that can port source code from a first language to a second language, (2) provide performance as a service (e.g., without changing the source code) where the executable file generated by the ML model can be run on any computing device type (e.g., selected based on optimal performance or availability), (3) recommend performance-optimized source code and executable code, and (4) provide a method for decompiling machine digital formats back to source code.

[0025] Figure 1 A computing device for implementing a compiler based on an ML model according to some examples of the present disclosure is illustrated. In a computing device 100 , a processor 102 , a memory 104 , and a computer-readable medium 110 are provided.

[0026] The processor 102 may be one or more central processing units (CPUs), semiconductor-based microprocessors, and / or other hardware devices suitable for retrieving and executing instructions stored in the computer-readable medium 110. The processor 102 may retrieve, decode, and execute instructions to control a process or operation for creating and implementing a compiler based on an ML model. As an alternative or in addition to retrieving and executing instructions, the processor 102 may include one or more electronic circuits including electronic components for performing the functions of one or more instructions, such as a graphics processor unit (GPU), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other electronic circuits.

[0027] The memory 104 may include random access memory (RAM), cache, and / or other dynamic storage devices for storing information and instructions to be executed by the processor 102. The memory 104 may also be used to store temporary variables or other intermediate information during the execution of instructions to be executed by the processor 102. These instructions, when stored in a computer-readable medium 110 accessible to the processor 102, enable the computing device 100 to become a special-purpose machine that is customized to perform the operations specified in the instructions.

[0028] The memory 104 may include a read-only memory (ROM) or other static storage device for storing static information and instructions for the processor 102. The memory 104 may include a magnetic disk, an optical disk, a solid-state disk (SSD), a fast non-volatile memory (NVMe), or a USB thumb drive (flash drive), etc., for storing information and instructions. In some examples, the information and instructions may be stored in multiple data stores, including a source code language data store 130, a tokenized code data store 132, and a hardware device data store 134.

[0029] The computer readable medium 110 may be any electronic, magnetic, optical or other physical storage device containing or storing executable instructions. The computer readable medium 110 may be, for example, a random access memory (RAM), a non-volatile RAM (NVRAM), an electrically erasable programmable read-only memory (EEPROM), a storage device, an optical disk, etc. In some embodiments, the computer readable medium 110 may be a non-transient storage medium, wherein the term "non-transient" does not encompass transient propagation signals. As described in detail below, the computer readable medium 110 may encode executable instructions implemented with multiple modules, circuits and engines (including executable modules 112, source code language engines 114, tokenization circuits 116, vectorization circuits 118, machine learning training engines 120, machine learning generation engines 122, hardware modules 124, and optimization modules 126).

[0030] Executable module 112 may include a first compiler (e.g., a native compiler of computing device 100) that receives source code generated by a computer programmer operating computing device 100, compiles it, and builds an executable file to be run on hardware corresponding to computing device 100. In this example, the source code and executable code may be self-contained and / or native at computing device 100, without involving a local computer with a native compiler tuned to a particular programming language or hardware.

[0031] The executable module 112 may also implement a cross compiler to generate an executable file for a local device or a remote device (such as a second computing device). For example, the executable module 112 may receive source code from a local computer. The local computer may include a compiler (e.g., a local compiler of the local computer) and generate an executable file for the second computer. The compiler may receive source code generated by a computer programmer and compile it locally to generate a first executable file that will run on hardware corresponding to the local computer. The first executable file may be transmitted to the computing device 100 for analysis and processing, so that the executable module 112 receives the first executable file corresponding to the hardware of the local computer of the computer programmer.

[0032] In some examples, executable module 112 can receive an environment variable (e.g., a dynamic string transmitted during program runtime operation) that identifies a local machine or a remote machine to receive a file in a digital format. For example, executable module 112 can use a cross-compiler feature to generate an executable file to be run on hardware corresponding to a remote computer. In some examples, executable module 112 can use a similar process to convert a first executable file to be run on hardware corresponding to a local computer back to source code (not an executable file) readable by a second computing device (e.g., in the original programming language or a programming language different from the native language used to compile the executable file) using a cross-compiler feature.

[0033] Executable module 112 can also implement a cross compiler to receive source code readable by a second computing device. For example, executable module 112 can receive source code of a first programming language from a local computer. The local computer can include a second compiler (e.g., a local compiler of a local computer), which can also receive source code generated by a computer programmer, and can compile it locally into an executable file to be run on the local computer. Source code (instead of executable code or in addition to executable code) can be transmitted to computing device 100 for analysis and processing, so that executable module 112 receives source code corresponding to the first programming language from the local computer, and uses a cross compiler feature to convert source code from the first programming language into source code of a second programming language. The source code of the second programming language can be provided to different compilers capable of compiling the source code of the programming language (e.g., generating a second executable file or checking and maintaining the source code of the second programming language). In this way, the local computing device is configured to compile the source code into an executable file including executable code, which can implement machine-readable instructions locally on the local computing device without having to be implemented on other computing devices. The second compiler can generate an executable file for the local computer.

[0034] In some examples, the executable file may correspond to a set of digital instructions that can be read by a local computing device and instruct the local computing device to perform specific operations. When received, the executable module 112 may identify information associated with the executable file. The information may include the hardware type of the local computing device, which may be provided as an input with the executable file to train the ML model-based compiler.

[0035] The source code language engine 114 may receive source code corresponding to one or more executable files for training the ML model-based compiler, and may be stored in the source code language data repository 130. The source code may include simplified source code of some initial features, such as the classic "hello world" code. For example, the "hello world" code in the C language may include:

[0036]

[0037] The program may print "Hello world" on the local computing device terminal, including newline characters (eg, corresponding to \n).

[0038] "Hello world" code can also be received in additional computer languages ​​and print similar text strings on the local computing device terminal. For example, in the Python language, the source code may include:

[0039] print("Hello world")

[0040] In another example, in C++ language, the source code may include:

[0041]

[0042] In another example, in Fortran, the source code may include:

[0043] program hello

[0044] print*,"Hello world"

[0045] end program hello

[0046] Other source code examples may be received by source code language engine 114 and stored in source code language data repository 130. The programming language and example source code provided herein are for illustrative purposes only and should not be limited to disclosure.

[0047] The source code language engine 114 can generate source code locally on the computing device 100. For example, the source code language engine 114 can generate a set of scripts that can randomly add or subtract source code language features for training purposes. As an illustrative example, the script can create a set of sample codes that only change the printout to the display or terminal. This can help create multiple different sets of source code to further train the compiler based on the ML model. The output executable code can be generated by compiling the source code (e.g., using a local compiler). The executable code can be converted into a digital format to generate an input set to the trained ML model (e.g., the input is the source code and the output is a digital format corresponding to the executable code). This process can help build a larger training data set without relying on different computing devices to send source code examples for training.

[0048] Source code language engine 114 can also receive (or generate) additional source code examples that are longer or more complex than the "hello world" code. For example, the additional source code can include assigning one or more characters to a variable and printing the output to a computing device display dedicated to generating the output, rather than directly printing one or more characters with a local device terminal. In some examples, the additional source code examples may increase the complexity of the source code, such as more complex features in each programming language. For example, these features may include comment lines, line breaks, assignment statements, declarations, algorithm loops, case statements, if / then / else statements, carriage returns, printing strings directly or through character variables, and other multi-iteration instructions.

[0049] Programming language features may be added to the training process (e.g., by the ML training engine 120) until all features of the standard compiler are present in the training code samples. Each sample source code instruction may have a corresponding numeric format (e.g., hexadecimal) representing the executable code. Once the second phase is complete, the ML model-based compiler should be able to compile a variety of "hello world" programs in multiple source code languages ​​and generate executable files for multiple types of hardware.

[0050] In some examples, source code generation performed by source code language engine 114 may start with a single standard compiler (e.g., to make the training process less resource intensive and faster), but may be expanded to use all possible available standard compilers that convert source code in one language into executable code in a digital format. In this way, the ML model-based compiler may be exposed to multiple methods of generating executable files.

[0051] The source code language engine 114 may also be configured to detect or identify errors in the source code. For example, when a character is missing from an instruction statement (such as ";" or "}"), the source code language engine 114 may identify that the character is missing and, like a standard compiler, will not be able to generate an executable file without generating an error. The ML model-based compiler may be trained to identify these types of errors in the source code and determine that the compiled executable code will not be generated (e.g., at the ML training engine 120), but instead will generate error code.

[0052] The tokenization circuit 116 can be configured to decompose or decode the source code or executable file into tokens corresponding to individual instructions or character sets (e.g., during a training process). In some examples, the tokenization circuit 116 can implement a machine-implemented process, algorithm, or design flow. The tokenized code can be a text string, a vector data array, or other data structure format that represents computer-implemented instructions in a corresponding language. Each tokenized code, expected output (e.g., executable code for that particular source code instruction) and its corresponding language can be stored in the tokenized code data repository 132. In some examples, the tokenized code can correspond to various digital formats.

[0053] The tokenized code may correspond to various conversion formats of the ML model-based compiler. For example, when the ML model-based compiler may be configured to convert source code from a first language or format to a second language or format, the token may correspond to a string of characters or a vector of characters in the first language, an equivalent string of characters or a vector of strings or characters in the second language, and the identifiers of the two languages. In another example, when the ML model-based compiler may be configured to convert source code to run on a first device or a second device, the token may correspond to a string of characters or a vector of characters in the source code, a compiled executable code in a digital format as an instruction to be run on the first device, and a compiled executable code as an instruction to be run on the second device. In another example, when the ML model-based compiler may be configured to convert source code into compiled executable code (or vice versa, where the ML model-based compiler converts the compiled executable code back to source code), the token may correspond to a string of characters or a vector of characters in the source code, a compiled executable code in a digital format as an instruction to be run on the first device, and the source code and the identifier of the device that executes the corresponding compiled code. In another example, when the ML model-based compiler may be configured to convert compiled executable code to run on a first device or a second device, the token may correspond to a string of characters or a vector of characters in the compiled executable code in a digital format as instructions to run on the first device, and a string of characters or a vector of characters in the compiled executable code as instructions to run on the second device.

[0054] The tokenization circuit 116 may be configured to convert tokens in a first language into tokens in a second language using the state vector. For example, each token may correspond to an instruction set architecture (e.g., corresponding to a label, logic, or output) for performing an action. The tokenization circuit 116 may search for corresponding actions in different languages ​​and may identify corresponding tokens that may be equivalent (e.g., when performing the same action) in different languages.

[0055] The tokenization circuit 116 may also be configured to construct or encode the tokenization code as an encoder. The output of the encoder may correspond to a sequence vector of tokenization codes to perform an action (e.g., logic in a language required to run a program, read a complete file, or other computer-based actions performed by machine-readable instructions). In some examples, as part of the encoder, the tokenization circuit 116 may create tokens for a state vector and a decoder. To convert from a first language to a second language, the tokenization circuit 116 may encode the first language into one or more tokens, pass the tokens to a state vector, and then decode the tokens of the second language. Figure 10-11 An illustrative example of tokenization is provided.

[0056] Vectorization circuit 118 may be configured to generate sequence vectors of tokenized code. In some examples, vectorization circuit 118 may implement state vectors or thought vectors to determine the condition or state of source code or execution code (e.g., a column of numbers representing how each item relates to other items). For example, each sequence vector may describe specific logic that configures a computing device to perform a corresponding action.

[0057] As described herein, a machine learning (ML) training engine 120 may train an ML model-based compiler on text pairs (eg, source code, executable code or files, translated digital files, and text pairs in other formats).

[0058] The machine learning (ML) training engine 120 may continue and increase the complexity of the training process (e.g., in addition to the "hello world" code). For example, the ML training engine 120 may systematically add compiler features. Additional compiler features may be added to sample input code in a random manner. The ML model-based compiler may be regularly trained and checked to ensure accuracy between input source code and output. In another example, the ML training engine 120 may add open source code to identify new source code and training examples.

[0059] The machine learning (ML) training engine 120 may determine a confidence value associated with the output of the ML model-based compiler. For example, the confidence value may identify the correctness of matching the source code with the actions that the source code is expected to perform. The confidence value may identify the likelihood that the input matches the output (e.g., the ML model-based compiler obtains the correct answer).

[0060] Once the compiler based on the ML model has a very high confidence (e.g., a confidence value exceeding a threshold) in generating executable code, the ML model can be optimized according to one or more optimization parameters. For example, the optimization parameters can include increasing execution speed. The sample code can be compiled and executed, and the execution time can be recorded and used for optimization.

[0061] In another example, the ML training engine 120 may recommend performance-optimized source code and executable code. In this example, a specific computing device may be identified as an output of the trained ML model, where the specific computing device corresponds to the most efficient computing device for the source code or compiled code. In this way, the execution of the compiled code may be optimized.

[0062] The machine learning (ML) generation engine 122 can be trained to convert input into text pairs corresponding to a first programming language (e.g., source code and a corresponding digital format) for output. The ML generation engine 122 can compile computer source code from the first programming language into computer source code corresponding to a second programming language (e.g., converting C code into Fortran code or translating TensorFlow code into PyTorch code) or converting source code into a digital format (as discussed throughout the disclosure).

[0063] In some examples, the ML generation engine 122 may receive the text pair as a sequence vector of tokenized codes. The ML generation engine 122 may be trained to generate an output that creates a second executable file for device X or device Y. In other words, the ML generation engine 122 may create an executable file corresponding to the source code that, once converted into a digital format, performs the same operation in device X or device Y.

[0064] The ML generation engine 122 can also convert executable files to run on different computing devices (e.g., CPU, CPU, GPU, GPUs, TPUs, and other processors).

[0065] The ML generation engine 122 can be configured to execute supervised ML models using linear or nonlinear functions. For example, a trained ML model can include a decision tree that accepts one or more input features associated with source code or executable code to provide a confidence score that associates the input with an output (e.g., source code in different languages, executable code for different devices, and other conversion processes described herein).

[0066] In some examples, when a non-linear ML model is used, the weights of tokens corresponding to portions of source code or executable code can vary. In some examples, the weights can be determined through an iterative training process of a compiler based on the ML model.

[0067] In some examples, an ML model-based compiler may include a neural network that measures relationships between dependent variables (e.g., logic or actions implemented by a device) and independent variables (e.g., tokens) by using multiple layers of processing elements that determine nonlinear relationships and interactions between the independent and dependent variables.

[0068] In some examples, an ML model-based compiler may include a deep learning neural network consisting of more than one layer of processing elements between an input layer and an output layer, or a convolutional neural network in which successive layers of processing elements contain a specific hierarchical pattern of connections to the previous layer.

[0069] The hardware module 124 can determine one or more computing devices that can execute the compiled executable code. The identified computing devices can be based on the characteristics of the computing devices. The identification of the computing devices, the instruction set architecture (ISA) of the devices, and other information can be stored in the hardware device data repository 134.

[0070] In some examples, hardware module 124 can identify a specific computing device that is optimized to pass data from a first computing device to a second computing device along a network path. Hardware module 124 can identify the specific computing device based on the characteristics and convert the compiled executable code to run on the specific computing device. In another example, hardware module 124 can automatically distribute the workload across the most available high-performance processor or accelerator components of the computing device (e.g., supporting a performance-as-a-service business model).

[0071] The hardware module 124 may also determine temporary characteristics of one or more computing devices that may be candidates for executing the compiled executable code. The temporary characteristics of the computing devices may also be stored in the hardware device data repository 134 to analyze data over time. For example, during a first time period, a first computing device may execute instructions at fifty percent capacity, while a second computing device may execute instructions at ninety percent capacity. The hardware module 124 may convert source code to be executed by a first computing device that has computing capacity to run additional processes. The first computing device may be underutilized or waiting for instruction execution, and after being identified, instructions may be executed so that it is no longer underutilized.

[0072] In some examples, computing device 100 can be implemented to run as a service, where an entity calling computing device 100 can have hundreds of models deployed in a production environment. A first portion of a model can run more efficiently on a first computing device than on a second device (e.g., 20% of the model works well on the first computing architecture), and a second portion of the model can run more efficiently on the second computing device than on the first device (e.g., 20% of the model works well on the second computing architecture). A computer programmer or software developer can write initial source code in a first language, and computing device 100 can convert the source code or compiled executable code to execute on any computing device optimized for speed, efficiency, usability, etc.

[0073] The optimization module 126 can receive performance data for various computing devices that execute compiled executable code. Execution time, processing speed, or other metrics can be associated with the compiled code and compared across various devices. The performance data can be used to train the ML model-based compiler to identify the hardware computing devices that should receive instructions to execute a particular process in order to optimize execution.

[0074] In some examples, the optimization module 126 may combine or aggregate tokens to generate concise source code or executable code. For example, a first English to French translator may convert an English phrase from 10 words to 20 French words, while a second English to French translator may convert an English phrase from 10 words to 8 French words. The two French phrases may convey similar English sentences, but the second translator may convert the sentences more concisely (e.g., fewer words, fewer characters, simpler terms, or other optimization goals). Similarly, a compiler based on an ML model may combine or aggregate tokens that execute an executable process (e.g., opening, processing, and storing a novel in a data repository) into fewer steps (or other optimization parameters) than a standard compiler to optimize execution.

[0075] Figure 2 A set of traditional compilers are illustrated. In example 210, a first compiler can be used to compile and optimize a first source code language (C or C++), which is then built into an executable code that runs on one or more computing devices with one or more central processing units (CPUs). In example 220, a second compiler can be used to compile and optimize a first source code language using an (OpenCL) framework, which is then built into an executable code that runs on one or more computing devices with one or more accelerators. In example 230, a third compiler can be used to compile and optimize a first source code language using a (CUDA or HIP) toolkit, which is then built into an executable code that runs on one or more computing devices with one or more graphics processing units (GPUs). In example 240, a fourth compiler can be used to synthesize / compile and optimize a first source code language (VHDL), which is then built into an executable code that runs on one or more computing devices with one or more field programmable gate arrays (FPGAs).

[0076] Each of the illustrated examples includes a different compiler or other computer program that is tuned to receive a source code programming language and change it into another format that runs on a specific device (e.g., built as executable code that runs on a specific computing device). A compiler can translate computer code written in one programming language (e.g., a source language) into another language (e.g., assembly language, object code, machine code, or other target language) to create an executable program.

[0077] Figure 3-Figure 6 The diagrams illustrate computing devices for implementing a compiler based on an ML model according to some examples of the present invention. In these examples, initial code (e.g., source code, machine executable code, or other code) may pass through an encoding process that generates embedded tokens. The embedded tokens may be transferred to a state vector that converts them into other architectures or formats and transfers them to a decoding process. The decoding process may construct a token or sequence vector of digital code into various defined formats (e.g., different source code, machine executable code, or other code).

[0078] Figure 3 A computing device implementing an ML model-based compiler according to some examples of the present disclosure is illustrated. Figure 3 The computing device 300 can implement Figure 1 , which have been removed for simplicity of illustration. In this example, computing device 300 can receive any source code programming language and use an ML model-based compiler to change it from a first format to a second format configured to run on multiple devices (e.g., change source code A to an executable file for device X or device Y).

[0079] Figure 4 A computing device implementing an ML model-based compiler according to some examples of the present disclosure is illustrated. Figure 4 The computing device 400 can implement Figure 1 , which have been removed for simplicity of illustration. In this example, computing device 400 can receive any source code programming language and use an ML model-based compiler to change it from a first format to a second format corresponding to any other source code programming language (e.g., change source code A to source code B or source code C).

[0080] Figure 5 A computing device implementing an ML model-based compiler according to some examples of the present disclosure is illustrated. Figure 5 The computing device 500 can implement Figure 1 Several components of the computing device 100 shown in FIG. 5 have been removed for simplicity of illustration. In this example, the computing device 500 can receive executable code and use an ML model-based compiler to change it from a first format to a second format corresponding to any source code programming language (e.g., from executable for device X to source code A or source code B).

[0081] Figure 6A computing device implementing an ML model-based compiler according to some examples of the present disclosure is illustrated. Figure 6 The computing device 600 can implement Figure 1 , which have been removed for simplicity of illustration. In this example, computing device 600 may receive executable code configured to run on a first device and use an ML model-based compiler to change it from a first format to a second format configured to run on a different device (e.g., an executable file for device X becomes an executable file for device Y).

[0082] Figure 7 Illustrated are some examples of cross-compiling source code for different computing devices according to the present disclosure. As shown throughout the application, source code and executable code can be found in Figure 1 The code may be locally or natively compiled at the computing device 100 shown in , or may be locally or natively compiled at a first computing device and transmitted to the computing device 100 for conversion into another format (eg, for cross-compiling the code).

[0083] In some examples, the first hardware device 700 can be connected to Figure 1 . The first hardware device 700 may generate source code and convert the source code into an executable file that can be run on the second device, as shown in the second hardware device 730. In this way, the first hardware device 700 may implement cross-compilation by indicating that the ML-based compiler executable file located at the first hardware device 700 will be run on the second hardware device 730 (e.g., corresponding to a specific instruction set architecture (ISA) or other computing component). The ML-based compiler at the first hardware device 700 may completely generate an executable file in a digital format on the first hardware, but the executable file cannot be run on the first hardware device 700.

[0084] Once the executable file is generated, the file can be transferred. For example, the first hardware device 700 can directly transfer the executable file in digital format to the second hardware device 730, such as Figure 5 and Figure 6 In other examples, the first hardware device 700 may transmit the digitally formatted executable file through an intermediary device such as the computing device 720 to run the digitally formatted executable file to run at the second hardware device 730 .

[0085] When implementing an intermediary device, the first hardware device 700 may implement a native compiler (for generating a standard executable file from source code), and the intermediary device implements an ML-based compiler (for converting the source code or executable file generated by the first hardware device 700 into a different format, as described herein). For example, Figure 1 The computing device 100 shown in the figure can correspond to the computing device 720, and the local computing device (e.g., operated by a computer programmer or software developer) can correspond to the first hardware device 700 and the second hardware device 730. In this example, the computing device 720 does not generate the original source code file or run the executable file, but can analyze the source code file (generated by the first hardware device 700) to generate an executable file for a different device (the second hardware device 730). In some examples, the first hardware device 700 and the second hardware device 730 can implement a standard or local compiler, and the computing device 720 can implement a trained ML model-based compiler. However, various implementations are possible, and this illustrates an example.

[0086] At block 704 , the first hardware device 700 may generate source code in a first source code language.

[0087] At block 706, the first hardware device 700 may compile the source code using a first compiler to generate an executable file for the second hardware device 730. The first compiler may correspond to a standard or native compiler configured to compile source code.

[0088] At block 708 , the first hardware device 700 may transfer the first executable file to the computing device 720 .

[0089] At block 722, computing device 720 may process the first executable file using a second compiler, where the second compiler corresponds to the trained ML model-based compiler. In some examples, the first executable file may be processed using the trained ML model-based compiler to convert the first executable file into a second executable file. The second executable file may be output from the trained ML model-based compiler.

[0090] At block 724 , computing device 720 may transfer the second executable file to second hardware device 730 .

[0091] When the first hardware device 700 generates an executable file for the second hardware device 730 and transmits the executable file directly to the second hardware device 730, blocks 722 and 724 may be optional.

[0092] At block 732, the second hardware device 730 may execute the second executable file.

[0093] Figure 8 The diagram illustrates some examples of cross-compiling source code for different computing devices according to the present invention. For example, Figure 1 The computing device 100 shown in FIG. 1 may correspond to the computing device 820, and a local computing device (e.g., operated by a computer programmer or software developer) may correspond to the first computing device 810, the second computing device 830A, and the additional computing device 830B. In some examples, these local computing devices may implement a standard compiler, while the computing device 820 implements a trained ML model-based compiler.

[0094] Can be Figure 8 The realization of Figure 7 However, the output of computing device 820 may generate an executable file that is configured to run on a computing device operating an instruction set architecture (ISA) different from that of the first computing device 810.

[0095] Fig. 9 The following illustrates a process for training a compiler based on an ML model according to some examples of the present disclosure. For example, Figure 1 The computing device 100 shown in FIG. 1 can receive source code or compiled executable code to help train a compiler based on an ML model.

[0096] At block 910, the process can create a synthetic example of source code and compiled executable code. For example, the process can run a script to generate the synthetic example, or can launch a web crawler to collect source code examples from various sources including open source data. The source code can be compiled using a standard compiler associated with the programming language of the source code to generate the compiled executable code. In other examples, the process can receive the source code example and the compiled executable file.

[0097] At block 920 , as part of the training process, the process may tokenize the source code and compiled code into one or more tokens. The tokens may be stored in a token data store such as the tokenized code data store 132 .

[0098] At box 930, the process can create an embedding. For example, the embedding process can transform a high-dimensional vector in a low-dimensional space to simplify the machine learning process. By placing semantically similar inputs or predicted outputs close together in the embedding space, the embedding can include some semantics of the language corresponding to the input (e.g., source code or executable code) (e.g., the sentences "How old are you?" and "What is your age?" can generate similar outputs in the language conversion example, and "X=A+B+C" can be the same as "X=B+A+C" in the encoding example). In some examples, embeddings can be learned and reused across different ML models (e.g., source code in a first language to source code in a second language, source code on a first device to executable code on a second device, etc.).

[0099] At block 940 , the process may create a sequence vector of digital (eg, binary, hexadecimal, or octal) codes.

[0100] At block 950, the process can train an ML model in an encoder-decoder architecture. In some examples, the model can correspond to one or more machine learning models, including a generative adversarial network (GAN) model. A GAN model can correspond to a specific type of ML model in which two neural networks compete with each other to make their predictions more accurate. Other types of ML models are also available and discussed herein, including deep learning neural networks or convolutional neural networks.

[0101] At block 960, the process may train a neural machine translator architecture network for code translation. Once the ML model is trained, a compiler based on the ML model is generated from the training process.

[0102] Fig.10 The process of tokenizing a source language and embedding it into a target language is illustrated according to some examples of the invention. In this illustrative example, a decoder 1010 can receive a sentence of items to be tokenized and embedded. The embedded tokens can be transmitted to a state vector 1020. The state vector 1020 can transmit the embedded tokens to an encoder 1030 to convert them into other architectures or formats using an encoder process that can construct vectors of tokens or sequences of digital codes into these defined formats (e.g., English to Danish).

[0103] Fig.11The process for tokenizing source code and embedding it for compilation according to some examples of the present invention is illustrated. In this illustrative example, a decoder 1110 can receive a set of tokenized and embedded items. The embedded tokens can be transmitted to a state vector 1120. The state vector 1120 can transmit the embedded tokens to an encoder 1130 to convert them into other architectures or formats using an encoder process that can construct tokens or sequence vectors of digital code into these defined formats (e.g., source code A to executable code X).

[0104] Fig.12 Example computing components that can be used to implement a compiler based on an ML model according to various embodiments are illustrated. Fig.12 , computing component 1200 may be, for example, a server computer, a controller, or any other similar computing component capable of processing data. Fig.12 In an example implementation of , computing component 1200 includes a hardware processor 1202 and a machine-readable storage medium 1204 .

[0105] The hardware processor 1202 may be one or more central processing units (CPUs), semiconductor-based microprocessors, and / or other hardware devices suitable for retrieving and executing instructions stored in the machine-readable storage medium 1204. The hardware processor 1202 may fetch, decode, and execute instructions, such as instructions 1206-1212, to control a process or operation for implementing a compiler based on an ML model. As an alternative or in addition to retrieving and executing instructions, the hardware processor 1202 may include one or more electronic circuits including electronic components for performing the functions of one or more instructions, such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other electronic circuits.

[0106] A machine-readable storage medium, such as machine-readable storage medium 1204, may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, machine-readable storage medium 1204 may be, for example, a random access memory (RAM), a non-volatile RAM (NVRAM), an electrically erasable programmable read-only memory (EEPROM), a storage device, an optical disk, etc. In some embodiments, machine-readable storage medium 1204 may be a non-transitory storage medium, where the term "non-transitory" does not encompass transient propagating signals. As described in detail below, machine-readable storage medium 1204 may be encoded with executable instructions, such as instructions 1206-1212.

[0107] Hardware processor 1202 may execute instructions 1206 to receive a first executable file compiled from a first programming language.

[0108] The hardware processor 1202 may execute instructions 1208 to tokenize the first executable file.

[0109] The hardware processor 1202 may execute instructions 1210 to generate a sequence vector of a tokenized code.

[0110] The hardware processor 1202 may execute instructions 1212 to provide the sequence vector of tokenized codes as input to the trained ML model compiler.

[0111] Hardware processor 1202 may execute instructions 1214 to provide a second executable file to a hardware device configured to run a program in a second programming language.

[0112] Fig.13 Illustrated are example computing components that can be used to implement training of a compiler based on an ML model according to various embodiments. Fig.13 , computing component 1300 may be, for example, a server computer, a controller, or any other similar computing component capable of processing data. Fig.13 In an example implementation of , computing component 1300 includes a hardware processor 1302 and a machine-readable storage medium 1304 .

[0113] The hardware processor 1302 may be one or more central processing units (CPUs), semiconductor-based microprocessors, and / or other hardware devices suitable for retrieving and executing instructions stored in the machine-readable storage medium 1304. The hardware processor 1302 may extract, decode, and execute instructions such as instructions 1306-1312 to control a process or operation for implementing a compiler based on an ML model. As an alternative or in addition to retrieving and executing instructions, the hardware processor 1302 may include one or more electronic circuits including electronic components for performing the functions of one or more instructions, such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or other electronic circuits.

[0114] A machine-readable storage medium, such as machine-readable storage medium 1304, may be any electronic, magnetic, optical, or other physical storage device that contains or stores executable instructions. Thus, machine-readable storage medium 1304 may be, for example, a random access memory (RAM), a non-volatile RAM (NVRAM), an electrically erasable programmable read-only memory (EEPROM), a storage device, an optical disk, etc. In some embodiments, machine-readable storage medium 1304 may be a non-transitory storage medium, where the term "non-transitory" does not encompass transient propagating signals. As described in detail below, machine-readable storage medium 1304 may be encoded with executable instructions, such as instructions 1306-1312.

[0115] The hardware processor 1302 may execute instructions 1306 to receive published open source data.

[0116] The hardware processor 1302 may execute instructions 1308 to compile the released open source data using a standard compiler to generate executable code.

[0117] Hardware processor 1302 may execute instructions 1310 to provide a source code and executable code pair, including source code and executable code, to an ML model for training.

[0118] Hardware processor 1302 may execute instructions 1312 to determine a trained ML model.

[0119] It should be noted that the terms "optimize," "optimal," and the like as used herein may be used to refer to making or achieving as efficient or perfect a performance as possible. However, as will be appreciated by those of ordinary skill in the art reading this document, perfection cannot always be achieved. Thus, these terms may also encompass making or achieving as good or efficient or practical a performance as possible under given circumstances, or making or achieving a better performance than could be achieved with other settings or parameters.

[0120] Fig.14 A block diagram of an example computer system 1400 is shown in which various embodiments described herein may be implemented. The computer system 1400 includes a bus 1402 or other communication mechanism for communicating information, and one or more hardware processors 1404 coupled to the bus 1402 for processing information. The hardware processor(s) 1404 may be, for example, one or more general purpose microprocessors.

[0121] The computer system 1400 also includes a main memory 1406, such as a random access memory (RAM), cache, and / or other dynamic storage device, coupled to the bus 1402 for storing information and instructions to be executed by the processor 1404. The main memory 1406 may also be used for storing temporary variables or other intermediate information during execution of instructions to be executed by the processor 1404. Such instructions, when stored in a storage medium accessible to the processor 1404, cause the computer system 1400 to become a special-purpose machine customized to perform the operations specified in the instructions.

[0122] The computer system 1400 also includes a read only memory (ROM) 1408 or other static storage device coupled to the bus 1402 for storing static information and instructions for the processor 1404. A storage device 1410, such as a magnetic disk, optical disk, or USB thumb drive (flash drive), is provided and coupled to the bus 1402 for storing information and instructions.

[0123] Computer system 1400 may be coupled via bus 1402 to a display 1412, such as a liquid crystal display (LCD) (or, touch screen), for displaying information to a computer user. An input device 1414, including alphanumeric and other keys, is coupled to bus 1402 for communicating information and command selections to processor 1404. Another type of user input device is a cursor control device 1416, such as a mouse, trackball, or cursor direction keys, for communicating direction information and command selections to processor 1404, and for controlling cursor movement on display 1412. In some embodiments, the same direction information and command selections as with a cursor control device may be achieved via receiving touches on a touch screen without a cursor.

[0124] The computing system 1400 may include a user interface module that implements a graphical user interface (GUI), which may be stored in a mass storage device as executable software code executed by the computing device(s). This and other modules may include, by way of example, components such as software components, object-oriented software components, class components, and task components, processes, functions, properties, procedures, subroutines, program code segments, drivers, firmware, microcode, circuits, data, databases, data structures, tables, arrays, and variables.

[0125] In general, the terms "component", "engine", "system", "database", "data repository", etc. used herein may refer to logic implemented in hardware or firmware, or to a collection of software instructions, possibly with entry and exit points, written in a programming language such as Python, Java, C or C++. Software components may be compiled and linked into executable programs installed in dynamic link libraries, or may be written in interpreted programming languages ​​such as BASIC, Perl or Python. It should be understood that software components may be called from other components or from themselves, and / or may be called in response to detected events or interrupts. Software components configured for execution on a computing device may be provided on a computer-readable medium, such as a compact disc, a digital video disc, a flash drive, a disk, or any other tangible medium, or as a digital download (and may be initially stored in a compressed or installable format that requires installation, decompression or decryption prior to execution). Such software code may be stored in part or in whole on a memory device of an executing computing device for execution by the computing device. Software instructions may be embedded in firmware, such as an EPROM. It should also be understood that hardware components may include connected logic units, such as gates and flip-flops, and / or may include programmable units, such as programmable gate arrays or processors.

[0126] The computer system 1400 may implement the techniques described herein using custom hardwired logic, one or more ASICs or FPGAs, firmware, and / or program logic that is combined with the computer system to make the computer system 1400 a special purpose machine or program the computer system 1400 to be a special purpose machine. According to one embodiment, the techniques herein are performed by the computer system 1400 in response to the processor(s) 1404 executing one or more sequences of one or more instructions contained in the main memory 1406. These instructions may be read into the main memory 1406 from another storage medium such as the storage device 1410. Execution of the sequences of instructions contained in the main memory 1406 causes the processor(s) 1404 to perform the processing steps described herein. In alternative embodiments, hardwired circuitry may be used in place of or in combination with software instructions.

[0127] As used herein, the term "non-transitory medium" and similar terms refer to any medium that stores data and / or instructions that cause a machine to operate in a specific manner. Such non-transitory media may include non-volatile media and / or volatile media. Non-volatile media include, for example, optical or magnetic disks, such as storage device 1410. Volatile media include dynamic memory, such as main memory 1406. Common forms of non-transitory media include, for example, floppy disks, flexible disks, hard disks, solid-state drives, NVMe drives, tapes or any other magnetic data storage media, CD-ROMs, any other optical data storage media, any physical media with a pattern of holes, RAM, PROMs and EPROMs, FLASH-EPROMs, NVRAMs, any other memory chips or cartridges, and networked versions thereof.

[0128] Non-transient media are distinct from transmission media, but can be used in conjunction with transmission media. Transmission media participate in the transmission of information between non-transient media. For example, transmission media include coaxial cables, copper wire, and optical fiber, including the wires that comprise bus 1402. Transmission media can also take the form of acoustic or light waves, such as those generated during radio wave and infrared data communications.

[0129] Computer system 1400 also includes a communication interface 1418 coupled to bus 1402. Communication interface 1418 provides bidirectional data communication coupled to one or more network links connected to one or more local networks. For example, communication interface 1418 can be an integrated services digital network (ISDN) card, a cable modem, a satellite modem, or a modem that provides a data communication connection to a corresponding type of telephone line. As another example, communication interface 1418 can be a local area network (LAN) card to provide a data communication connection to a compatible LAN (or, a wide area network (WAN) component that communicates with a WAN). Wireless links can also be implemented. In any such implementation, communication interface 1418 sends and receives electrical, electromagnetic or optical signals that carry digital data streams representing various types of information.

[0130] A network link typically provides data communication to other data devices through one or more networks. For example, a network link may provide a connection to a host computer or to data equipment operated by an Internet Service Provider (ISP) through a local network. The ISP, in turn, provides data communication services through the global packet data communication network now commonly referred to as the "Internet." The local network and the Internet use electrical, electromagnetic or optical signals that carry digital data streams. The signals through the various networks and the signals on the network link and through the communication interface 1418 are example forms of transmission media that carry digital data to and from the computer system 1400.

[0131] Computer system 1400 can send messages and receive data, including program code, through the network(s), network link(s) and communication interface(s) 1418. In the Internet example, a server can transmit a request for an application program code through the Internet, an ISP, a local network and communication interface 1418.

[0132] The received code may be executed by processor 1404 as it is received, and / or stored in storage device 1410 or other non-volatile storage for later execution.

[0133] The processes, methods, and algorithms described in the foregoing sections may be embodied in code components executed by one or more computer systems or computer processors including computer hardware, and fully or partially automated by them. The one or more computer systems or computer processors may also operate to support the performance of related operations in a "cloud computing" environment or as "software as a service" (SaaS). These processes and algorithms may be implemented in part or in whole in dedicated circuits. The various features and processes described above may be used independently of each other, or may be combined in various ways. Different combinations and sub-combinations are intended to fall within the scope of the present disclosure, and certain method or process blocks may be omitted in some implementations. The methods and processes described herein are also not limited to any particular order, and the blocks or states associated therewith may be executed in other appropriate orders, or may be executed in parallel, or in some other manner. Blocks or states may be added to or deleted from the disclosed example embodiments. The performance of certain operations or processes may be distributed in computer systems or computer processors, not only residing in a single machine, but deployed on multiple machines.

[0134] As used herein, circuits can be implemented using any form of hardware, software, or a combination thereof. For example, one or more processors, controllers, ASICs, PLAs, PALs, CPLDs, FPGAs, logic components, software routines, or other mechanisms can be implemented to form circuits. In implementation, the various circuits described herein can be implemented as discrete circuits, or the functions and features described can be partially or completely shared between one or more circuits. Even if various features or functional elements can be described or declared as separate circuits separately, these features and functions can be shared between one or more common circuits, and such descriptions should not require or imply that separate circuits are needed to implement these features or functions. When the circuit is implemented in whole or in part using software, such software can be implemented to operate together with a computing or processing system (such as computer system 1400) that can perform the functions described therein.

[0135] As used herein, the term "or" may be interpreted as having either an inclusive or exclusive meaning. Furthermore, descriptions of resources, operations, or structures in the singular should not be understood to exclude the plural. Unless specifically stated otherwise, or understood otherwise in the context of use, conditional language, such as "may," "might," "can," or "could," is generally intended to convey that certain embodiments include certain features, elements, and / or steps, while other embodiments do not.

[0136] The terms and phrases used in this document, and variations thereof, unless expressly stated otherwise, should be understood to be open-ended and not restrictive. Adjectives such as "conventional," "traditional," "normal," "standard," "known," and terms of similar meaning should not be construed to limit the items described to a given time period or to items available at a given time, but should be understood to cover conventional, traditional, normal, or standard technologies available or known now or at any time in the future. In some cases, the presence of broadening words and phrases such as "one or more," "at least," "but not limited to," or other similar phrases should not be understood to mean that a narrower case is desired or required where such broadening phrases may not be present.

Claims

1. A computing device, comprising: Memory; as well as One or more processors configured to execute machine-readable instructions stored in the memory for instructing the one or more processors to: receiving a first source code file, wherein the first source code file is compiled in a first programming language, and a first executable file compiled from the first source code file is compiled using a first hardware device having a first instruction set architecture (ISA); tokenizing the first source code file to form a tokenized code; Generate a sequence vector of tokenized codes; providing the sequence vector of tokenized code as input to a trained machine learning (ML) model compiler, wherein an output of the trained ML model compiler creates a second source code file in a second programming language; as well as The second source code file is provided to a second hardware device, the second hardware device being configured to run a program in the second programming language or to process a computing unit having a second instruction set architecture (ISA), wherein the first ISA and the second ISA are different architectures.

2. The computing device of claim 1, wherein the tokenization code is in hexadecimal format.

3. The computing device of claim 1, wherein the tokenization code is in binary format.

4. The computing device of claim 1 , wherein the one or more processors are further configured to: The tokenization code is embedded using an encoder of the computing device, wherein an output of the encoder is the sequence vector of the tokenization code.

5. The computing device of claim 1, wherein the first source code file is compiled targeting the second hardware device having the second ISA, and wherein the first ISA and the second ISA are different architectures.

6. A computing device comprising: Memory; as well as One or more processors configured to execute machine-readable instructions stored in the memory for instructing the one or more processors to: receiving a first executable file, wherein the first executable file is generated from a first source code file in a first programming language, and the first executable file is compiled using a first hardware device having a first instruction set architecture (ISA); tokenizing the first executable file to form a tokenized code; Generate a sequence vector of tokenized codes; providing the sequence vector of tokenized code as input to a trained machine learning (ML) model compiler, wherein the output of the trained ML model compiler creates a second executable file in a second programming language; as well as The second executable file is provided to a second hardware device, which is configured to run a program in the second programming language or to process a computing unit having a second instruction set architecture (ISA).

7. The computing device of claim 6, wherein the first source code file in the first programming language is different from a second source code file corresponding to the second executable file.

8. The computing device of claim 6, wherein the tokenization code is in hexadecimal format.

9. The computing device of claim 6, wherein the tokenization code is in a binary format.

10. The computing device of claim 6, wherein the one or more processors are further configured to: The tokenization code is embedded using an encoder of the computing device, wherein an output of the encoder is the sequence vector of the tokenization code.

11. The computing device of claim 6, wherein the first source code file is compiled targeting a second hardware device having a second instruction set architecture (ISA), and wherein the first ISA and the second ISA are different architectures.

12. A computing device comprising: Memory; as well as One or more processors configured to execute machine-readable instructions stored in the memory for instructing the one or more processors to: receiving a first executable code, wherein the first executable code is compiled from a first source code in a first programming language, and the first executable code is configured to operate a computing unit having a first instruction set architecture ISA; tokenizing the first executable code to form a tokenized code; Generate a sequence vector of tokenized codes; providing the sequence vector of tokenized code as input to a trained machine learning (ML) model compiler, wherein an output of the trained ML model compiler creates a second source code in a second programming language; as well as The second source code is provided to a hardware device, the hardware device being configured to compile the second source code in the second programming language different from the first programming language.

13. The computing device of claim 12, wherein the tokenization code is in hexadecimal format.

14. The computing device of claim 12, wherein the tokenization code is in binary format.

15. The computing device of claim 12, wherein the one or more processors are further configured to: The tokenization code is embedded using an encoder of the computing device, wherein an output of the encoder is the sequence vector of the tokenization code.

16. The computing device of claim 12, wherein the first source code is compiled targeting a second hardware device having a second instruction set architecture (ISA), and wherein the first ISA and the second ISA are different architectures.

17. A computing device comprising: Memory; as well as One or more processors configured to execute machine-readable instructions stored in the memory for instructing the one or more processors to: receiving an open source code file, wherein the open source code file is generated in a programming language, and wherein the open source code file is published; Compiling the open source code file using a standard compiler to generate executable code; Providing a source code and an executable code pair to a machine learning (ML) model for training, wherein the source code and the executable code pair comprises the open source code file and the executable code; determining a trained ML model that has been trained; and Wherein the output of the trained ML model creates a source code file in a second programming language, the second programming language being different from the programming language corresponding to the open source code file.

18. The computing device of claim 17, wherein the output of the trained ML model creates an executable file for a second computing device.

19. The computing device of claim 18, wherein the executable code is provided to a second hardware device configured to run a program in a second programming language or to process a computing unit having a second instruction set architecture (ISA).

Citation Information

Patent Citations

  • Intent-based machine programming

    CN112148281A

  • Graphical user interface to an artificial intelligence engine utilized to generate one or more trained artificial intelligence models

    US20200250583A1