A CGRA mapping acceleration method based on start interval prediction

By predicting the startup interval, the inefficiency problem caused by the gap between the starting and the optimal startup interval in CGRA mapping is solved, and a significant mapping acceleration effect is achieved.

CN118036519BActive Publication Date: 2025-03-07HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410001890.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-03-07
Estimated Expiration
2044-01-02

AI Technical Summary

Technical Problem

In the existing CGRA mapping methods, the difference between the starting start interval and the optimal start interval is large, resulting in a low mapping speed.

Method used

By obtaining the architectural information of the target CGRA, offline modeling and Online prediction are completed, and a relatively accurate startup interval is predicted, thereby performing high-speed CGRA mapping.

Benefits of technology

The acceleration of CGRA mapping is achieved, and compared with the original method, the acceleration of 1 to 3.9 times can be achieved, with an average acceleration multiple of 1.58.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118036519B_ABST
    Figure CN118036519B_ABST
Patent Text Reader

Abstract

The present invention provides a CGRA mapping acceleration method based on startup interval prediction, including: step 1: obtaining the architecture information of the target CGRA; step 2: completing offline modeling based on the architecture information of the target CGRA; step 3: completing online prediction according to the actual CGRA shape and offline modeling to obtain the startup interval; step 4: according to the startup interval, high-speed mapping from CDFG to the actual CGRA shape can be carried out. In the offline modeling, the present invention only needs to perform a small amount of mapping, and use Excel to perform linear regression on the mapping results to obtain relatively accurate model parameters k and b. Experienced operators can complete the offline modeling of a single CDFG within 5 minutes, and the labor cost and time cost can be ignored. At the same time, compared with the original mapping method, the method of the present invention can achieve CGRA mapping acceleration of 1 to 3.9 times and an average of 1.58 times.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and more specifically, relates to a CGRA mapping acceleration method based on startup interval prediction. Background Art

[0002] The coarse-grained reconfigurable architecture (CGRA) originated in the 1990s. While providing performance and energy efficiency close to that of application-specific acceleration circuits (ASICs), its internal reconfigurable modules ensure flexibility similar to that of CPUs and GPUs. Therefore, it has received widespread attention from academia and industry in recent years. The basic working principle of CGRA is "parallelism in the spatial domain and pipeline in the temporal domain". In the spatial domain, CGRA uses Tiles and Links resources to carry out parallel computing and data transmission. In the temporal domain, these resources are pipelined with a certain clock cycle as the start interval (II). CGRA mapping is the process of planning, placing and routing the control / data flow graph (CDFG) of the computing task in the spatial and temporal domains of CGRA.

[0003] Existing mapping methods start with a specific II, which is usually set directly to 1 or roughly estimated based on the CDFG size and the number of loops and CGRA Tiles. The mapper will first build a module routing resource graph (MRRG) under the current II, and then use the CGRA Tiles and Links resources contained in the MRRG to complete planning, placement, and routing. If the current CDFG node cannot find available resources in the MRRG due to constraints such as dependencies, it is considered that the mapping cannot be completed under the current II. Therefore, II will be increased by 1 to enrich the available resources in the MRRG, and the above mapping process will be restarted. This process is repeated until the mapping is successful, and the final II is the optimal II that the current mapping method can achieve by mapping the CDFG to the target CGRA.

[0004] However, existing starting II estimation methods do not consider the influence of CGRA shape, CGRA topology, and planning algorithm, which may lead to a large gap between the starting II and the optimal II, resulting in unnecessary planning attempts during the mapping process, greatly reducing the mapping speed. Summary of the invention

[0005] The purpose of the present invention is to provide a CGRA mapping acceleration method based on start interval prediction, aiming to solve the technical problem that the gap between the calculated starting start interval and the optimal start interval in the prior art is large, resulting in low mapping speed.

[0006] To achieve the above object, the technical solution adopted by the present invention is: to provide a CGRA mapping acceleration method based on start interval prediction, comprising:

