CN117311728A - OpenCL automatic translation method - Google Patents

OpenCL automatic translation method Download PDF

Info

Publication number
CN117311728A
CN117311728A CN202311255553.7A CN202311255553A CN117311728A CN 117311728 A CN117311728 A CN 117311728A CN 202311255553 A CN202311255553 A CN 202311255553A CN 117311728 A CN117311728 A CN 117311728A
Authority
CN
China
Prior art keywords
scop
file
source code
opencl
code file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311255553.7A
Other languages
Chinese (zh)
Inventor
周康乐
赵漫菲
瞿秋薏
籍雁翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN202311255553.7A priority Critical patent/CN117311728A/en
Publication of CN117311728A publication Critical patent/CN117311728A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to an OpenCL automatic translation method, and belongs to the field of code translation. The invention compiles a C or C++ source code file into an LLVM IR file, detects a static control block SCOP of the IR file by LLVMpoly, maps the SCOP in the IR file to the upper and lower line number positions of the SCOP in the source code file, inserts an instruction and then sends the instruction to the PPCG for OpenCL conversion. According to the method, the SCOP position of the code region capable of carrying out polyhedral modeling in the C or C++ source code file is automatically identified, and the problems that expert knowledge is needed for manually identifying SCOP in the source code file and the efficiency is low are solved; all C or C++ source code files in engineering can be automatically scanned, files conforming to polyhedral modeling are converted into OpenCL host end and equipment end source code files in batches, and the translation efficiency is greatly improved.

Description

