Domain-specific language compiler optimization method and system based on multi-layer intermediate representation

By designing DSL based on MLIR and combining AI algorithms, the problem of inaccurate optimization strategies of LLVM IR in the prior art in specific fields is solved, and efficient and simple compiler optimization is achieved, which is suitable for rapid development and optimization in specific fields.

CN119512557AActive Publication Date: 2025-02-25NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202411429388.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-25
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

When compiling using LLVM IR, it is difficult to implement efficient optimization strategies for specific fields, and the programming complexity is high and the program performance is poor.

Method used

By designing a domain-specific language (DSL) based on MLIR, translating MLIR into a DSL representation, and combining AI algorithms such as Monte Carlo tree search, optimize the compiler's decision-making process and scheduling strategies.

Benefits of technology

The compiler optimization method is simple, low programming complexity and high program performance. It is suitable for rapid development and optimization in specific fields, and supports AI-guided compilation optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512557A_ABST
    Figure CN119512557A_ABST
Patent Text Reader

Abstract

The invention discloses a domain-specific language compiler optimization method and system based on multi-layer intermediate representation, and the method comprises the steps: S1, defining a DSL to simplify the representation and operation in an MMIR, classifying operators in the MMIR, and enabling all kinds of operators in the MMIR to correspond to keywords in the DSL; s2, analyzing the target MLIR code, extracting input, output and control flow semantics of each operation, mapping an operator in the MLIR code into a corresponding expression in a DSL (Digital Subscriber Line), and converting each optimization strategy into the DSL expression; and S3, generating a DSL code according to the DSL representation, and continuously simulating and evaluating the performance of different optimization strategies by adopting a Monte Carlo tree search algorithm to find an optimal optimization strategy so as to realize compiler optimization. The method has the advantages of being simple in implementation method, low in programming complexity, high in program performance, high in flexibility and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of compiler technology, and in particular to a domain specific language compiler optimization method and system based on multi-layer intermediate representation. Background Art

[0002] LLVM (Low Level Virtual Machine) is a series of modular and reusable compiler and toolchain technologies. It provides a common compiler architecture to provide high-level information for compiler transformations to support transparent and continuous analysis and transformation of any program at compile time, link time, runtime, and between runs. The LLVM architecture divides the compilation process into several key stages: front-end, optimizer, and back-end. The front-end stage converts the source code into an intermediate representation (IR). The front-end LLVM supports multiple programming languages ​​(such as C, Fortran, Haskell) through Clang, generates an abstract syntax tree (AST) after lexical analysis and syntax analysis, and then converts it into a low-level programming language-independent LLVM IR. The IR design of LLVM allows the compiler to optimize at multiple stages, including compile time, link time, installation time, and even runtime. The optimizer stage uses a variety of optimization techniques to optimize the IR to improve the quality and execution efficiency of the code. The constant propagation, dead code elimination, loop optimization and other technologies used by the optimizer can eliminate redundant calculations and improve the execution efficiency of the code. At the same time, advanced technologies such as SSA-based optimization and global value numbering can further improve the quality and execution efficiency of the code. The backend stage supports multiple hardware architectures and can convert LLVM IR into assembly code for the target machine, thereby generating machine code optimized for specific hardware. The backend of LLVM also supports both just-in-time compilation (JIT) and ahead-of-time compilation (AOT) modes, providing language designers with more options. In this process, the backend is also responsible for handling issues related to the target machine, such as register allocation, instruction selection, and code scheduling.

[0003] In order to solve the limitations of LLVM IR in specific fields, a new compilation infrastructure is further proposed - MLIR (Multi-Level Intermediate Representation). The design of MLIR makes it convenient for compiler developers to define multi-level IR, or even define their own operations and abstractions in IR and optimize based on IR, so as to build the best model for the problem domain. This flexibility makes MLIR a powerful tool that can help developers create customized compilers and optimization strategies for specific hardware and model requirements. Existing technologies usually use LLVM as the basis of the compiler, implement optimization strategies based on MLIR's multi-layer intermediate representation, and provide JIT-supported infrastructure. Developers can use LLVM modules to implement just-in-time compilation functions. However, the above solutions not only have high programming complexity and affect program performance, but also may not be accurate enough for specific optimization requirements. It is often difficult to meet all the requirements of a specific field and cannot implement efficient optimization strategies for a specific field. Summary of the invention

[0004] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a domain-specific language compiler optimization method and system based on multi-layer intermediate representation, which has a simple implementation method, low programming complexity, high program performance and strong flexibility.