[0007] Step 1: Get the architecture information of the target CGRA;

[0008] The architecture information of the target CGRA includes the topology and the types of processing units;

[0009] Step 2: Complete Offline modeling based on the architecture information of the target CGRA;

[0010] Step 3: Complete the online prediction based on the actual CGRA shape and offline modeling to obtain the start interval;

[0011] Step 4: Based on the start-up interval, a high-speed mapping of the CDFG to the actual CGRA shape can be performed.

[0012] Optionally, the offline modeling steps in step 2 include:

[0013] Step 2.1: Classify the tiles based on the number of links contained in each tile in the topological structure of CGRA to obtain different types of tiles;

[0014] Step 2.2: Combine different types of tiles to obtain a tile combination;

[0015] Step 2.3: Determine whether there are n CGRA shapes with different numbers of Links in the Tile combination. If so, collect n CGRA shapes with different numbers of Links in the corresponding Tile combination;

[0016] Step 2.4: Based on the planning algorithm, complete the mapping of the current CDFG under the n CGRA shapes with different numbers of Links contained in the corresponding tile combination, and record the optimal start interval and the number of Links contained in the CGRA shape during the mapping process;

[0017] Step 2.5: Fit the data for the optimal start interval and the number of links contained in the CGRA shape during the mapping process, and record the model parameters;

[0018] Step 2.6: Repeat steps 2.2 to 2.5 until all tile combinations are traversed and the Offline modeling is completed;

[0019] The fitting formula is:

[0020] ΙΙ=k / Links+b

[0021] Wherein, II is the start interval, k is the first constant, and b is the second constant.

[0022] Optionally, the steps for data fitting in step 2.5 are:

[0023] A linear regression is performed on the optimal start interval in the mapping process and the number of links contained in the n CGRA shapes under the corresponding tile combination, and a mathematical model between the optimal start interval and the number of links is obtained.

[0024] Optionally, the model parameters in step 2.5 are k and b after comprehensive consideration of CGRATiles, number of Links, CDFG size and loop, CGRA topology, and placement and routing effects.

[0025] Optionally, the steps of online prediction in step 3 include:

[0026] Step 3.1: Analyze the CGRA shape actually used to obtain the Tiles type, Tiles combination and Links number contained in the CGRA shape actually used;

[0027] Step 3.2: Obtain the corresponding model parameters in Offline modeling according to the combination of the CGRA shapes actually used;

[0028] Step 3.3: Substitute the number of links and model parameters contained in the actual CGRA shape into the fitting formula for calculation to obtain the predicted value of the start interval;

[0029] Step 3.4: Use the predicted start interval value as the starting start interval.

[0030] The beneficial effects of a CGRA mapping acceleration method and system based on start interval prediction provided by the present invention are:

[0031] 1. In the offline modeling, the present invention only needs to perform a small amount of mapping and use Excel to perform linear regression on the mapping results to obtain relatively accurate model parameters k and b. An experienced operator can complete the offline modeling of a single CDFG within 5 minutes, and the labor cost and time cost are negligible.

[0032] 2. This paper selects CDFG in five fields, namely linear algebra, digital signal processing, speech recognition, data encryption and image processing. After offline modeling, five sets of model parameters k and b are obtained, and online prediction of the mapping method is performed based on the model parameters. The experimental results show that compared with the original mapping method, the method of this invention can achieve CGRA mapping acceleration of 1 to 3.9 times and an average of 1.58 times. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0034] Figure 1 A flowchart of a CGRA mapping acceleration method based on startup interval prediction provided by an embodiment of the present invention;

[0035] Figure 2 A flowchart of Offline modeling provided by an embodiment of the present invention;

[0036] Figure 3 A flowchart of online prediction provided by an embodiment of the present invention;

[0037] Figure 4 A Tile type diagram in the shape of a CGRA provided by an embodiment of the present invention;

[0038] Figure 5 A relationship curve between the number of Links and the final II provided in an embodiment of the present invention;