OpenCL automatic translation method
Technical Field
The invention belongs to the field of code translation, and particularly relates to an OpenCL automatic translation method.
Background
The automatic compiling tool realizes automatic conversion from the serial program to the equivalent parallel program by detecting potential parallelism contained in the serial program. The polyhedron model compiling technology makes many breakthroughs in the code generation technology oriented to heterogeneous systems by means of strong cyclic transformation and optimization capability.
At present, two paths for performing polyhedral compiling exist, one path is to perform abstract analysis on an intermediate language and perform polyhedral modeling, the generated parallelization code is an executable file, such as a poliy item of an LLVM, the LLVM is a framework system of a framework compiler and is written in C++, the poliy is a polyhedral compiling framework oriented to LLVM intermediate language IR, and an OpenMP code executable file oriented to a CPU and a CUDA code executable file oriented to a GPU can be generated. The other is to do polyhedral abstract analysis on the source code, and the generated parallelization code is also the source code. For example, the polyhedron compiling tool PPCG (Polyhedralparallel code generation) may support a user to manually insert compiling instructions into the static control block SCOP (Static Control Parts) in the C or c++ source code, representing that this part of code may be polyhedron modeled, and then polyhedron model the instruction-inserted SCOP with the third-party library polyhedron extraction tool pet (Polyheral ExtractionTool), further generating CUDA or OpenCL source code for GPU platform.
The problem with translating C or C++ source code to OpenCL source code is that (1) in SCOP detection, the current tools mainly support manual insertion instruction extraction for source code. Tools for extracting polyhedrons in the source codes comprise pet and clan, and the automatic extraction of SCOP in the source codes exceeds the analysis capability of the tools; the automatic detection of SCOP can be better realized by the Poly of LLVM based on the framework of intermediate language representation, but the SCOP detection and a series of analysis of Poly are all carried out on the intermediate language IR, and the generated CUDA code is also a binary executable file, so that further code optimization and expansion are inconvenient. Therefore, there is currently no technology for automatically extracting SCOP from C or C++ source code. (2) In the heterogeneous system oriented polyhedron compiling technology, a technology for automatically scanning a polyhedron modeling area from a large number of engineering source code files to perform OpenCL source code conversion is lacking.
Disclosure of Invention
First, the technical problem to be solved
The technical problem to be solved by the invention is how to provide an OpenCL automatic translation method to solve the problems that the existing technology for converting C or C++ source code into OpenCL source code is low in automation degree and does not support batch conversion.
(II) technical scheme
In order to solve the above technical problems, the present invention provides an OpenCL automatic translation method, which includes the following steps:
s1, traversing each C or C++ source code file in engineering by using an automation script, compiling the C or C++ source code file into an LLVM IR file by using a clang compiler of the LLVM, and transmitting a compiling instruction into all non-standard library header file catalogues referenced by-g parameters and engineering source codes; normalizing the IR file by using an opt tool of the LLVM to enter a poll-Canonicalize parameter;
s2, traversing all IR files, detecting each IR file by using a detection function of LLVMpoly, traversing according to the function, detecting all static control blocks SCOP, and storing the mapping from the C or C++ source code file name to the corresponding IR file name and the mapping from the IR file name to all SCOP contained in the IR file;
s3, traversing all the C or C++ source code file names, finding SCOP of the corresponding IR file according to the mapping in the step S2, traversing the SCOP, and mapping the SCOP in the IR file to the upper line number and the lower line number of the SCOP of the C or C++ source code file corresponding to the IR file;
s4, traversing SCOP in the C or C++ source code file, and inserting instructions at the SCOP uplink and downlink numbers to be translated; the inserting instruction inserts the effective rule of the instruction according to pet, the upstream number refers to the blank of the upper line of the SCOP upper limit line number, and the downstream number refers to the blank of the lower line of the SCOP lower limit line number; the source code file of the inserted instruction is sent to a PPCG process for conversion, and an OpenCL host end and a device end source code file are generated; all non-standard library header file directories referenced by engineering source codes are added to the class compiling instance in the foreach_crop_in_c_source function of the third party library pet referenced by the PPCG process.
The invention also provides an OpenCL automatic translation tool, which comprises: a service layer, an application layer and a display layer;
the service layer comprises a preprocessing script service, an SCOP detection process service, an AST line number calculation service and a PPCG OpenCL conversion process service;
the preprocessing script service is that using Python script to traverse all C or C++ source files in engineering, using the clang compiler of LLVM to convert the source files into LLVM IR intermediate files; taking the IR intermediate file as a ll file;
SCOP detection process service: the SCOP detection process service calls a detection function of poly to carry out SCOP detection on the imported normalized ll file, and transmits SCOP related information out, and the SCOP detection process service comprises the following steps: mapping the source file name of the SCOP to the ll file name, all SCOP included in the ll file, and all uplink numbers of all loops included in the SCOP in the source file;
AST line number calculation service: the method comprises the steps of calculating a circulation ending line number service according to a circulation starting line number, converting source codes into abstract syntax trees AST through syntax and semantic analysis of source codes, matching all circulation nodes of a source code file where an SCOP is located by using a class_matches matching algorithm of the class, wherein the circulation nodes comprise a for circulation and a while circulation, acquiring the starting line numbers of all the circulation nodes by using a FullSourceLoc class of LLVM, matching the starting line numbers to circulation nodes corresponding to the starting line numbers according to the starting line number of the last circulation of the SCOP, and acquiring the ending line numbers of the circulation nodes by using a presumedLoc class of the LLVM, namely the lower line number of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the clang ast is required to be transmitted into all non-standard library head file catalogues, C and C++ standard library head file catalogues which are referenced by engineering source codes;
PPCG OpenCL translation Process service: transmitting source code files inserted with SCOP instructions, transmitting files of a host end and equipment end of OpenCL, and adding all head file catalogs for engineering reference into a clang compiling instance in source codes of a third party library pet referenced by PPCG;
application layer: the method comprises a preprocessing application, an SCOP detection application and an OpenCL conversion application;
the preprocessing application is used for packaging a preprocessing python script service and providing a C++ preprocessing interface for a display layer;
SCOP detection application: acquiring all SCOP of the C or C++ source code file and cycle start line number information included in the SCOP through an SCOP detection process service, acquiring cycle end line number information through an AST line number calculation service, and calculating the upper line number and the lower line number of all SCOP in the source code file through a process that SCOP in IR is mapped to the SCOP position in the C or C++ source code file; the SCOP detection application provides a detection interface for the display layer;
the OpenCL conversion application is provided for batch conversion and a single conversion interface of a display layer, wherein the batch conversion is to insert an instruction at the position of the uplink and downlink numbers of SCOP in each source code file, insert #pragma chop at the blank position of the upper line of SCOP, and insert #pragma end SCOP at the blank position of the lower line of SCOP; the method is concretely realized as follows: scanning a source code file, writing the source code file into a new file with the same name line by line, when the new file is matched with an upper line number of an SCOP, writing a line of the SCOP source code into the written file line by line, writing a line of the SCOP source code into a line of the written file by line, traversing the line by line to the end of the source code file according to the method, and obtaining the new source code file which is the C or C++ source code file after an instruction is inserted; when traversing the SCOP in the source code file, the single conversion is provided for the interface of the display layer, the source code of the SCOP is transmitted to the display layer for display, a user confirms whether to convert the SCOP, and after traversing the SCOP, the OpenCL conversion application confirms the uplink and downlink insertion instructions of the converted SCOP for all the users; traversing source files of all inserted instructions, and performing batch translation by using PPCG OpenCL conversion progress service;
display layer: the display layer comprises a catalog configuration interface, a preprocessing interface, a detection interface and an OpenCL conversion interface. The display layer performs display and user interaction with an interface provided by the application layer.
(III) beneficial effects
The invention provides an OpenCL automatic translation method, which automatically identifies the SCOP position of a code region capable of carrying out polyhedral modeling in a C or C++ source code file, and solves the problems that expert knowledge is required for manually carrying out SCOP identification in the source code file and the efficiency is low; all C or C++ source code files in engineering can be automatically scanned, files conforming to polyhedral modeling are converted into OpenCL host end and equipment end source code files in batches, and the translation efficiency is greatly improved. The system can support the installation-free PPCG and LLVM when used in a new similar environment, and saves a great amount of time.
Drawings
FIG. 1 is a flowchart of an OpenCL automatic translation method according to the present invention;
FIG. 2 is an example of a software architecture diagram of an OpenCL automatic translation method
FIG. 3 is an example of an OpenCL automatic translation tool directory configuration interface diagram
FIG. 4 is an example of a preprocessing interface diagram for an OpenCL automated translation tool
FIG. 5 is an example of an OpenCL automatic translation tool detection interface diagram
Fig. 6 is an example of an OpenCL conversion interface diagram of the OpenCL automatic translation tool.
Detailed Description
To make the objects, contents and advantages of the present invention more apparent, the following detailed description of the present invention will be given with reference to the accompanying drawings and examples.
The invention relates to a 0penCL automatic translation method, which belongs to the field of code translation, and can be operated on a general computer platform, and comprises the following steps: c or C++ source code files are compiled into LLVM IR files, static control blocks SCOP of the IR files are detected by LLVMpoly, SCOP in the IR files are mapped to upper and lower line number positions of the SCOP in the source code files, and instructions are inserted and then sent to the PPCG for OpenCL conversion. According to the method, the SCOP position of the code region capable of carrying out polyhedral modeling in the C or C++ source code file is automatically identified, and the problems that expert knowledge is needed for manually identifying SCOP in the source code file and the efficiency is low are solved; all C or C++ source code files in engineering can be automatically scanned, files conforming to polyhedral modeling are converted into OpenCL host end and equipment end source code files in batches, and the translation efficiency is greatly improved.
In order to solve the above technical problems, the present invention provides an OpenCL automatic translation method, which includes the following overall steps:
s1, traversing each C or C++ source code file in engineering by using an automation script, compiling the C or C++ source code file into an LLVM IR file by using a clang compiler of the LLVM, and transmitting a compiling instruction into all non-standard library header file catalogues referenced by-g parameters and engineering source codes; the IR file was normalized with the LLVM opt tool into the-poly-Canonicalize parameter.
S2, traversing all IR files, detecting each IR file by using a detection function of LLVMpoly, traversing according to the function, detecting all static control blocks SCOP, and storing the mapping from the C or C++ source code file name to the corresponding IR file name and the mapping from the IR file name to all SCOP contained in the IR file.
S3, traversing all the C or C++ source code file names, finding SCOP of the corresponding IR file according to the mapping in the step S2, traversing the SCOP, and mapping the SCOP in the IR file to the upper line number and the lower line number of the SCOP of the C or C++ source code file corresponding to the IR file.
S4, traversing SCOP in the C or C++ source code file, and inserting instructions at the SCOP uplink and downlink numbers to be translated. The inserting instruction inserts the effective rule of the instruction according to pet, the uplink number is the upper line blank of the SCOP upper limit line number, the downlink number is the lower line blank of the SCOP lower limit line number, the annotating line can be arranged between the upper limit line number and the uplink number, and the annotating line can also be arranged between the lower limit line number and the downlink number. And sending the source code file of the inserted instruction into a PPCG process for conversion to generate source code files of the OpenCL host side and the equipment side. All non-standard library header file directories referenced by engineering source codes are added to the class compiling instance in the foreach_crop_in_c_source function of the third party library pet referenced by the PPCG process.
Further, in the overall step S3 of the OpenCL automatic translation method, a specific flow of calculating an upper bound line number and a lower bound line number of a specific SCOP in an IR file mapped to a C or c++ source code file SCOP is as follows:
s31, extracting an SCOP basic block range in the IR file: all basic blocks in the region where the SCOP is located are saved.
S32, traversing the loops of the functions of the SCOP in the IR file, judging whether the SCOP comprises the loops according to whether the basic blocks contained in the loops are the subset of the basic blocks contained in the SCOP, and storing all the loops contained in the SCOP.
S33, acquiring the starting line numbers of all loops included in SCOP in the IR file in the C or C++ source code file by using the location information class DebugLoc of the LLVM.
S34, calculating an SCOP uplink number in the source code file: and (3) ordering the loops contained in the SCOP in the IR file from small to large according to the starting line number acquired in the step S33, wherein the starting line number of the loop at the beginning, namely the upper line number in the C or C++ source code file SCOP corresponding to the IR file.
S35, calculating SCOP lower bound line numbers in the source code file: according to the ordering of step S34, the starting line number of the last cycle, i.e. the starting line number of the last cycle of the SCOP in the source code file; matching all circulation nodes of a source code file where the SCOP is located by using a class_matches matching algorithm of the class, wherein the circulation nodes comprise for circulation and while circulation, acquiring the starting line numbers of all the circulation nodes by using FullSourceLoc class of the LLVM, matching the circulation nodes corresponding to the starting line numbers according to the starting line numbers of the last circulation of the SCOP, and acquiring the ending line numbers of the circulation nodes by using PresumedLoc class of the LLVM, namely the downlink line numbers of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the class ast is required to be transmitted into all the non-standard library header file catalogues, C and C++ standard library header file catalogues which are referenced by engineering source codes.
Further, in the overall step S4 of the OpenCL automatic translation method, the to-be-translated SCOP refers to selecting different SCOPs according to the OpenCL conversion mode, and can support batch conversion and single conversion mode, and the batch conversion refers to taking the SCOP in each source code file as the to-be-translated SCOP and inserting an instruction, and sending the source code file of the inserted instruction into the PPCG for conversion; the single conversion means traversing the SCOP in each source code file, providing the source code of the SCOP to the user, selecting whether to translate the SCOP by the user, regarding all selected SCOP as SCOP to be translated after the selection is finished, inserting an instruction, and sending the source code file of the inserted instruction into the PPCG for conversion.
Further, in the overall step S4 of the OpenCL automatic translation method, it is determined whether the OpenCL device side source code file corresponding to the C or c++ source code file involved in the conversion is empty, and statistics is performed on the source code file which is not empty, so as to provide the number of source code files successfully converted by the user, and file paths of the OpenCL host side and the device side successfully converted.
Furthermore, the OpenCL automatic translation method can support the installation-free LLVM and PPCG when used in the similar environment, and the specific method is as follows:
based on the whole step S1 of the OpenCL automatic translation method, the clang compiler compiles the command and needs to transfer the parameters of the C and c++ standard library header file directory.
Based on the whole steps S2 and S3 of the OpenCL automatic translation method, compiling the loop detection method of llvmpoly into an executable file, linking all required LLVM static libraries, and transmitting the loop information by transmitting IR files through inter-process communication.
Based on the whole step S4 of the OpenCL automatic translation method, a clang compiling instance company of a third party library pet referenced by a PPCG process needs to be added with a C and C++ standard library header file directory.
Furthermore, when the OpenCL automatic translation method is used on the similar environment without LLVM and PPCG, such as a newly installed X86 ubuntu system, a third party library clang-cpp, isl, pet dynamic library compiled in the original environment is put under a/usr/local/lib directory, a PPCG process executable file, a clang ast_matches matching algorithm process or a dynamic library can directly refer to the third party library under the/usr/local/lib directory; the opt tool executable file, the clang tool executable file, and the LLVM loop detection executable file can be directly operated.
Example 1:
in order to solve the technical problems, the invention provides an OpenCL automatic translation method, and a tool developed based on the method can scan SCOP conforming to polyhedral modeling in all source code files in C/C++ engineering and convert source files into source code files of an OpenCL host side and a device side in batches.
Referring to fig. 1, a flowchart of the method of the present invention comprises the following steps:
(1) Traversing each C or C++ source code file in the project by using an automation script, compiling the C or C++ source code files into LLVM IR files by using a clang compiler of the LLVM, and transmitting compiling instructions into-g parameters and all non-standard library header file catalogues referenced by the project source codes; the IR file was normalized with the LLVM opt tool into the-poly-Canonicalize parameter.
(2) Traversing all IR files, detecting each IR file by using a detection function of LLVMPoly, traversing according to the function, detecting all static control blocks SCOP, and storing the mapping from the C or C++ source code file name to the corresponding IR file name and the mapping from the IR file name to all SCOP contained in the IR file name.
(3) Traversing all source file names, finding SCOP of the corresponding IR file according to the mapping in the step (2), traversing SCOP, and mapping SCOP in the IR file to the upper line number and the lower line number of the C or C++ source code file SCOP corresponding to the IR file.
The specific flow for calculating the SCOP position of a certain SCOP mapped to a C or C++ source code file in an IR file is as follows:
1) Extracting a SCOP basic block range in an IR file: all basic blocks in the region where the SCOP is located are saved.
2) Traversing the loops of the functions of the SCOP in the IR file, judging whether the SCOP contains the loops according to whether the basic blocks contained in the loops are the subset of the basic blocks contained in the SCOP, and storing all the loops contained in the SCOP.
3) And acquiring the starting line numbers of all loops included in SCOP in the IR file in the C or C++ source code file corresponding to the loops by using the location information class DebugLoc of the LLVM.
4) Calculating SCOP upper bound line number in the source code file: ordering the loops contained in the SCOP in the IR file from small to large according to the starting line number obtained in the step 3), wherein the starting line number of the loop at the beginning, namely the upper line number in the C or C++ source code file SCOP corresponding to the IR file.
5) Calculating SCOP lower bound line number in the source code file: according to the sorting of the step 4), the starting line number of the last cycle, namely the starting line number of the last cycle of SCOP in the source code file; matching all circulation nodes of a source code file where the SCOP is located by using a class_matches matching algorithm of the class, wherein the circulation nodes comprise for circulation and while circulation, acquiring the starting line numbers of all the circulation nodes by using FullSourceLoc class of the LLVM, matching the circulation nodes corresponding to the starting line numbers according to the starting line numbers of the last circulation of the SCOP, and acquiring the ending line numbers of the circulation nodes by using PresumedLoc class of the LLVM, namely the downlink line numbers of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the class ast is required to be transmitted into all the non-standard library header file catalogues, C and C++ standard library header file catalogues which are referenced by engineering source codes.
(4) Traversing SCOP in C or C++ source code file, and inserting instruction at SCOP up-down line number to be translated. The uplink number refers to the blank of the upper line of the SCOP upper line number, and the downlink number refers to the blank of the lower line of the SCOP lower line number. And sending the source file inserted with the SCOP instruction into a PPCG process for conversion to generate an OpenCL host side and device side source code file. The clang compiling instance of the third party library pet referenced by the PPCG needs to add all non-standard library header file catalogs referenced by engineering source codes.
The SCOP to be translated refers to selecting different SCOP according to the OpenCL conversion mode, and can support batch conversion and single conversion mode, wherein the batch conversion is to consider the SCOP in each source code file as the SCOP to be translated, insert an instruction, and send a source file of the inserted instruction into the PPCG for conversion; the single conversion means traversing the SCOP in each source code file, providing the source code of the SCOP to the user, selecting whether to translate the SCOP by the user, regarding all selected SCOP as SCOP to be translated after the selection is finished, inserting an instruction, and sending the source code file of the inserted instruction into the PPCG for conversion.
Referring to fig. 2, an example of a software architecture implemented by an OpenCL automatic translation tool corresponding to the method of the present invention is a software architecture that is divided into a service layer, an application layer and a display layer.
The interface development library selects Qt5.9; LLVM version 17.0; the source code used by the PPCG is PPCG-0.09.1; the hardware development and test platform adopts a general X86 computer, and the operating system is ubuntu20.04; the test uses a C++17 test set polybranch-C-3.2 compiled using a polyhedral model.
(1) Service layer: the service layer comprises a preprocessing script service, an SCOP detection process service, an AST line number calculation service and a PPCG OpenCL conversion process service. The functions of each part are as follows:
1) The preprocessing script service is to traverse all C or C++ source files in engineering by using a Python script, and convert the source files into LLVM IR intermediate files by using a clang compiler of the LLVM, and the instructions are as follows:
clang-S-g-emit-llvm-Xclang-disable-O0-optnone source file-O ll file engineering header file directory standard header file directory.
The clang instruction needs to add a-g parameter to generate Debug position information; all non-standard header files of engineering references need to be imported in sequence, and if clang executable files are used on the environment where LLVM is not installed, all C/C++ standard library header file directories corresponding to the environment need to be imported.
Further, the IR intermediate file is a ll file, and the normalized instruction is as follows:
the opt-S-polly-Canonicalize ll File-o normalized ll File.
And storing all the generated normalized ll files into a configuration file.
2) SCOP detection process service: the SCOP detection process service calls a detection function of poly to carry out SCOP detection on the incoming normalized ll file, and transmits related SCOP information, including mapping from a source file name of the SCOP to a ll file name, all SCOP included in the ll file, and all uplink numbers of loops included in the SCOP in a source code file.
To support the use of the tool in environments where LLVM is not installed, the loop detection service is compiled into an executable file, linking all required LLVM static libraries.
3) AST line number calculation service: the end line number service of calculating the loop according to the start line number of the loop is mainly provided. Converting source codes into abstract syntax tree AST by analyzing grammar and semantics of the source codes, matching all circulation nodes of a source code file where an SCOP is located by using a class ast_matches matching algorithm, wherein the circulation nodes comprise for circulation and while circulation, obtaining starting line numbers of all the circulation nodes by using FullSourceLoc class of LLVM, matching the starting line numbers of the last circulation of the SCOP to the circulation nodes corresponding to the starting line numbers according to the starting line numbers of the last circulation of the SCOP, and obtaining ending line numbers of the circulation nodes by using PresumedLoc class of the LLVM, namely, lower line numbers of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the class ast is required to be transmitted into all the non-standard library header file catalogues, C and C++ standard library header file catalogues which are referenced by engineering source codes.
4) PPCG OpenCL translation Process service: and transmitting the source code file inserted with the SCOP instruction out of the OpenCL host side and the equipment side file. All head file directories for engineering references need to be added to the clone compilation instance in the source code of the third party library pet for PPCG references.
To support the use of the present service on environments where LLVM is not installed, it is necessary to add the clone compiled instance company instance to the C and c++ standard library directories of the environment in the source code of the third party library pet referenced by PPCG.
For a C++ source code file, an alarm may be generated when two or more SCOP exist in the source code file, the source code after the last SCOP is not output to the OpenCL host side file, in this example, the PPCG source code is modified, and all the C++ source codes are forcedly output to the host side file. Whether the conversion is successful is further judged by the OpenCL conversion application of the application layer.
(2) Application layer: the method comprises a preprocessing application, an SCOP detection application and an OpenCL conversion application.
1) And the preprocessing application is used for packaging the preprocessing python script service and providing a C++ preprocessing interface for the display layer.
2) SCOP detection application: and acquiring the cycle start line number information included by all SCOP of the C or C++ source code file through the SCOP detection process service. Acquiring the end line number information of the circulation through an AST line number calculation service, and calculating the upper line number and the lower line number of all SCOP in the source code file through the flow of mapping SCOP in IR designed by the tool to the SCOP position in the C or C++ source code file.
The SCOP detection application provides a detection interface for the display layer.
3) The OpenCL conversion application is used for providing batch conversion and a single conversion interface for a display layer, wherein the batch conversion is to insert instructions at the upstream and downstream line numbers of SCOP in each source code file, such as inserting #pragma chop at the blank of the upper line number of SCOP, and inserting #pragma end code at the blank of the lower line number of SCOP. The method is concretely realized as follows: scanning a source code file, writing a new file with the same name into the source code file row by row, when the new file is matched with an upper line number of an SCOP, writing a row of the SCOP into a #pragma crop, writing the SCOP source code into the written file row by row, writing a row of the SCOP source code into a #pragma end map, and traversing the method row by row to the end of the source code file. The new source code file is the C or C++ source code file after the instruction is inserted.
When traversing the SCOP in the source code file, the single conversion is provided for the interface of the display layer, the source code of the SCOP is transmitted to the display layer for display, and the user confirms whether to convert the SCOP. After traversing the SCOP, the OpenCL conversion application inserts instructions for all the user to confirm the converted SCOP.
Traversing source files of all inserted instructions, and performing batch translation by using PPCG OpenCL translation progress service.
Judging whether the equipment end source code files corresponding to the C or C++ source code files participating in conversion are empty or not, counting the non-empty source code files, and providing the number of source code files successfully converted by a display layer and the paths of OpenCL host end and equipment end files successfully converted, wherein in the example, the host files and the equipment files are one path.
(3) Display layer: the display layer comprises a catalog configuration interface, a preprocessing interface, a detection interface and an OpenCL conversion interface. The display layer performs display and user interaction with an interface provided by the application layer.
The interactive interface operation mode of the OpenCL automatic translation tool corresponding to the OpenCL automatic translation method of the invention is introduced as follows:
1) As shown in fig. 3, a total directory of engineering source codes which need to be converted by openCL is configured on an opened directory configuration interface, the converted output directory, and all header files needed by source code compiling are successfully configured. For use by the service layer and the application layer.
For example: clicking the corresponding selection of the engineering catalog, and selecting a source code total catalog: opt/opencl transducer data/test/polybranch-c-3.2
Clicking the "selection" corresponding to the "output catalog", selecting the output catalog: opt/opencl transducer data test 1
Clicking the corresponding selection of the head file directory, and selecting the head file directory: pasting of header files into a header file display box, one header file directory per action, is supported.
Clicking the right bottom corner to run, and storing the configuration information into the configuration file under the/opt/opencl_transducer_data.
Click "Next" and enter the preprocessing interface.
2) As shown in FIG. 4, clicking on the "run" in the lower right hand corner at the preprocessing interface, the "preprocessing results" box displays "pre treatment success-! And if the pretreatment is successful and fails, displaying log in the pretreatment script processing process. Click "next" and enter the detection interface.
3) As shown in FIG. 5, clicking the "run" in the lower right corner of the detection interface, and "the detection result" box displays "x:" of the files containing the chop is detected this time, which represents that the chop detection succeeds in x source code files, clicking "next" and entering the opencl conversion interface.
4) As in FIG. 6, at the opencl conversion interface, either "batch conversion" or "single conversion" may be selected.
Clicking on "run" in the lower right hand corner, if a single transition is selected, it is necessary to select in the pop-up dialog whether to transition the scope source code displayed in the "info display" box. Optionally, converting; if not, the loop is not converted.
After the conversion is finished, the 'information display' frame displays 'x files which are successfully converted by the opencl' and represent that the opencl is successfully converted by the x files, and the corresponding host side and equipment side files can be checked under the file path of the opencl host side of the display frame.
The invention provides an OpenCL automatic translation tool, which automatically identifies the SCOP position of a code region capable of carrying out polyhedral modeling in a C or C++ source code file, and solves the problems that expert knowledge is required for manually carrying out SCOP identification in the source code file and the efficiency is low; all C or C++ source code files in engineering can be automatically scanned, files conforming to polyhedral modeling are converted into OpenCL host end and equipment end source code files in batches, and the translation efficiency is greatly improved. The method can support the installation-free PPCG and LLVM when used in the same kind of new environment, and saves a great amount of time.
Example 2:
an OpenCL automatic translation method, comprising the steps of:
s1, traversing each C or C++ source code file in engineering by using an automation script, compiling the C or C++ source code file into an LLVM IR file by using clang, and transmitting a compiling instruction into a-g parameter and all non-standard library header file catalogues referenced by the engineering source code; the IR file was normalized with the LLVM opt tool into the-poly-Canonicalize parameter.
S2, traversing all IR files, detecting each IR file by using a detection function of LLVMpoly, traversing according to the function, detecting all static control blocks SCOP, and storing the mapping from the C or C++ source code file name to the corresponding IR file name and the mapping from the IR file name to all SCOP contained in the IR file name.
S3, traversing all source code file names, finding SCOP of the corresponding IR file according to the mapping in the step S2, traversing the SCOP, and mapping the SCOP in the IR file to the upper line number and the lower line number of the SCOP of the C or C++ source code file corresponding to the IR file.
S4, traversing SCOP in the C or C++ source code file, and inserting instructions at the SCOP uplink and downlink numbers to be translated. The inserting instruction inserts the effective rule of the SCOP instruction according to the polyhedron extracting tool pet, and sends the source code file inserted with the SCOP instruction into the PPCG process for conversion to generate the source code files of the OpenCL host end and the equipment end. The clang compiling instance of the third party library pet referenced by the PPCG needs to add all non-standard library header file catalogs referenced by engineering source codes.
Further, in the step S3, the specific process of calculating that a certain SCOP in the IR file is mapped to a SCOP position in the C or c++ source code file is as follows:
s1, extracting an SCOP basic block range in an IR file: all basic blocks in the region where the SCOP is located are saved.
S2, traversing the loops of the functions of the SCOP in the IR file, judging whether the SCOP comprises the loops according to whether the basic blocks contained in the loops are the subset of the basic blocks contained in the SCOP, and storing all the loops contained in the SCOP.
S3, acquiring the starting line numbers of all loops included in SCOP in the IR file in the C or C++ source code file by using the location information class DebugLoc of the LLVM.
S4, calculating an SCOP uplink number in the source code file: and (3) ordering the loops contained in the IR file SCOP from small to large according to the starting line number acquired in the step (S3), wherein the starting line number of the loop at the beginning, namely the upper line number in the C or C++ source code file SCOP corresponding to the IR file.
S5, calculating SCOP lower bound line numbers in the source code file: according to the sorting of the step S4, the starting line number of the last cycle of the source code file SCOP; according to the starting line number of the last cycle of the SCOP, matching a cycle node corresponding to the starting line number by using an ash_matches matching algorithm, wherein compiling parameters of the cluster ash need to be transmitted into all non-standard library head file catalogs, C and C++ standard library head file catalogs which are referenced by engineering source codes, and the cycle node comprises a for cycle and a while cycle; the PresumedLoc class of LLVM is used to obtain the end line number of the circulating node, namely the lower bound line number of SCOP in the source code file.
Further, in step S4, the to-be-translated SCOP refers to selecting different SCOPs according to the OpenCL conversion mode, and may support batch conversion and single conversion mode, where batch conversion refers to taking a SCOP in each source code file as the to-be-translated SCOP and inserting an instruction, and sending the source code file of the inserted instruction into PPCG for conversion; the single conversion means traversing the SCOP in each source code file, providing the source code of the SCOP to the user, selecting whether to translate the SCOP by the user, regarding all selected SCOP as SCOP to be translated after the selection is finished, inserting an instruction, and sending the source code file of the inserted instruction into the PPCG for conversion.
Further, in step S4, it is determined whether the OpenCL device side source code file corresponding to the C or c++ source code file involved in the conversion is empty, and statistics is performed on the non-empty source code file, so as to provide the number of source code files successfully converted by the user and file paths of the OpenCL host side and the device side successfully converted.
Further, the tool can support the LLVM and the PPCG to be installed when used in the same environment, and the specific method is as follows:
further, based on the description of step S1, the clang tool compiles instructions to transfer the parameters of the C and c++ standard library header file directories.
Further, based on the steps S2 and S3, the chop detection method of llvmpoly is compiled into an executable file, all required LLVM static libraries are linked, IR files are transferred in through inter-process communication, and chop information is transferred out.
Further, based on the description of step S4, C and c++ standard library header file directories must be added to the clang compilation instance of the third party library pet referenced by the PPCG process.
Advantageous effects
The invention provides an OpenCL automatic translation method, which automatically identifies the SCOP position of a code region capable of carrying out polyhedral modeling in a C or C++ source code file, and solves the problems that expert knowledge is required for manually carrying out SCOP identification in the source code file and the efficiency is low; all C or C++ source code files in engineering can be automatically scanned, files conforming to polyhedral modeling are converted into OpenCL host end and equipment end source code files in batches, and the translation efficiency is greatly improved. The system can support the installation-free PPCG and LLVM when used in a new similar environment, and saves a great amount of time.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (10)