[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is: A domain-specific language compiler optimization method based on multi-layer intermediate representation, the steps comprising: Step S1. DSL design based on MLIR: define the syntax of DSL to simplify the representation and operation in MLIR, classify the operators in MLIR, and correspond the operators in MLIR to the keywords in DSL; Step S2. MLIR to DSL translation: parse the target MLIR code, extract the input, output and control flow semantics of each operation, map the operators in the MLIR code to the corresponding expressions in the DSL, and convert each optimization strategy in the target MLIR code to the DSL representation, so as to translate the target MLIR code into the DSL representation; Step S3. AI-based compilation optimization: Generate DSL code based on the translated DSL representation, obtain different optimization strategies respectively, and use the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the optimal optimization strategy. During the search process, a search tree is used to represent different optimization states, and each node represents an optimization decision. By expanding each child node, the search tree continues to grow until the optimal optimization strategy is obtained, thereby achieving compiler optimization.

[0006] Furthermore, in step S1, operators in MLIR are classified into arithmetic operators, logical operators, comparison operators, memory operators, function operations, control flow operators, and vector and tensor operators.

[0007] Furthermore, in step S1, in the syntax of defining the DSL, the defined types include def_func, def_mod, call, comm, log, and profile, which respectively correspond to defining functions, defining models, calculations, communications, printing logs, and tracking running information, and const, var, and ext are used as prefixes to represent constants, variables, and execution parameters, respectively.

[0008] Furthermore, in step S2, the target MLIR code is parsed, and the operators in the MLIR code are mapped to corresponding expressions in the DSL, including: Step S201: traverse the intermediate representation in the target MLIR code, parse each operator according to the operation type, and extract the input, output and control flow semantics of each operation; Step S202: During the parsing process, a mapping table is used to map operators in the target MLIR code to corresponding expressions in the DSL.

[0009] Furthermore, in step S2, converting each optimization strategy in the target MLIR code into a DSL representation includes converting loop unrolling, function inline optimization, vectorization optimization and constant folding in the target MLIR code into a DSL representation, wherein the process of converting the loop unrolling code includes simplifying the operations therein according to the DSL syntax, removing the type declaration in the MLIR code, and mapping the operators in the MLIR code to the corresponding expressions of the DSL; the process of converting the function inline optimization code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, simplifying the declaration of parameters and return types according to the DSL syntax, removing redundant type information and symbolic variable representations; the process of converting the vectorization optimization code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, directly passing the array name and index as parameters in the vector loading operation, and the parameters in the vector addition operation are the loaded vector variables; the process of converting the constant folding code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, directly declaring constants through corresponding keywords, and removing redundant syntax elements.

[0010] Furthermore, in step S3, the step of using the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the optimal optimization strategy includes: Step S301. Build a search tree: The root node of the search tree represents the state of the original program, that is, the code without any optimization operation, and each child node represents a specific optimization decision state; Step S302. Selection: traverse the search tree starting from the root node, selecting child nodes that meet the preset requirements each time for traversal until reaching a node that is not fully expanded; Step S303. Expansion: creating a new child node for the currently incompletely expanded node to perform node expansion; Step S304. Simulation: Simulate the effect of the optimization strategy corresponding to the newly expanded child node; Step S305: Feedback: The performance evaluation results obtained by simulation are fed back along the path from the root node to the current node, and the number of visits and performance estimates of each node on the path are updated. If the simulation result of the current node meets the preset requirements, the performance evaluation results of the node corresponding to the current optimization strategy and its ancestor nodes are improved during the feedback process, so as to increase the probability of the current node and its ancestor nodes being selected in the future. Step S306. Loop search and optimal strategy determination: Loop through steps S302 to S305 to continuously explore the loop expansion strategy space through repeated selection, expansion, simulation and feedback steps, so that the search tree continues to grow and optimize, until the iteration meets the preset requirements, and then select the optimization strategy corresponding to the node with the best performance as the optimal optimization strategy.

[0011] Furthermore, when the loop unrolling optimization strategy is used, the node in step S301 represents the number of loop unrolling times, and the node expansion in step S303 will expand the loop K times, and the target after multiple iterative searches is the optimal number of loop unrolling times; when the function inline optimization strategy is used, the node in step S301 represents the state of inlining the function to the call point, and the frequently called small functions are inlined when the node is expanded in step S303, and the target after multiple iterative searches is the best function inline selection; when the vectorization optimization strategy is used, the node in step S301 represents the vectorization operation on the data segment, and the data block is vectorized when the node is expanded in step S303, and the target after multiple iterative searches is the most effective vectorization solution; when the constant folding optimization strategy is used, the node in step S301 represents the state of constant folding in the expression, and the node expansion in step S303 will calculate the constants in the expression in advance and fold them, and the target after multiple iterative searches is the most reasonable constant folding combination.

[0012] Further, in step S302, the child node with the highest UCB value is selected for traversal, or the selection score is calculated by combining the UCB algorithm and the strategy network score according to the following formula: , select the one with the highest selection score Traverse the child nodes of

[0013]

[0014] in, and are the weights of UCB and policy network scores, represents the policy network score, represents the UCB value of the i-th node, is the average performance estimate at the ith node, is the number of visits to the ith node, is the number of visits to its parent node.

[0015] A compiler system includes a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0016] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed.

[0017] Compared with the prior art, the advantages of the present invention are as follows: the present invention realizes compiler optimization by combining DSL design with AI algorithm, expands the design of corresponding DSL on the basis of MLIR, translates MLIR into DSL representation and generates DSL code, which can greatly simplify the complex MLIR structure, avoid the use of lengthy function calls and complex syntax structures in general programming languages, and is particularly suitable for rapid development and optimization in specific fields. At the same time, it is optimized according to the needs of AI, and the decision-making process and scheduling strategy of the compiler are optimized by combining the AI ​​algorithm of introducing Monte Carlo tree search, which can better support AI-guided compilation optimization, which can not only reduce programming complexity, but also effectively improve program performance and application flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the principle architecture of implementing compiler optimization using DSL in this embodiment.

[0019] Figure 2 It is a schematic diagram of the implementation flow of the domain-specific language compiler optimization method based on multi-layer intermediate representation in this embodiment.

[0020] Figure 3 This is a schematic diagram of the principle of the traditional MLIR operation flow.

[0021] Figure 4 It is a schematic diagram of the operation process principle of this embodiment based on DSL.

[0022] Figure 5It is a schematic diagram of the AI-based code optimization implementation process of this embodiment. DETAILED DESCRIPTION

[0023] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.

[0024] For ease of understanding, the technical background related to the present invention is first exemplarily described.