[0039] Figure 6 A schematic diagram of online prediction provided by an embodiment of the present invention.

[0040] In the figure, CGRA is a coarse-grained reconfigurable architecture, CDFG is a control / data flow graph of a computing task, Offline is offline, Links is data path, Tile is processing unit, mesh is mesh, and off-chip memory is off-chip memory. DETAILED DESCRIPTION

[0041] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] pass Figure 1-3 This embodiment is described as follows. Figure 1 As shown, the steps of a CGRA mapping acceleration method based on startup interval prediction include:

[0043] Step 1: Get the architecture information of the target CGRA;

[0044] The architecture information of the target CGRA includes the topology and the types of processing units;

[0045] Step 2: Complete Offline modeling based on the architecture information of the target CGRA;

[0046] Among them, CGRA is a coarse-grained reconfigurable architecture, CDFG is a control / data flow graph of a computing task, Offline is offline, Links is a data path, and Tile is a processing unit.

[0047] Further, such as Figure 2 As shown, the steps of Offline modeling in step 2 include:

[0048] Step 2.1: Classify the tiles based on the number of links contained in each tile in the topological structure of CGRA to obtain different types of tiles;

[0049] Step 2.2: Combine different types of tiles to obtain a tile combination;

[0050] Step 2.3: Determine whether there are n CGRA shapes with different numbers of Links in the Tile combination. If so, collect n CGRA shapes with different numbers of Links in the corresponding Tile combination;

[0051] Step 2.4: Based on the planning algorithm, complete the mapping of the current CDFG under n CGRA shapes with different numbers of Links contained in the corresponding Tile combination, and record the optimal start interval and the number of Links contained in the CGRA shape during the mapping process;

[0052] Step 2.5: Fit the data for the optimal start interval and the number of links contained in the CGRA shape during the mapping process, and record the model parameters;

[0053] The fitting formula is:

[0054] ΙΙ=k / Links+b

[0055] Wherein, II is the start interval, k is the first constant, and b is the second constant.

[0056] Furthermore, the steps of data fitting in step 2.5 are:

[0057] A linear regression is performed on the optimal start interval in the mapping process and the number of links contained in the n CGRA shapes under the corresponding tile combination, and a mathematical model between the optimal start interval and the number of links is obtained.

[0058] Furthermore, the model parameters in step 2.5 are k and b after comprehensive consideration of the influence of CGRATiles, number of Links, CDFG size and loop, CGRA topology, and placement and routing.

[0059] Step 2.6: Repeat steps 2.2 to 2.5 until all tile combinations are traversed and the Offline modeling is completed.

[0060] Step 3: Complete the online prediction based on the target CGRA shape and offline modeling, that is, complete the mapping from CDFG to the current CGRA.

[0061] Further, such as Figure 3 As shown, the steps of online prediction in step 3 include:

[0062] Step 3.1: Analyze the CGRA shape actually used to obtain the Tiles type, Tiles combination and Links number contained in the CGRA shape actually used;

[0063] Step 3.2: Obtain the corresponding model parameters in Offline modeling according to the combination of the CGRA shapes actually used;

[0064] Step 3.3: Substitute the number of links and model parameters contained in the actual CGRA shape into the fitting formula for calculation to obtain the predicted value of the start interval;

[0065] Step 3.4: Use the predicted start interval value as the starting start interval.

[0066] Example

[0067] pass Figure 4-6 This embodiment is described as follows. Figure 4 As shown, in the mesh topology, the shape of any CGRA is determined by Figure 4 There are 4 types of tiles in (a) to (b), and these tiles have links from 1 to 4 respectively; among them, mesh is a grid.

[0068] The four types of Tiles (a) to (b) are combined. Four representative combinations are used as examples, including combination A: (a)(b)(c), combination B: (b)(c), combination C: (b)(c)(d), and combination D: (c)(d). Five CGRA shapes are collected in each combination, mapped using the planning algorithm, and the final II is recorded. The number of links for all CGRA shapes in each combination is calculated, and a relationship curve with the final II is drawn in Excel. The relationship curve is as follows: Figure 5 shown.