1. An OpenCL automatic translation method, comprising the steps of:
s1, traversing each C or C++ source code file in engineering by using an automation script, compiling the C or C++ source code file into an LLVM IR file by using a clang compiler of the LLVM, and transmitting a compiling instruction into all non-standard library header file catalogues referenced by-g parameters and engineering source codes; normalizing the IR file by using an opt tool of the LLVM to enter a poll-Canonicalize parameter;
s2, traversing all IR files, detecting each IR file by using a detection function of LLVMpoly, traversing according to the function, detecting all static control blocks SCOP, and storing the mapping from the C or C++ source code file name to the corresponding IR file name and the mapping from the IR file name to all SCOP contained in the IR file;
s3, traversing all the C or C++ source code file names, finding SCOP of the corresponding IR file according to the mapping in the step S2, traversing the SCOP, and mapping the SCOP in the IR file to the upper line number and the lower line number of the SCOP of the C or C++ source code file corresponding to the IR file;
s4, traversing SCOP in the C or C++ source code file, and inserting instructions at the SCOP uplink and downlink numbers to be translated; the inserting instruction inserts the effective rule of the instruction according to pet, the upstream number refers to the blank of the upper line of the SCOP upper limit line number, and the downstream number refers to the blank of the lower line of the SCOP lower limit line number; the source code file of the inserted instruction is sent to a PPCG process for conversion, and an OpenCL host end and a device end source code file are generated; all non-standard library header file directories referenced by engineering source codes are added to the class compiling instance in the foreach_crop_in_c_source function of the third party library pet referenced by the PPCG process.
2. The OpenCL automatic translation method of claim 1, wherein there is a comment line in between an upper bound line number and an upper bound line number, and there is a comment line in between a lower bound line number and a lower bound line number.
3. The method of automatically translating OpenCL according to claim 1, wherein in step S3, the specific flow of calculating the upper bound line number and the lower bound line number of the IR file from the SCOP mapped to the C or c++ source code file SCOP is as follows:
s31, extracting an SCOP basic block range in the IR file: storing all basic blocks in the area where the SCOP is located;
s32, traversing the loops of the functions of the SCOP in the IR file, judging whether the SCOP comprises the loops according to whether the basic blocks contained in the loops are the subset of the basic blocks contained in the SCOP, and storing all the loops contained in the SCOP;
s33, acquiring the starting line numbers of all loops included in SCOP in the IR file in the C or C++ source code file by using the position information type DebugLoc of the LLVM;
s34, calculating an SCOP uplink number in the source code file: ordering the loops contained in SCOP in the IR file from small to large according to the starting line number acquired in the step S33, wherein the starting line number of the loop at the beginning, namely the upper line number in the C or C++ source code file SCOP corresponding to the IR file;
s35, calculating SCOP lower bound line numbers in the source code file: according to the ordering of step S34, the starting line number of the last cycle, i.e. the starting line number of the last cycle of the SCOP in the source code file; matching all circulation nodes of a source code file where the SCOP is located by using a class_matches matching algorithm of the class, wherein the circulation nodes comprise for circulation and while circulation, acquiring the starting line numbers of all the circulation nodes by using FullSourceLoc class of the LLVM, matching the circulation nodes corresponding to the starting line numbers according to the starting line numbers of the last circulation of the SCOP, and acquiring the ending line numbers of the circulation nodes by using PresumedLoc class of the LLVM, namely the downlink line numbers of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the class ast is required to be transmitted into all the non-standard library header file catalogues, C and C++ standard library header file catalogues which are referenced by engineering source codes.
4. The method for automatically translating OpenCL according to claim 1, wherein in S4, the to-be-translated SCOP refers to selecting different SCOPs according to an OpenCL conversion mode, supporting batch conversion and single conversion mode, and batch conversion is to consider a SCOP in each source code file as a to-be-translated SCOP and insert an instruction, and send the source code file of the inserted instruction into PPCG for conversion; the single conversion refers to traversing the SCOP in each source code file, providing the source code of the SCOP for a user, selecting whether to translate the SCOP by the user, regarding all selected SCOP as the SCOP to be translated after the selection is finished, inserting an instruction, and sending the source code file of the inserted instruction into the PPCG for conversion.
5. The method of claim 1, wherein in step S4, it is determined whether the OpenCL device side source code file corresponding to the C or c++ source code file involved in the conversion is empty, and statistics is performed on the source code file that is not empty, so as to provide the number of source code files successfully converted by the user and the paths of OpenCL host side and device side file successfully converted.
6. The OpenCL automatic translation method according to any one of claims 1 to 5, wherein the OpenCL automatic translation method supports no LLVM and PPCG installation when used in a similar environment, and the specific method is as follows:
based on the step S1, the clang compiler compiles the command and needs to transmit the parameters of the file catalogs of the standard library header of C and C++;
compiling the SCOP detection method of LLVMPoly into an executable file on the basis of the steps S2 and S3, linking all required LLVM static libraries, transmitting in IR files through inter-process communication, and transmitting SCOP information;
based on the step S4, the clang compiling instance company of the third party library pet referenced by the PPCG process needs to add the C and C++ standard library head file catalogue.
7. The OpenCL automatic translation method according to claim 6, wherein when the OpenCL automatic translation method is used in a similar environment where LLVM and PPCG are not installed, a third party library class-cpp, isl, pet dynamic library compiled in the original environment is put under a/usr/local/lib directory, and a PPCG process executable file, a class_matches matching algorithm process of the class, or the dynamic library directly refers to the third party library under the/usr/local/lib directory; the opt tool executable file, the clang tool executable file and the LLVM SCOP detection executable file are directly operated.
8. An OpenCL automatic translation tool, comprising: a service layer, an application layer and a display layer;
the service layer comprises a preprocessing script service, an SCOP detection process service, an AST line number calculation service and a PPCG OpenCL conversion process service;
the preprocessing script service is that using Python script to traverse all C or C++ source files in engineering, using the clang compiler of LLVM to convert the source files into LLVM IR intermediate files; taking the IR intermediate file as a ll file;
SCOP detection process service: the SCOP detection process service calls a detection function of poly to carry out SCOP detection on the imported normalized ll file, and transmits SCOP related information out, and the SCOP detection process service comprises the following steps: mapping the source file name of the SCOP to the ll file name, all SCOP included in the ll file, and all uplink numbers of all loops included in the SCOP in the source file;
AST line number calculation service: the method comprises the steps of calculating a circulation ending line number service according to a circulation starting line number, converting source codes into abstract syntax trees AST through syntax and semantic analysis of source codes, matching all circulation nodes of a source code file where an SCOP is located by using a class_matches matching algorithm of the class, wherein the circulation nodes comprise a for circulation and a while circulation, acquiring the starting line numbers of all the circulation nodes by using a FullSourceLoc class of LLVM, matching the starting line numbers to circulation nodes corresponding to the starting line numbers according to the starting line number of the last circulation of the SCOP, and acquiring the ending line numbers of the circulation nodes by using a presumedLoc class of the LLVM, namely the lower line number of the SCOP in the source code file; the compiling parameter class CommonoOptionParser of the clang ast is required to be transmitted into all non-standard library head file catalogues, C and C++ standard library head file catalogues which are referenced by engineering source codes;
PPCG OpenCL translation Process service: transmitting source code files inserted with SCOP instructions, transmitting files of a host end and equipment end of OpenCL, and adding all head file catalogs for engineering reference into a clang compiling instance in source codes of a third party library pet referenced by PPCG;
application layer: the method comprises a preprocessing application, an SCOP detection application and an OpenCL conversion application;
the preprocessing application is used for packaging a preprocessing python script service and providing a C++ preprocessing interface for a display layer;
SCOP detection application: acquiring all SCOP of the C or C++ source code file and cycle start line number information included in the SCOP through an SCOP detection process service, acquiring cycle end line number information through an AST line number calculation service, and calculating the upper line number and the lower line number of all SCOP in the source code file through a process that SCOP in IR is mapped to the SCOP position in the C or C++ source code file; the SCOP detection application provides a detection interface for the display layer;
the OpenCL conversion application is provided for batch conversion and a single conversion interface of a display layer, wherein the batch conversion is to insert an instruction at the position of the uplink and downlink numbers of SCOP in each source code file, insert #pragma chop at the blank position of the upper line of SCOP, and insert #pragma end SCOP at the blank position of the lower line of SCOP; the method is concretely realized as follows: scanning a source code file, writing the source code file into a new file with the same name line by line, when the new file is matched with an upper line number of an SCOP, writing a line of the SCOP source code into the written file line by line, writing a line of the SCOP source code into a line of the written file by line, traversing the line by line to the end of the source code file according to the method, and obtaining the new source code file which is the C or C++ source code file after an instruction is inserted; when traversing the SCOP in the source code file, the single conversion is provided for the interface of the display layer, the source code of the SCOP is transmitted to the display layer for display, a user confirms whether to convert the SCOP, and after traversing the SCOP, the OpenCL conversion application confirms the uplink and downlink insertion instructions of the converted SCOP for all the users; traversing source files of all inserted instructions, and performing batch translation by using PPCG OpenCL conversion progress service;
display layer: the display layer comprises a catalog configuration interface, a preprocessing interface, a detection interface and an OpenCL conversion interface; the display layer performs display and user interaction with an interface provided by the application layer.
9. The OpenCL automatic translation tool of claim 8, wherein the interface development library is qt5.9; LLVM version 17.0; the source code used by the PPCG is PPCG-0.09.1; the hardware development and test platform adopts a general X86 computer, and the operating system is ubuntu20.04; the test uses a C++17 test set polybranch-C-3.2 compiled using a polyhedral model.
10. The OpenCL automatic translation tool of claim 8, wherein the OpenCL conversion application further determines whether a device side source code file corresponding to a C or c++ source code file involved in the conversion is empty, and performs statistics on the non-empty source code file, and provides the number of source code files successfully converted by the display layer, and a path of OpenCL host side and device side file successfully converted.
CN202311255553.7A 2023-09-27 2023-09-27 OpenCL automatic translation method Pending CN117311728A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311255553.7A CN117311728A (en) 2023-09-27 2023-09-27 OpenCL automatic translation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311255553.7A CN117311728A (en) 2023-09-27 2023-09-27 OpenCL automatic translation method