[0025] Traditional common general programming languages ​​(such as Java, C++, Python, etc.) are designed to solve various types of problems and can be applied to multiple fields. They are general programming languages ​​that usually have more complex syntax and extensive functions, and the learning curve is relatively steep. Domain Specific Language (DSL) is a programming language designed specifically for a specific problem domain. It is designed to solve problems in a specific domain and removes the complexity that is irrelevant to the domain. It usually has concise syntax and expression. The syntax and structure are usually more intuitive, allowing domain experts to express their needs in a more intuitive and efficient way, improving the readability and maintainability of the code, making programming tasks in a specific domain easier and more efficient, and the code easier to understand and maintain. DSL is closer to the essence of domain problems, developers can understand and write code faster, reduce the occurrence of errors, and for researchers familiar with certain specific fields, using DSL can greatly improve development efficiency. In addition, since DSL allows compilers to understand the semantics of programs more easily, DSL can bring more opportunities for performance optimization and perform deeper optimization. For example, deep learning compilers can use DSL to identify and optimize operators in computational graphs. In automatic tuning, DSL helps define a clear search space so that the compiler can search for the optimal execution strategy more efficiently.

[0026] MLIR manages extensibility through dialects. A dialect is a set of operations and related semantics that together define a specific IR for expressing and manipulating computations in a specific domain. MLIR allows developers to define their own dialects for specific application domains or computational models. The unified and modular compiler infrastructure provided by MLIR enables integration and conversion between different dialects (including LLVM IR). Based on the dialect mechanism in the MLIR ecosystem, once a DSL that meets all the requirements of a specific domain is designed, it can be integrated into the unified MLIR ecosystem by creating a new dialect, and MLIR's compiler support and optimization for operations in the dialect can be used to implement efficient optimization strategies for specific problems in specific domains.

[0027] In the prior art, LLVM is usually used as the compiler basis, and optimization strategies are implemented based on the multi-layer intermediate representation of MLIR, while providing JIT-supported infrastructure. Developers can use the existing LLVM module to implement just-in-time compilation functions. The present invention is aimed at specific scenarios in specific fields, and compiler optimization is achieved by combining DSL design with AI algorithms. The corresponding DSL is extended and designed based on MLIR, and MLIR is translated into DSL representation and DSL code is generated. The complex MLIR structure can be greatly simplified, and optimized for AI needs. By combining the introduction of the Monte Carlo Tree Search (MCTS) AI algorithm to optimize the compiler's decision-making process and scheduling strategy, it can better support AI-guided compilation optimization, which can not only reduce programming complexity, but also effectively improve program performance.

[0028] like Figure 1 As shown, this embodiment implements domain-specific language compiler optimization based on multi-layer intermediate representation, including MLIR-based DSL design, MLIR-to-DSL translation, and AI-based compilation optimization. In the MLIR-based DSL design process, MLIR operators are classified, DSL syntax is defined, and MLIR operators are matched with DSL keywords; then, based on the above DSL design method, MLIR is translated into DSL representation, including parsing MLIR code, mapping MLIR operators to corresponding expressions in DSL, and converting optimization strategies in MLIR into corresponding DSL representations; then, based on the above DSL representation, AI-based compilation optimization is further performed, and AI-based compilation optimization includes DSL code generation and AI-based decision generation. After the DSL representation is first generated into the corresponding DSL code, each optimization strategy is obtained and continuously simulated and evaluated using the Monte Carlo tree search algorithm to identify opportunities for optimization, and the optimal optimization strategy is determined based on the search results. The decision process and scheduling strategy of the compiler can be effectively optimized by combining DSL and AI algorithms.

[0029] like Figure 2 As shown, the steps of the domain-specific language compiler optimization method based on multi-layer intermediate representation in this embodiment include: Step S1. DSL design based on MLIR: define the syntax of DSL to simplify the representation and operation in MLIR, classify the operators in MLIR, and correspond the various operators in MLIR to the keywords in DSL.

[0030] MLIR is a complex infrastructure that includes many concepts, such as different dialects, operations, type systems, conversion channels, etc. For beginners, it is a challenging task to understand and master these concepts and be able to skillfully use them to build and optimize compilers. For example, to define a new dialect, you need to have an in-depth understanding of the dialect definition rules, the specifications of operational semantics, and how to interact with other dialects. Such a steep learning curve will bring great difficulties to AI for Compiler. In addition, MLIR is used to achieve versatility and can handle multiple types of calculations and intermediate representations. However, each specific field usually has unique computing patterns, data structures, and performance bottlenecks. MLIR's general optimization strategy may not be accurate enough for AI-specific optimization needs. MLIR is difficult to meet the optimization needs of specific fields while maintaining versatility.

[0031] This embodiment performs AI-guided deep optimization for the LLVM compiler. By extending the design of the corresponding DSL based on MLIR and designing a DSL for "AI for Compiler", the shortcomings of general MLIR in AI optimization potential can be made up. The new DSL can define special syntax and semantics according to common computing patterns and data structures in the field, making programming in this field more natural and efficient. At the same time, during the compiler implementation process, special optimization strategies can be designed for these specific computing patterns to improve performance. In addition, the new JAIT-DSL can be designed to seamlessly integrate with existing tools and systems in specific fields. The DSL works better with data preprocessing tools, model training frameworks, and deployment platforms, which can improve the efficiency of the entire workflow and reduce the cost of data conversion and interface adaptation.

[0032] In order to implement DSL design based on MLIR, this embodiment first abstracts and summarizes MLIR, and then uses DSL as an intermediate language to abstract MLIR and describe the front-end program.

[0033] Specifically, this embodiment classifies operators in MLIR into arithmetic operators, logical operators, comparison operators, memory operators, function operations, control flow operators, and vector and tensor operators by analyzing the input and output of Operation and its control flow and data flow semantics, as shown in Tables 1 to 7 for details.

[0034] Table 1: Arithmetic operators

[0035] Table 2: Logical operators

[0036] Table 3: Comparison operators

[0037] Table 4: Memory Operators

[0038] Table 5: Function operators

[0039] Table 6: Control flow operators

[0040] Table 7: Vector and Tensor Operators

