Heterogeneous hybrid programming-oriented one-stop program compiling method

A hybrid programming and program compilation technology, applied in the field of code compilation, can solve the problems of difficulty in debugging, poor scalability, and complex implementation, and achieve the effect of good scalability

CN112579088AInactive Publication Date: 2021-03-30JIANGNAN INST OF COMPUTING TECH
4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Publication Date
2021-03-30
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure 1
    Figure 1
Patent Text Reader

Abstract

The invention discloses a heterogeneous hybrid programming-oriented one-stop program compiling method. The method comprises the following steps of: adding an extension keyword and a guidance statementto a compiler master controller, adding a keyword in front of an operation core variable, adding a compiling instruction in front of a function statement and a definition point of an operation core,and adding a compiling instruction before the control core calls a calling point of the operation core function; through front-end compiling, automatically separating variables and functions of the control core and the operation core; enabling the compiler middle end to compile and optimize the separated variables and functions on the control core and the operation core respectively to generate anintermediate representation of a program on the control core and an intermediate representation of a program on the operation core; and compiling results of compiling and optimizing of the control core and the operation core into heterogeneous many-core target codes. According to the invention, separate compiling and fusion compiling of control core and operation core codes are completed in one compiler in a one-stop manner, so that the problems of complex implementation, difficult debugging and poor expandability of a source-to-source mode can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the field of code compilation, in particular to a one-stop program compilation method for heterogeneous mixed programming. Background technique

[0002] The heterogeneous many-core system usually adopts the architecture of control core + computing core, in which the control core is responsible for processing complex logic control tasks, and the computing core is responsible for processing large-scale data parallel tasks with high computing density and simple logical branches. Provides an efficient computing platform for applications. Different task divisions lead to differences in the instructions and data types supported by the control core and the computing core, so the source code of the control core program and the source code of the computing core program need to be written separately (that is, distributed in different source files), and then call the control core The compiler compiles and generates the object code runnin...

Examples

Embodiment

[0019] Example: such as figure 1 As shown, a one-stop program compilation method for heterogeneous mixed programming includes the following steps,

[0020] S1: Compiler master control adds compilation process and control options, provides keywords to mark the private variables of the computing core and guidance statements that mark the code running on the computing core, adds keywords before the computing core variables, and distinguishes variables as computing core private variables It is still a computing core shared variable. Add a special pragma before the declaration and definition point of the computing core function to distinguish it from the control core function in the program. Core functions are distinguished;

[0021] S2: The front end of the compiler compiles the program according to the extended keywords and guidance statements, and automatically separates the variables and functions of the control core and the calculation core;

[0022] S3: The middle end of th...