[0069] Use Excel's built-in "trend line" function to fit the data, store the fitting formula and parameters, and complete the offline modeling.

[0070] like Figure 6 As shown, Figure 6 This is a schematic diagram of online prediction. Under a given CGRA shape, it is analyzed that the shape belongs to the combination C in offline modeling, and the corresponding fitting formula ΙΙ=k / Links+b is read from the off-chip memory. At the same time, the number of Links under this shape is calculated. Substituting the number of Links into the fitting formula, the prediction II can be obtained. The mapping method then uses it as the starting II and starts mapping the CDFG to the CGRA shape. Among them, off-chip memory is off-chip memory.

[0071] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A CGRA mapping acceleration method based on start interval prediction, characterized in that: The steps of the CGRA mapping acceleration method based on startup interval prediction include: Step 1: Get the architecture information of the target CGRA; The architecture information of the target CGRA includes topology and processing unit types; Step 2: Complete Offline modeling based on the architecture information of the target CGRA; The offline modeling steps in step 2 include: Step 2.1: Classify the tiles based on the number of links contained in each tile in the topological structure of CGRA to obtain different types of tiles; Step 2.2: Combine the different types of Tiles to obtain a Tiles combination; Step 2.3: Determine whether the Tiles combination contains n CGRA shapes with different numbers of Links. If so, collect n CGRA shapes with different numbers of Links contained in the corresponding Tile combination, where "Tile combination" is one of the Tlies combinations in step 2.2; Step 2.4: Based on the planning algorithm, complete the mapping of the current CDFG under the n CGRA shapes with different numbers of Links contained in the corresponding tile combination, and record the optimal start interval and the number of Links contained in the CGRA shape during the mapping process; Step 2.5: Perform data fitting on the optimal start interval and the number of links contained in the CGRA shape during the mapping process, and record the model parameters; Step 2.6: Repeat steps 2.2 to 2.5 until all tile combinations are traversed and the Offline modeling is completed; The fitting formula is: ΙΙ=k / Links+b Wherein, ΙΙ is the start interval, k is the first constant, and b is the second constant; Step 3: Complete the online prediction based on the actual CGRA shape and offline modeling to obtain the start interval; The steps of online prediction in step 3 include: Step 3.1: Analyze the CGRA shape actually used to obtain the Tiles type, Tiles combination and Links quantity contained in the CGRA shape actually used, wherein the Tiles type is a plurality of Tile types in the modeling process of step 2; Step 3.2: Obtain the corresponding model parameters in Offline modeling according to the Tiles combination contained in the CGRA shape actually used; Step 3.3: Substitute the number of links and model parameters contained in the actual CGRA shape into the fitting formula for calculation to obtain the predicted value of the start interval; Step 3.4: taking the predicted start interval value as the initial start interval; Step 4: Based on the activation interval, a high-speed mapping of the CDFG to the actual CGRA shape can be performed.

2. The CGRA mapping acceleration method based on startup interval prediction according to claim 1, characterized in that: The steps for data fitting in step 2.5 are: A linear regression is performed on the optimal start interval in the mapping process and the number of Links contained in the n CGRA shapes under the corresponding Tile combination to obtain a mathematical model between the optimal start interval and the number of Links.

3. The CGRA mapping acceleration method based on startup interval prediction according to claim 1, characterized in that: The model parameters in step 2.5 are k and b after comprehensive CGRATiles, number of Links, CDFG size and loop, CGRA topology, and layout and routing influence, where comprehensive CGRATiles is the Tiles type and Tiles combination of the comprehensive target CGRA.

Citation Information

Patent Citations

  • A mapping method based on the universal reconfigurable processors DBSS and an MBSS

    CN109669682A

  • Method and device for accelerating imperfect nested loop on coarse-grained reconfigurable array

    CN113419990A