[0041] Then the DSL is designed, and the description of the front-end program is realized by translating MLIR into a DSL of a specified format. In DSL, a sentence completes the description of a front-end program language. The DSL code is a json format script, which mainly consists of a json dictionary list called a sentence. A sentence is a unit structure that describes an operation in a distributed computing graph. Each sentence consists of an element that represents the parameters of each operation, including keywords, variables, constants, and the next parameter.

[0042] Table 8 shows the class definition and related syntax in the DSL designed in this embodiment, where "const", "var" and "ext" in the type column represent constants, variables and execution parameters respectively, and the parameters in the last row are common parameters for all types of operations, which are helpful for debugging and can be set by manual repair. Further, MLIR can be mapped to DSL keywords as shown in Table 9 to simplify the expression of operations in MLIR.

[0043] Table 8: Class definitions and related syntax in DSL

[0044] Table 9: Correspondence between MLIR and DSL keywords

[0045] The following is part of the code generated by DSL:

[0046] This embodiment can simplify the compilation optimization process by designing the DSL according to the above method, avoid the use of lengthy function calls and complex grammatical structures in general programming languages, and is particularly suitable for rapid development and optimization in the field.

[0047] Step S2. MLIR to DSL translation: parse the target MLIR code, extract the input, output, and control flow semantics of each operation, map the operators in the MLIR code to the corresponding expressions in the DSL, and convert each optimization strategy in the target MLIR code into a DSL representation, so as to translate the target MLIR code into a DSL representation.

[0048] Operators in MLIR cover arithmetic operations, logical operations, control flow, memory operations and other levels. These operators are described in a general way in MLIR, while DSL focuses on computing patterns in specific fields, so an efficient translation mechanism is needed to complete the conversion from MLIR to DSL. The translation from MLIR to DSL is to efficiently convert the operators and structures in MLIR (multi-level intermediate representation) into the syntax of DSL (domain-specific language), so that the compilation process can better adapt to the optimization needs of specific fields.

[0049] In this embodiment, in step S2, the target MLIR code is parsed, and the operators in the MLIR code are mapped to corresponding expressions in the DSL, specifically including: Step S201: traverse the intermediate representation in the target MLIR code, parse each operator according to the operation type, and extract the input, output and control flow semantics of each operation; Step S202: During the parsing process, a mapping table is used to map operators in the target MLIR code to corresponding expressions in the DSL.

[0050] Specifically, to achieve the translation from MLIR to DSL, first, the system will traverse the intermediate representation (IR) in MLIR and gradually parse each operator according to different operation types. Each operator corresponds to a specific calculation behavior, such as arithmetic operators (such as arith.addi for integer addition), logical operators (such as arith.and for bitwise AND operations), memory operators (such as memref.load for loading data from memory), and control flow operators (such as cond_br for conditional branches). By parsing the above operators, the system can extract the input, output and control flow semantics of each operation; during the parsing process, the system will also use a mapping table to map the operators of MLIR to equivalent expressions in DSL. For example, the arith.addi operation in MLIR will be translated into the addi operation in DSL, and the memref.load operation will be translated into the load statement in DSL.

[0051] It should be noted that the conversion process from MLIR to DSL is not limited to the replacement of syntax. The semantics of operations can also be simplified or adjusted according to domain-specific requirements, making the expressions in DSL closer to computing scenarios in specific domains.

[0052] In order to improve the efficiency of translation and the readability of code, specific syntax optimization rules can be further designed. For example, some complex MLIR operations can be replaced by a concise expression in DSL, which makes DSL code more intuitive and easy to read. In addition, the translation process can also be configured to support dynamic semantic adjustment. According to different compilation contexts and optimization requirements, the syntax in DSL can be adaptively adjusted to match different hardware platforms or computing environments. This flexibility enables DSL to not only accurately express the logic in MLIR, but also make corresponding optimizations based on domain requirements.

[0053] In this embodiment, converting each optimization strategy in the target MLIR code into a DSL representation includes converting loop unrolling, function inline optimization, vectorization optimization, and constant folding in the target MLIR code into a DSL representation, as detailed as follows: (1) DSL representation of loop unrolling Loop unrolling optimization is a common compiler optimization technique that reduces loop control overhead and improves program execution efficiency by copying the loop body multiple times. Loop unrolling is suitable for scenarios where the loop body overhead is low and the loop control overhead is high, such as small-scale loops or high-frequency loops. The unrolled loop can better utilize pipeline technology, thereby improving the execution efficiency of modern processors. In MLIR, loop unrolling is implemented through the affine loop structure. During the optimization phase, the compiler analyzes the number of loop iterations and the complexity of the loop body to decide how to unroll the loop body. The process of converting the loop unrolling code in this embodiment includes simplifying the operations therein according to the DSL syntax, removing the type declarations in the MLIR code, and mapping the operators in the MLIR code to the corresponding expressions of the DSL.

[0054] The following is an example of MLIR loop unrolling code converted to DSL representation, where N is the number of loop iterations.

[0055] The MLIR loop unrolling code is:

[0056] The above MLIR loop unrolling code is converted to DSL as follows:

[0057] The above example is mainly used to describe a basic loop structure, in which each iteration performs memory loading, arithmetic operations, and result storage operations. In the MLIR code, affine.for is used to represent a loop structure, and the index variable %i starts from 0 and steps 1 until it reaches the upper limit %N. In each loop iteration, the program loads a floating-point value %a from the position %A[%i] of the memory array %A, and then adds this value to another floating-point number %c, and the result is stored in the memory location %B[%i]. Here, memref.load is used to load data from memory, arith.addf represents the floating-point addition operation, and memref.store writes the result back to memory. In the converted DSL representation, the logic of the entire operation remains unchanged, and it is still a process of performing memory loading, addition, and storage in a loop, but the expression is simplified. The loop structure of DSL is still represented by for, but the type declaration and complex operator representation in MLIR are removed. For example, arith.addf is simplified to addf in DSL, and the syntax of memref.load and memref.store is also simplified to direct load and store operations. As can be seen from the above, through simplification, DSL provides a clearer and more concise way of expression, making it possible to more intuitively understand the calculation logic of the code without having to deeply understand the complex syntax of MLIR.