Publications (1)

Publication Number Publication Date
CN117311728A true CN117311728A (en) 2023-12-29

Family

ID=89280616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311255553.7A Pending CN117311728A (en) 2023-09-27 2023-09-27 OpenCL automatic translation method

Country Status (1)

Country Link
CN (1) CN117311728A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
US20180253291A1 (en) * 2015-08-26 2018-09-06 Samsung Electronics Co., Ltd. Technique for dynamically controlling processing devices in accordance with characteristic of user application
CN109542596A (en) * 2018-10-22 2019-03-29 西安交通大学 A kind of Scheduling Framework based on OpenCL kernel tasks
CN111309327A (en) * 2018-12-12 2020-06-19 厦门雅迅网络股份有限公司 Automatic compiling method of application program and computer readable storage medium
CN111966397A (en) * 2020-07-22 2020-11-20 哈尔滨工业大学 Automatic transplanting and optimizing method for heterogeneous parallel programs
CN114398039A (en) * 2021-12-03 2022-04-26 武汉大学 Automatic fine-grained two-stage parallel translation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180253291A1 (en) * 2015-08-26 2018-09-06 Samsung Electronics Co., Ltd. Technique for dynamically controlling processing devices in accordance with characteristic of user application
WO2018072493A1 (en) * 2016-10-17 2018-04-26 宁德时代新能源科技股份有限公司 Compiling method and compiling system
CN109542596A (en) * 2018-10-22 2019-03-29 西安交通大学 A kind of Scheduling Framework based on OpenCL kernel tasks
CN111309327A (en) * 2018-12-12 2020-06-19 厦门雅迅网络股份有限公司 Automatic compiling method of application program and computer readable storage medium
CN111966397A (en) * 2020-07-22 2020-11-20 哈尔滨工业大学 Automatic transplanting and optimizing method for heterogeneous parallel programs
CN114398039A (en) * 2021-12-03 2022-04-26 武汉大学 Automatic fine-grained two-stage parallel translation method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
EMANUELE PARISI等: "Source Code Classification for Energy Efficiency in Parallel Ultra Low-Power Microcontrollers", 《2021 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE)》, 1 July 2021 (2021-07-01), pages 1 - 6 *
LESTER KALMS等: "Automatic OpenCL Code Generation from LLVM-IR using Polyhedral Optimization", pages 1 - 6, Retrieved from the Internet <URL:《 https://dl.acm.org/doi/pdf/10.1145/3183767.3183779》> *
壹之型: "LLVM IR与OpenCL分析", pages 1 - 25, Retrieved from the Internet <URL:《https://zhuanlan.zhihu.com/p/646558586》> *
李颖颖: "面向异构系统的多面体编译优化关键技术研究", 《中国博士学位论文全文数据库 信息科技辑》, 15 January 2022 (2022-01-15), pages 137 - 18 *