[0058] (2) DSL representation of function inlining Function inlining optimization is an optimization technique that eliminates function call overhead by replacing function calls with function body code. In particular, for small functions or frequently called functions, inlining can reduce stack operations and function call jumps, thereby improving program execution efficiency. MLIR defines functions through the "func" operation and uses the "call" operation when calling. MLIR's optimization pass can automatically inline functions when appropriate. The compiler analyzes the size and calling frequency of each function during the optimization phase and automatically determines whether inlining is required. This method is suitable for applications where function calls are frequent and the overhead is high. The process of converting the function inline optimization code in this embodiment includes mapping operators in the MLIR code to corresponding expressions of DSL, simplifying parameter and return type declarations according to DSL syntax, removing redundant type information and symbolic variable representations, etc.

[0059] The following is an example of a simple function inlining optimized code converted to DSL representation.

[0060] The function inline optimization code is:

[0061] The function inline optimization code is converted into DSL as follows:

[0062] The above example shows how to define and call a function in a program. The MLIR code uses the func keyword to define a function named add, which receives two floating-point parameters %a and %b and returns their addition. The function performs floating-point addition operations through arith.addf and stores the result in %result. Finally, the result is returned to the caller through return. In the subsequent code, the add function is called using the call statement, passing two parameters %5 and %10, and the returned value is stored in %result. After conversion to DSL, this code is greatly simplified while retaining its core calculation logic. In DSL, function definitions are represented by func, and the declaration of parameters and return types is more concise. The floating-point addition operation addf is still retained, but the redundant type information and symbolic variable representation are removed. The function call add(5, 10) in DSL simplifies the call syntax in MLIR, making the call operation look more natural, similar to the function call method in traditional programming languages. From the above, we can see that the above simplification method not only makes the code easier to read and understand, but also highlights the characteristics of function inlining, that is, the calling and definition of functions in DSL are more intuitive and clear.

[0063] (3) DSL representation of vectorized optimization Vectorization optimization is an optimization strategy that speeds up calculations by using SIMD (single instruction, multiple data) instructions to process data in parallel. Vectorization allows multiple data to be processed in one instruction operation, which can significantly improve performance in applications that require large amounts of data processing (such as matrix calculations, image processing, etc.). MLIR supports vectorized operations through the "vector" type. You can use "vector.load`" and "vector.store`" to define vector operations in memory. The compiler will automatically optimize them to SIMD instructions based on the type of data and the mode of operation. MLIR's "vector" operation provides powerful parallel computing capabilities and can be automatically converted through vectorized optimization passes.

[0064] In the process of converting the vectorized optimized code in this embodiment, the operators in the MLIR code are mapped to the corresponding expressions of the DSL, the array name and index are directly passed in as parameters in the vector loading operation, and the parameters in the vector addition operation are the loaded vector variables.

[0065] The following is an example of a simple vectorized optimized code converted to DSL representation.

[0066] The vectorized optimized code is:

[0067] The vectorized optimized code is converted into DSL as follows:

[0068] The above example shows how to improve the execution efficiency of the program through vectorized operations. In the MLIR code, vector.load is used to load floating-point vectors from arrays %A and %B. These two operations load data into vector variables %a and %b respectively. Then, vector addition operation is performed through arith.addf to add the loaded vectors to obtain the result vector %c. Finally, vector.store is used to store the result vector %c into array %C to ensure that the calculation result is retained. After conversion to DSL, this code is simplified while retaining the core calculation logic. The vector loading operation in DSL is represented by vector.load, but its syntax becomes more intuitive, directly passing the array name and index as parameters, thus simplifying the lengthy representation in MLIR. The vector addition operation addf is still retained, and its parameter is the loaded vector variable, forming a natural addition expression. Finally, the storage operation is expressed by store_vector, which further enhances the readability of the code and makes the entire vectorized calculation process clearer.

[0069] (4) DSL representation of constant folding Constant folding is a compile-time optimization technique that aims to calculate constant results in expressions in advance during compilation to avoid repeating the same calculations at runtime. In this way, the compiler can reduce the computational burden at runtime and generate more concise and efficient code. Constant folding is usually applicable to expressions containing constant operands, such as arithmetic operations and logical operations. MLIR represents constant values ​​through constant operators (such as arith.constant). The compiler's optimization pass automatically performs constant folding to identify and calculate the results of expressions containing constants. During constant folding, the calculation result is replaced with a specific constant value to avoid unnecessary runtime calculations.

[0070] The conversion process of the constant folding code in this embodiment includes mapping operators in the MLIR code to corresponding expressions of the DSL, directly declaring constants through corresponding keywords, and removing redundant syntax elements.

[0071] The following is an example of a simple constant folding code converted to a DSL representation.

[0072] The constant folding code is:

[0073] The constant folding code is converted to DSL as follows:

[0074] The above example shows how to use constant folding technology to improve the efficiency of the program during compilation. In the MLIR code, two constants %a and %b are defined using the arith.constant keyword, and are assigned values ​​of 10 and 20 respectively. These constants are then used to perform addition operations, and the results are stored in %result. Since the addition operation involves constants, the compiler can directly calculate the result of 30 during the compilation phase without having to perform the addition operation at runtime. After conversion to DSL, the expression of the code is simplified. In DSL, constants are directly declared using the const keyword, which clearly indicates the value of the variable. Then, addf(a, b) is used to perform the addition operation to obtain the final result. Compared with the complex operators and type declarations in MLIR, DSL is more intuitive, removes redundant syntax elements, and makes the intent of the code clearer.

[0075] Step S3. AI-based compilation optimization: Generate DSL code based on the translated DSL representation, obtain different optimization strategies respectively, and use the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the optimal optimization strategy. During the search process, a search tree is used to represent different optimization states, and each node represents an optimization decision. By expanding each child node, the search tree continues to grow until the optimal optimization strategy is obtained, thereby achieving compiler optimization.

[0076] The traditional MLIR compilation process mainly relies on general intermediate representation and heuristic optimization strategies. Although it has certain flexibility, its generality brings redundancy and inefficiency when facing complex computing scenarios or specific fields. In addition, due to the complexity of its multi-level representation and general optimization rules, the compilation time is often long, and the generated code may not have optimal performance in all scenarios. In this embodiment, a concise DSL representation is first obtained by translating MLIR to DSL in step S2. Based on these DSL expressions, an efficient and clear operation basis can be provided for AI optimization, so that the unique computing modes and operations in the field can be captured. By combining DSL with AI optimization algorithms, the compilation process can be intelligently optimized to generate highly optimized target code, and different optimization requirements can be flexibly responded to.

[0077] Different from the traditional MLIR compilation optimization work, this embodiment defines a set of DSLs for AI optimization, takes the Sentences in the DSL as the operation objects, and uses these Sentences as the optimization units to complete the corresponding compilation optimization process. Figure 3 As shown, the compilation process of this embodiment based on DSL is as follows Figure 4 As shown in the figure, it can be seen that the compilation process based on DSL in this embodiment can be greatly simplified, reducing the additional Dialect generation process, thereby accelerating the compilation process.

[0078] like Figure 5 As shown, the AI-based code optimization process of this embodiment includes two parts: DSL code generation and AI decision support, to achieve efficient code execution. The DSL code generation module generates more compact and efficient machine code through the domain-specific language (DSL). At the same time, the AI ​​decision support module uses the Monte Carlo tree search algorithm to optimize the various functions of the compiler. Monte Carlo tree search is an algorithm used to search for the optimal strategy in the decision-making process. In this embodiment, the AI ​​decision support module continuously simulates and evaluates different optimization strategies to find the optimal solution.

[0079] In this embodiment, the steps of using the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the best optimization strategy include: Step S301. Construct a search tree: The root node of the search tree represents the state of the original program, that is, the code without any optimization operation, and each child node represents a specific optimization decision state.

[0080] Specifically, in this embodiment, the search tree is used to represent different optimization states in various scenarios of loop expansion, function inlining, vectorization, and constant folding. Therefore, in the process of constructing the search tree, if it is loop expansion, the node represents a certain loop expansion number K; if it is function inlining, the node represents the state of inlining a certain function to the call point; if it is vectorization, the node represents the vectorization operation on a certain data segment, that is, each node represents the application state of a vectorization operation (such as vectorizing a certain loop body or data set), and the child nodes of the node represent the vectorization operations on different data blocks or different dimensions; if it is constant folding, the node represents the state after the constant folding operation in a certain expression. By expanding each child node, the search tree continues to grow and explore different optimization combinations. The goal of the loop expansion optimization strategy search is the optimal loop expansion number, the goal of the function inlining optimization strategy search is the best function inlining selection, the goal of the vectorization optimization strategy search is the most effective vectorization solution, and the goal of the constant folding optimization strategy search is the most reasonable constant folding combination.

[0081] Step S302. Selection: traverse the search tree starting from the root node, selecting a child node that meets the preset requirements each time for traversal until reaching a node that is not fully expanded.

[0082] The selection strategy is a crucial step, which determines which node in the current tree should be expanded from. We can adopt the following two selection strategies to ensure that the optimal node can be selected first.

[0083] In this embodiment, the following two selection strategies can be used to ensure that the optimal node can be selected first: (1) Using the UCB (Upper Confidence Bound) algorithm The classic UCB selection strategy balances exploration and exploitation. Each time a selection is made, it takes into account the average performance estimate of the current node (utilization) and gives some opportunities to nodes with fewer visits (exploration). By calculating the UCB formula: ,in At the current node The average performance estimate is Is a node The number of visits, is the number of visits to its parent node, Represents the UCB value of the i-th node, and selects the child node with the highest UCB value for traversal.

[0084] (2) Combining the UCB algorithm with the policy network algorithm Specifically, the selection score can be obtained by combining the UCB and the strategy network score. , select the one with the highest selection score The policy network can learn the best decision from a large number of optimization examples, thus accelerating the search process.

[0085] Select Score The specific calculation can be obtained according to the following formula:

[0086]

[0087] in, and are the weights of UCB and policy network scores, represents the policy network score, represents the UCB value of the i-th node, is the average performance estimate at the ith node, is the number of visits to the ith node, is the number of visits to its parent node.

[0088] It is understandable that in addition to adopting the above-mentioned selection strategies, other types of selection strategies can also be adopted according to actual needs. For example, the policy network can be directly used to score the status of each node. The higher the score of the node, the more likely its corresponding optimization strategy is to bring performance improvement. The policy network in AlphaGo can also be used for reference to make selections. By training a neural network, the optimal decision for the next step can be predicted based on the current optimization status of the program and historical data.

[0089] Step S303. Expansion: creating a new child node for the node that is not fully expanded currently to perform node expansion.

[0090] Once a node that is not fully expanded is selected, a new child node will be created to represent further optimization operations. Specifically, for loop expansion, node expansion will expand a loop K times; for function inlining, node expansion will inline a frequently called small function; for vectorization, node expansion will vectorize a data block; for constant folding, node expansion will calculate constants in expressions in advance and fold them. When a new node is expanded, the possibility of each optimization operation can also be considered, such as the range of the number of expansions, the selection of inline functions, etc.

[0091] Step S304. Simulation: Simulate the effect of the optimization strategy corresponding to the newly expanded child node.

[0092] When the new node is expanded, the effect of the optimization strategy corresponding to the node is simulated. This step simulates the performance of the program after applying the remaining optimization strategies from the current state.

[0093] Specifically, simulation can be done in the following two ways: Random simulation: Based on randomly selected optimization strategies, a set of random optimization decisions are made to estimate the performance improvement that these decisions may bring. This method is suitable for rapid evaluation. 2. Heuristic simulation: Based on experience or heuristic rules, optimization strategies that are more likely to bring improvement are given priority. For example, when inlining functions, smaller and frequently called functions are given priority, or simple constant expressions are given priority to folding. The results of the simulation can be performance indicators such as program execution time, memory usage, and code size.

[0094] Step S305 feedback: The performance evaluation results obtained by simulation are fed back along the path from the root node to the current node, and the number of visits and performance estimates of each node on the path are updated. If the simulation result of the current node meets the preset requirements, the performance evaluation results of the node and its ancestor nodes corresponding to the current optimization strategy are improved during the feedback process to increase the probability of the current node and its ancestor nodes being selected in the future.

[0095] Specifically, after the simulation is finished, the performance evaluation result of the node is propagated back along the path from the root node to the node, and the number of visits and performance estimates of all the passed nodes are updated. If a strategy performs well, the average performance estimate of its ancestor nodes will increase, and these nodes will have a higher probability of being selected in future selection steps. The propagation process ensures that the performance estimate of each node reflects the latest simulation results, prompting more exploration of high-performance strategies in the search tree.

[0096] Step S306. Loop search and optimal strategy determination: Loop through steps S302 to S305 to continuously explore the loop expansion strategy space through repeated selection, expansion, simulation and feedback steps, so that the search tree continues to grow and optimize, until the iteration meets the preset requirements, and then select the optimization strategy corresponding to the node with the best performance as the optimal optimization strategy.

[0097] By executing the selection, expansion, simulation, and return steps multiple times, the optimization space can be gradually explored, so that the search tree continues to grow and improve. After each round of search, the node with the highest average performance estimate in the tree represents the optimal optimization strategy. For example, the optimal number of loop unrolling, the best function inlining selection, the most effective vectorization scheme, or the most reasonable constant folding combination. Ultimately, these optimization strategies will be applied to the entire program to generate optimized code, which can greatly improve its execution efficiency.

[0098] Taking the loop unrolling partial search algorithm to solve the optimal loop unrolling times K as an example, the above solution process is specifically as follows: a) Construct a search tree: Each node in the search tree is represented as a loop expansion state with a loop count of k; the root node represents the initial loop unexpanded state.

[0099] b) Selection: Starting from the root node, select the score according to the UCB formula or To select nodes traverse the tree until you reach a node that is not fully expanded.

[0100] c) Expansion: Once a node that is not fully expanded is selected, a new child node is created accordingly.

[0101] d) Expansion: Starting from the newly expanded node, a random simulation is performed, that is, the loop is continued to be expanded according to a random or simple heuristic loop expansion strategy until the maximum number of expansions is reached. During the simulation, the performance of this random expansion strategy is evaluated and the execution time of the current expansion strategy is measured.

[0102] e) Feedback: The performance evaluation results obtained by simulation are fed back along the search path to update the number of visits and performance estimates of each node on the path. If the simulation results show that a certain loop unrolling strategy performs well, then during the feedback process, the performance estimate values ​​of the nodes corresponding to the strategy and their ancestor nodes are increased to make these nodes more likely to be selected in subsequent selection steps.

[0103] This embodiment can be further integrated into a deep learning framework for user convenience. Users can use the provided tuning function in the deep learning framework to directly optimize the model without manually writing tuning code.

[0104] This embodiment can be applied to various fields, such as software development, healthcare, automobile manufacturing, etc. Some typical DSLs include the Raven framework, the QuantLib library, the FHIR standard, etc. Taking the Raven framework as an example, the DSL-based design can enable software developers to focus more on the implementation of business logic rather than being trapped in tedious configuration details. For example, in the healthcare field, DSL can be used to achieve seamless connection between different medical information systems, greatly improving the efficiency and security of data sharing. In the automobile manufacturing field, the automation process on the production line can be optimized by designing DSL.

[0105] The present invention is based on DSL, and DSL can be used in the context of MLIR to define and optimize specific types of calculations. DSL makes up for the limitations of MLIR in specific fields, provides more sophisticated and specialized abstractions for specific computing modes and problems, and can more easily generate high-performance, highly optimized code. Thus, the compiler provides a more efficient and professional way to handle specific types of computing tasks, simplify programming in specific fields, improve the readability and maintainability of the code, achieve performance optimization, and improve the flexibility of applicability. It is particularly suitable for application scenarios with high performance requirements and obvious domain characteristics.

[0106] This embodiment further provides a compiler system, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.

[0107] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.

[0108] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.

[0109] Those skilled in the art should understand that the above-mentioned embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for optimizing a domain-specific language compiler based on a multi-layer intermediate representation, characterized in that the steps include: Step S1. DSL design based on MLIR: define the syntax of DSL to simplify the representation and operation in MLIR, classify the operators in MLIR, and correspond the operators in MLIR to the keywords in DSL; Step S2. MLIR to DSL translation: parse the target MLIR code, extract the input, output and control flow semantics of each operation, map the operators in the MLIR code to the corresponding expressions in the DSL, and convert each optimization strategy in the target MLIR code to the DSL representation, so as to translate the target MLIR code into the DSL representation; Step S3. AI-based compilation optimization: Generate DSL code based on the translated DSL representation, obtain different optimization strategies respectively, and use the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the optimal optimization strategy. During the search process, a search tree is used to represent different optimization states, and each node represents an optimization decision. By expanding each child node, the search tree continues to grow until the optimal optimization strategy is obtained, thereby achieving compiler optimization.

2. The domain-specific language compiler optimization method based on multi-layer intermediate representation according to claim 1, characterized in that: In step S1, operators in MLIR are classified into arithmetic operators, logical operators, comparison operators, memory operators, function operations, control flow operators, and vector and tensor operators.

3. The domain-specific language compiler optimization method based on multi-layer intermediate representation according to claim 1, characterized in that: In step S1, the syntax of DSL is defined, and the defined types include def_func, def_mod, call, comm, log, and profile, which correspond to defining functions, defining models, calculations, communications, printing logs, and tracking running information, respectively, and const, var, and ext are used as prefixes to represent constants, variables, and execution parameters, respectively.

4. The domain-specific language compiler optimization method based on multi-layer intermediate representation according to claim 1, characterized in that: The step S2 of parsing the target MLIR code and mapping the operators in the MLIR code to corresponding expressions in the DSL includes: Step S201: traverse the intermediate representation in the target MLIR code, parse each operator according to the operation type, and extract the input, output and control flow semantics of each operation; Step S202: During the parsing process, a mapping table is used to map operators in the target MLIR code to corresponding expressions in the DSL.

5. The domain-specific language compiler optimization method based on multi-layer intermediate representation according to claim 1, characterized in that: The step S2 converts each optimization strategy in the target MLIR code into a DSL representation, including converting loop unrolling, function inline optimization, vectorization optimization and constant folding in the target MLIR code into a DSL representation, wherein the process of converting the loop unrolling code includes simplifying the operations therein according to the DSL syntax, removing the type declaration in the MLIR code, and mapping the operators in the MLIR code to the corresponding expressions of the DSL; the process of converting the function inline optimization code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, simplifying the declaration of parameters and return types according to the DSL syntax, removing redundant type information and symbolic variable representations; the process of converting the vectorization optimization code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, directly passing the array name and index as parameters in the vector loading operation, and the parameters in the vector addition operation are the loaded vector variables; the process of converting the constant folding code includes mapping the operators in the MLIR code to the corresponding expressions of the DSL, directly declaring constants through corresponding keywords, and removing redundant syntax elements.

6. The method for optimizing a domain-specific language compiler based on a multi-layer intermediate representation according to any one of claims 1 to 5, characterized in that: In step S3, the steps of using the Monte Carlo tree search algorithm to continuously simulate and evaluate the performance of different optimization strategies to find the optimal optimization strategy include: Step S301. Build a search tree: The root node of the search tree represents the state of the original program, that is, the code without any optimization operation, and each child node represents a specific optimization decision state; Step S302. Selection: traverse the search tree starting from the root node, selecting child nodes that meet the preset requirements each time for traversal until reaching a node that is not fully expanded; Step S303. Expansion: creating a new child node for the currently incompletely expanded node to perform node expansion; Step S304. Simulation: Simulate the effect of the optimization strategy corresponding to the newly expanded child node; Step S305: Feedback: The performance evaluation results obtained by simulation are fed back along the path from the root node to the current node, and the number of visits and performance estimates of each node on the path are updated. If the simulation result of the current node meets the preset requirements, the performance evaluation results of the node corresponding to the current optimization strategy and its ancestor nodes are improved during the feedback process, so as to increase the probability of the current node and its ancestor nodes being selected in the future. Step S306. Loop search and optimal strategy determination: Loop through steps S302 to S305 to continuously explore the loop expansion strategy space through repeated selection, expansion, simulation and feedback steps, so that the search tree continues to grow and optimize, until the iteration meets the preset requirements, and then select the optimization strategy corresponding to the node with the best performance as the optimal optimization strategy.

7. The domain-specific language compiler optimization method based on multi-layer intermediate representation according to claim 6, characterized in that: When the loop unrolling optimization strategy is used, the node in step S301 represents the number of loop unrolling times, and the node expansion in step S303 will expand the loop K times, and the target after multiple iterative searches is the optimal number of loop unrolling times; when the function inline optimization strategy is used, the node in step S301 represents the state of inlining the function to the call point, and the frequently called small functions will be inlined during the node expansion in step S303, and the target after multiple iterative searches is the best function inline selection; when the vectorization optimization strategy is used, the node in step S301 represents the vectorization operation on the data segment, and the data block is vectorized during the node expansion in step S303, and the target after multiple iterative searches is the most effective vectorization solution; when the constant folding optimization strategy is used, the node in step S301 represents the state of constant folding in the expression, and the node expansion in step S303 will calculate the constants in the expression in advance and fold them, and the target after multiple iterative searches is the most reasonable constant folding combination.

8. The method for optimizing a domain-specific language compiler based on a multi-layer intermediate representation according to claim 6, characterized in that: In step S302, the child node with the highest UCB value is selected for traversal, or the selection score is calculated by combining the UCB algorithm and the strategy network score according to the following formula: , select the one with the highest selection score Traverse the child nodes of in, and are the weights of UCB and policy network scores, represents the policy network score, represents the UCB value of the i-th node, is the average + performance estimate at the ith node, is the number of visits to the ith node, is the number of visits to its parent node.

9. A compiler system, comprising a processor and a memory, wherein the memory is used to store a computer program, characterized in that: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Code compiling method and device

    CN110147236A

  • Probability model AI field compiling system and method based on multistage intermediate representation

    CN116679933A

  • Triton compiler assembly line-oriented optimization system and optimization method

    CN118605850A

  • Compiling method of multilayer intermediate representation based on field programmable logic gate array

    CN118689486A

  • Distributed machine learning compiler optimization

    US20240177048A1

Cited By

  • Pass assembly line automatic generation method based on multistage intermediate representation and knowledge base

    CN119918507A

  • Compiler performance optimization method

    CN120491975A

  • A compiler performance optimization method

    CN120491975B

  • Program module sharing method and device, electronic equipment and medium

    CN120610715A

  • Network asset detection method, device and equipment and storage medium

    CN121396855A