Similar Documents

Publication Publication Date Title
CN105426394B (en) Based on cross-platform mobile report form generation method and system
CN106537333A (en) Systems and methods for a database of software artifacts
CN101866315B (en) Test method and system of software development tool
CN110673854A (en) SAS language compiling method, device, equipment and readable storage medium
CN109739512B (en) Analytic language text type analysis and conversion method
US20080263063A1 (en) Translating late bound linq expressions into database queries
CN110109671B (en) Webpack label size and style conversion method and device
CN111913741B (en) Object interception method, device, medium and electronic equipment
CN116450616A (en) General heterogeneous relational database SQL migration method based on parse tree
CN107526679A (en) Automated test frame, the automated testing method based on thereon, storage medium and computer equipment
CN102521008A (en) Program compiling device and method for compiling program
CN113515303A (en) Project transformation method, device and equipment
CN117311728A (en) OpenCL automatic translation method
CN111240681A (en) Method and device for converting different programming languages
Fritzson et al. Metamodelica–a symbolic-numeric modelica language and comparison to julia
US20220075796A1 (en) Architecture for data map converters
US20090235238A1 (en) Condensing pattern matcher generation for intermediate language patterns
CN114816356A (en) System and method for generating HTTP request code based on interface document
CN113467761A (en) Interface test template generation method based on Java reflection principle
WO2016085213A1 (en) Computer-executable model reverse engineering method and apparatus
CN114489653A (en) Compiler-based data processing method, compiler-based data processing device and readable storage medium
CN108595166B (en) Method and system for realizing application execution engine of distributed Internet of things
CN113050987A (en) Interface document generation method and device, storage medium and electronic equipment
CN116126347B (en) File compiling system and method for low-code application program
CN112596737A (en) Method, system, equipment and storage medium for scanning function call relation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination