Network-on-chip virtual channel dynamic configuration method and system based on heterogeneous system and medium
By adaptively adjusting the virtual channel allocation of the CPU-GPU heterogeneous on-chip network, the problems of low resource utilization and limited performance are solved, thereby improving system performance and optimizing energy consumption.
Patent Information
- Application Number
- CN202511221585.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-11-21
AI Technical Summary
In CPU-GPU heterogeneous on-chip networks, traditional static virtual channel allocation leads to low resource utilization, limited performance, and difficulty in coping with dynamically changing mixed workloads, resulting in communication hotspots and resource waste.
By adaptively adjusting the virtual channel partitioning method, dynamically configuring virtual channels, calculating a comprehensive score based on performance data, selecting the optimal configuration scheme, and optimizing resource allocation and energy consumption.
It improves system performance, avoids resource waste and performance bottlenecks, adapts to dynamic changes in traffic, and reduces power consumption.
Smart Images

Figure CN121000604A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer heterogeneous system, and particularly relates to a method and system for dynamically configuring virtual channels of a network-on-chip based on a heterogeneous system and a medium. BACKGROUND
[0002] With the rapid development of semiconductor technology, the number of computing cores integrated on a single chip continues to grow, and the gradual failure of Moore's Law is pushing computer architecture to evolve from traditional CPU homogeneous chips to CPU-GPU heterogeneous chips. This heterogeneous architecture, with the complex control ability of CPU and the high parallel computing characteristics of GPU, has shown significant advantages in the fields of artificial intelligence and edge computing, but it has also posed a serious challenge to on-chip communication: the traditional bus-based on-chip communication architecture has been unable to meet the needs of efficient data exchange between heterogeneous cores due to severe resource competition and limited bandwidth. The network-on-chip (NoC) has more transmission paths and scalability, and can realize the interconnection between any nodes, and has become a key technology to solve the problem of core communication.
[0003] In a CPU-GPU heterogeneous NoC, the communication between cores presents significant imbalance: the GPU cores, due to the design of high parallel threads, frequently communicate with the memory controller (MC) and the last level cache (LLC), and the traffic is dense, which easily forms a communication hotspot; while the communication demand of CPU cores is low. The traditional static average allocation of routing buffer strategy will cause congestion of GPU peripheral links due to insufficient buffer, while there are a large number of idle resources in CPU peripheral links, which ultimately leads to a decline in system performance and a surge in energy consumption. In addition, the static virtual channel division strategy is difficult to cope with dynamically changing mixed workloads, and the ratio of request messages and reply messages in the NoC of the heterogeneous system dynamically fluctuates, further exacerbating the difficulty of resource allocation.
[0004] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present application, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY
[0005] To have a basic understanding of some aspects of the disclosed embodiments, a brief overview is given below. The summary is not an overall description of the application, nor is it intended to identify key / important elements or delineate the scope of the embodiments, but to serve as a prelude to the detailed description below.
[0006] The application aims to solve the problems of low resource utilization and performance limitation caused by static allocation of virtual channels in CPU-GPU heterogeneous on-chip networks, and provides a virtual channel dynamic configuration method, system and medium based on a heterogeneous system, which adjusts the virtual channel division mode adaptively, matches the dynamic characteristics of network traffic, and improves system performance.
[0007] In some embodiments, the method comprises: Step A, initialization, emptying all messages and registers in the on-chip network; Step B, sampling, first generating a set of virtual channel configuration schemes, setting a sampling time, and for each virtual channel configuration scheme, performing the following operations: Configuration delivery, send the current virtual channel configuration scheme to all routers, and the routers update the input port virtual channel attributes according to the current virtual channel configuration scheme; Performance sampling, real-time collection of performance data within the sampling time, including the number of instructions completed by GPU cores and CPU cores, data latency of each virtual channel, and bandwidth utilization of the on-chip network; Data storage, after the sampling time ends, store the parameters and performance data of the current virtual channel configuration scheme; Step C, optimal configuration scheme selection, read the performance data corresponding to all stored virtual channel configuration schemes, calculate the comprehensive score of each virtual channel configuration scheme based on the performance data, and determine the optimal configuration scheme based on the comprehensive score; Step D, normal operation, deliver the optimal configuration scheme to all routers, and the routers update the virtual channel division according to the optimal configuration scheme, and the on-chip network operates according to the optimal configuration scheme.
[0008] As a further optimization, the comprehensive score of each virtual channel configuration scheme is calculated based on the performance data, and the optimal configuration scheme is determined based on the comprehensive score: , Where is the number of instructions completed by GPU cores and CPU cores, represents the data latency of the i-th virtual channel, is the weight of , is the weight of the data latency of a single virtual channel, and n is the number of virtual channels; and and are determined based on the bandwidth utilization of the on-chip network, and when the bandwidth utilization of the on-chip network is heavy, w1<w2, when the bandwidth utilization of the on-chip network is moderate, w1=w2, and when the bandwidth utilization of the on-chip network is light, w1>w2; The virtual channel configuration scheme with the highest comprehensive score is the optimal configuration scheme.
[0009] As a further optimization, the bandwidth utilization of the network-on-chip is determined by a threshold setting method.
[0010] As a further optimization, the bandwidth utilization of each virtual channel is recorded during the normal operation stage, and the bandwidth of the normal operation stage is compared with the bandwidth utilization recorded in the sampling stage. If the bandwidth utilization of certain virtual channels is light in both the sampling stage and the normal operation stage, the virtual channels are disabled during the next initialization. If the bandwidth utilization of certain virtual channels is heavy in both the sampling stage and the normal operation stage, it is determined whether there are idle virtual channels. If there are idle virtual channels, the idle virtual channels are enabled during the next initialization. If there are no idle virtual channels, the normal initialization operation is performed.
[0011] As a further optimization, the virtual channel configuration scheme is determined based on the number of requested virtual channels. The virtual channel configuration scheme is: Requested virtual channel: Response virtual channel = m: (n-m)), where m is the number of requested virtual channels, n is the total number of virtual channels at each router input port, and 0 < m < n.
[0012] As a further optimization, it further includes steps E, dynamic cycle and exception handling. The normal operation stage ends, and automatically returns to step A to re-sample and evaluate all configuration schemes to adapt to dynamic changes in traffic. If the sampling stage detects data anomalies, a forced reset is triggered immediately to clear the current sampling data and restart the sampling stage. If a deadlock risk occurs in the normal operation stage, the operation is stopped and the initialization stage is restarted.
[0013] In some embodiments, the system comprises: a configuration scheme generation module, a sampling configuration decision module, and a virtual channel configuration module. The configuration scheme generation module is used to generate a set of virtual channel configuration schemes. The sampling configuration decision module samples each configuration scheme in the set of virtual channel configuration schemes to generate an optimal configuration scheme. The virtual channel configuration module modifies the properties of the virtual channels according to the optimal configuration scheme. The sampling configuration decision module includes a configuration reset module, a count monitoring module, a preprocessing module, and a configuration selection module. The configuration reset module is used to perform a reset operation during the initialization stage or system power reset. The reset operation includes resetting the counters of the count monitoring module, clearing the historical sampling data stored in the preprocessing module, and initializing the comparison logic of the configuration selection module. The count monitoring module is used to collect performance data in real time during the sampling stage. The performance data includes the number of instructions completed by the GPU core and the CPU core, the data delay of each virtual channel, and the bandwidth utilization of the network-on-chip. The collected data is stored in the preprocessing module. The preprocessing module stores the data collected by the counting monitoring module and the parameter configuration information in multiple groups of register arrays, each group of register arrays stores the data of a sampling period and the corresponding parameter configuration information, and the collected data is preprocessed; The configuration selection module is configured to read the performance data corresponding to all virtual channel configuration schemes stored in the preprocessing module after the sampling phase ends, and select the optimal configuration scheme. In the normal running phase, the configuration selection module issues the optimal configuration scheme to the router.
[0014] As a further optimization, the preprocessing performed by the preprocessing module on the collected data is to assign weights to the number of instructions completed by the GPU core and the CPU core and the data latency of each virtual channel according to the bandwidth utilization of the network on chip. When the bandwidth utilization of the network on chip is heavy, w1 < w2. When the bandwidth utilization of the network on chip is moderate, w1 = w2. When the bandwidth utilization of the network on chip is light, w1 > w2. w1 is the weight of the number of instructions completed by the GPU core and the CPU core, and w2 is the weight of the data latency of each virtual channel. The process of the configuration selection module selecting the optimal configuration scheme is: calculating the comprehensive score of each virtual channel configuration scheme based on the performance data, and determining the optimal configuration scheme based on the comprehensive score as: , wherein is the number of instructions completed by the GPU core and the CPU core, represents the data latency of the i-th virtual channel, is the weight of , is the weight corresponding to the data latency of a single virtual channel, and n is the number of virtual channels. The virtual channel configuration scheme with the highest comprehensive score is the optimal configuration scheme.
[0015] As a further optimization, a low-power switch is also included to reduce the power consumption of the network on chip. The implementation process is: recording the bandwidth utilization of each virtual channel in the normal running phase, and comparing the bandwidth in the normal running phase with the bandwidth utilization stored in the sampling phase. If the bandwidth utilization of certain virtual channels is light in both the sampling phase and the normal running phase, then disable the virtual channels in the next initialization. If the bandwidth utilization of certain virtual channels is heavy in both the sampling phase and the normal running phase, then determine whether there are idle virtual channels. If there are idle virtual channels, then enable the idle virtual channels in the next initialization. If there are no idle virtual channels, then perform normal initialization operations.
[0016] In some embodiments, the storage medium has program instructions stored therein, which, when executed, perform the method of dynamically configuring virtual channels of a network on chip based on a heterogeneous system as described above.
[0017] The network-on-chip virtual channel dynamic configuration scheme, system and medium provided by the embodiment of the present disclosure can achieve the following technical effects: the network virtual channel division mode is adaptively adjusted according to the current state of the network, so that the network virtual channel is matched with the application program traffic characteristics, and the waste of resources or performance bottleneck caused by a single index is avoided, thereby improving the overall performance of the system. The NoC strategy considering dynamic resource allocation, conflict avoidance and energy optimization when configuring the virtual channel is a comprehensive multi-dimensional evaluation result, and an adaptive dynamic virtual channel division method is proposed.
[0018] The foregoing general description and the following description are merely exemplary and explanatory, and are not intended to limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0019] One or more embodiments are illustrated by way of example, in which elements having the same reference number designate similar elements. The drawings are not intended to be to scale and are not limiting in nature. In the drawings: Figure 1 is a network-on-chip architecture diagram of a heterogeneous system; Figure 2 is a flowchart of the method of embodiment 1; Figure 3 is a principle block diagram of the sampling configuration decision module in embodiment 2; Figure 4 is a principle block diagram of the apparatus of embodiment 3. DETAILED DESCRIPTION
[0020] In order to be able to understand the features and technical contents of the embodiments of the present disclosure more fully, the implementation of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings, which are only used for reference and do not limit the embodiments of the present disclosure. In the following technical description, in order to facilitate explanation, a plurality of details are provided to provide a full understanding of the disclosed embodiments. However, one or more embodiments can still be implemented without these details. In other cases, well-known structures and devices can be simplified to facilitate the drawings.
[0021] The terms "first", "second", and the like in the embodiments of the present disclosure are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion.
[0022] Unless otherwise specified, the term "a plurality of" means two or more.
[0023] In the embodiments of the present disclosure, the character " / " represents an "or" relationship between the preceding and following objects. For example, A / B means A or B.
[0024] The term "and / or" is a description of the association relationship between objects, which means that there can be three relationships. For example, A and / or B means that there are three relationships of A or B, or A and B.
[0025] The term "corresponding" can refer to an association relationship or a binding relationship. A and B correspond to each other means that there is an association relationship or a binding relationship between A and B.
[0026] Embodiment 1 The embodiment discloses a method for dynamically configuring a virtual channel of a network-on-chip based on a heterogeneous system. As shown in the figure, the CPU-GPU-based heterogeneous system network-on-chip architecture adopts a two-dimensional Mesh network structure, and includes GPU cores (indicated by GPU in the figure), CPU cores (indicated by CPU in the figure), last level caches (indicated by L in the figure), and memory controllers (indicated by MC in the figure). Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 The method mainly includes two processes: a dynamic sampling process and a virtual channel configuration process.
[0027] The dynamic sampling process includes three stages: (1) an initialization stage; (2) a sampling stage; and (3) a normal running stage.
[0028] (1) The initialization stage: all messages and registers in the network are emptied to avoid message loss and other abnormalities during dynamic switching of the virtual channel, and to ensure that the network enters a stable state and is ready for subsequent sampling.
[0029] (2) The sampling stage: performance sampling and evaluation are performed on different virtual channel configuration schemes.
[0030] (3) The normal running stage: after the sampling stage ends, the network-on-chip runs according to the optimal configuration obtained by sampling. To adapt to the dynamic changes of the traffic during program running, after the normal running stage ends, the system re-enters the dynamic sampling process to obtain the optimal configuration that adapts to the current network state.
[0031] Virtual channel configuration process: When the router receives the virtual channel configuration information, it changes its own virtual channel attributes according to the configuration scheme.
[0032] like Figure 2 As shown, the specific process of this method is as follows: Step A: Initialization. During the initialization phase or when the system is powered on and reset, the initialization operation is performed to clear all messages and registers in the on-chip network, avoid message loss and other anomalies during dynamic switching of virtual channels, ensure that the network enters a stable state, and prepare for subsequent sampling.
[0033] Specifically, the initialization operation includes clearing the input / output port packets, buffer data, and historical information stored in registers of all routers in the network; resetting the counter of the counting monitoring module to its initial value; and initializing the comparison logic of the configuration selection module (such as resetting the optimal configuration flag).
[0034] Wait for the network to reach a stable state (no residual packets, buffers are free), complete initialization, and prepare for dynamic sampling.
[0035] Step B, Sampling: First, a set of virtual channel configuration schemes is generated. In this embodiment, the virtual channel configuration scheme is determined based on the number of requested virtual channels. The virtual channel configuration scheme is: Request Virtual Channel : Response Virtual Channel = m : (nm)), where m is the number of requested virtual channels, n is the total number of virtual channels for each router input port, and 0 is the maximum virtual channel. <m<n。
[0036] The sampling time for a single virtual channel configuration scheme is set as Tslot, and the normal operation phase time is set as Tn. If Tslot is too short, the collected performance information may not reflect the long-term running status of the program, resulting in the use of a poor-performing configuration scheme during the main operation phase; however, if Tslot is too long, excessive evaluation time will waste network resources, thus reducing performance. A fixed ratio of Tslot:Tn can be selected, and the following operations should be performed for each virtual channel configuration scheme: Configuration distribution: The current virtual channel configuration scheme is sent to all routers, and the routers update the virtual channel attributes of the input ports (dividing the request / response channels) according to the current virtual channel configuration scheme.
[0037] Performance sampling involves collecting performance data in real time during the sampling period. The performance data includes the number of instructions completed by the GPU core and CPU core, the data latency of each virtual channel, and the bandwidth utilization of the on-chip network.
[0038] The number of instructions completed by GPU cores and CPU cores is used to analyze the adaptability of different configurations to the heterogeneous node. The data latency of each virtual channel is the time for data to wait for processing in the router buffer. The high and low delay directly affects the response time of the system, especially in high load conditions, the delay has a higher degree of impact on the system. The bandwidth utilization rate represents the actual use of network bandwidth. Low bandwidth utilization rate may mean redundant resources, and high bandwidth utilization rate may cause network congestion or overload. For each virtual channel, the bandwidth utilization degree is set to light (01), medium (10), and heavy (11), and the bandwidth utilization is recorded using 2 bits. The bandwidth utilization is analyzed to adjust the configuration of the virtual channel.
[0039] Data storage, after the sampling time ends, the parameters and performance data of the current virtual channel configuration scheme are stored.
[0040] Step C, optimal configuration scheme selection, read the stored performance data corresponding to all virtual channel configuration schemes, calculate the comprehensive score of each virtual channel configuration scheme based on the performance data, and determine the optimal configuration scheme based on the comprehensive score.
[0041] In this embodiment, the comprehensive score of each virtual channel configuration scheme is calculated based on the performance data, and the optimal configuration scheme is determined based on the comprehensive score as follows: , wherein is the number of instructions completed by GPU cores and CPU cores, is the data latency of the i-th virtual channel, is the weight of , and is the weight of the data latency of a single virtual channel, and n is the number of virtual channels; the relationship between and is determined based on the bandwidth utilization of the network on chip, when the bandwidth utilization of the network on chip is heavy, w1 The virtual channel configuration scheme with the highest comprehensive score is the optimal configuration scheme.
[0042] Specifically, the bandwidth utilization of the network on chip is determined by the threshold setting method.
[0043] Step D, normal operation, the optimal configuration scheme is issued to all routers, the routers update the virtual channel division according to the optimal configuration scheme, the network on chip operates according to the optimal configuration scheme, and the fixed XY routing mode is used to transmit packets, and the duration is Tn.
[0044] Step E, dynamic cycle and exception handling, the normal running stage ends, and automatically returns to step A to determine whether to close the virtual channel with low bandwidth utilization according to the low-power switch, and re-sample and evaluate all configuration schemes to adapt to dynamic changes in traffic. If the sampling stage detects data exceptions (such as register parity check errors or sampling count jump exceptions), a forced reset is triggered immediately, the current sampling data is emptied, and the sampling stage is restarted. If the normal running stage has a deadlock risk (such as the virtual channel configuration mistakenly triggering m=0 or m=n), the running is stopped, and the initialization stage is restarted.
[0045] When the low-power switch is pressed, the bandwidth utilization of each virtual channel is recorded in the normal running stage, and the bandwidth of the normal running stage is compared with the bandwidth utilization stored in the sampling stage. If the bandwidth utilization of some virtual channels is light in both the sampling stage and the normal running stage, the virtual channel is disabled in the next initialization, thereby reducing power consumption. If the bandwidth utilization of some virtual channels is heavy in both the sampling stage and the normal running stage, it is determined whether there is an idle virtual channel. If there is an idle virtual channel, the idle virtual channel is enabled in the next initialization, thereby reducing the network bandwidth to the lowest level suitable for the current traffic. If there is no idle virtual channel, the normal initialization operation is performed.
[0046] Embodiment 2 The embodiment of the present disclosure provides a virtual channel dynamic configuration system of a network-on-chip based on a heterogeneous system, which comprises a configuration scheme generation module, a sampling configuration decision module and a virtual channel configuration module. The configuration scheme generation module is used to generate a virtual channel configuration scheme set. The sampling configuration decision module samples each configuration scheme in the virtual channel configuration scheme set to generate an optimal configuration scheme. The virtual channel configuration module modifies the virtual channel attributes according to the optimal configuration scheme.
[0047] As shown in Figure 3 The sampling configuration decision module comprises a configuration reset module, a count monitoring module, a preprocessing module and a configuration selection module.
[0048] The configuration reset module is used to start the reset by the configuration selection module to send a trigger signal in the initialization stage or system power reset, and perform the reset operation. The reset operation comprises resetting the counter of the count monitoring module, emptying the historical sampling data stored in the preprocessing module, and initializing the comparison logic of the configuration selection module. In addition, if data exceptions (such as register parity check errors or sampling count jump exceptions) occur in the sampling process, the configuration reset module can receive an error signal and forcibly restart the sampling period to avoid invalid decisions.
[0049] The counting monitoring module is configured to collect performance data in real time in the sampling stage, the performance data including the number of instructions completed by the GPU core and the CPU core, the data delay of each virtual channel, and the bandwidth utilization of the network on chip; and store the collected data to the preprocessing module. The module comprehensively collects and analyzes different performance indicators, and effectively combines these data together to make more accurate virtual channel configuration decisions.
[0050] The preprocessing module stores the data collected by the counting monitoring module and parameter configuration information by using a plurality of register arrays, each register array storing data of a sampling period and corresponding parameter configuration information, and pre-processing the collected data.
[0051] The configuration selection module is configured to read the performance data corresponding to all virtual channel configuration schemes stored in the preprocessing module after the sampling stage ends, and select the optimal configuration scheme. In the normal operation stage, the configuration selection module issues the optimal configuration scheme to the router.
[0052] In the embodiment, the preprocessing of the preprocessing module on the collected data is to assign weights to the number of instructions completed by the GPU core and the CPU core and the data delay of each virtual channel according to the bandwidth utilization of the network on chip. When the bandwidth utilization of the network on chip is heavy, w1 , wherein is the number of instructions completed by the GPU core and the CPU core, represents the data delay of the i-th virtual channel, is the weight of , and is the weight corresponding to the data delay of a single virtual channel, and n is the number of virtual channels. By using the weighted scoring method, the performance data of different dimensions is integrated into one score. The virtual channel configuration scheme with the highest comprehensive score is the optimal configuration scheme.
[0053] The system described in this embodiment also includes a low-power switch to reduce on-chip network power consumption. The implementation process is as follows: during the normal operation phase, the bandwidth utilization of each virtual channel is recorded, and the bandwidth during the normal operation phase is compared with the bandwidth utilization stored during the sampling phase. If the bandwidth utilization of some virtual channels is low during both the sampling and normal operation phases, the virtual channel is disabled during the next initialization. If the bandwidth utilization of some virtual channels is high during both the sampling and normal operation phases, it is determined whether there is an idle virtual channel. If there is an idle virtual channel, the idle virtual channel is enabled during the next initialization. If there is no idle virtual channel, the normal initialization operation is performed.
[0054] Example 3 This embodiment discloses a device, such as Figure 4 As shown, the device includes a processor 304 and a memory 301. Optionally, the device may further include a communication interface 302 and a bus 303. The processor 304, communication interface 302, and memory 301 can communicate with each other via the bus 303. The communication interface 302 can be used for information transmission. The processor 304 can call logical instructions in the memory 301 to execute the on-chip network virtual channel dynamic configuration method based on heterogeneous architecture described in the above embodiment.
[0055] Furthermore, the logic instructions in the aforementioned memory 301 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0056] The memory 301, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 304 executes functional applications and data processing by running the program instructions / modules stored in the memory 301, thereby implementing the on-chip network virtual channel dynamic configuration method based on heterogeneous architecture in the above embodiments.
[0057] The memory 301 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 301 may include high-speed random access memory and may also include non-volatile memory.
[0058] Example 4 This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture.
[0059] The computer readable storage medium described above can be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
[0060] The technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes one or more instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method disclosed in the embodiments of the present disclosure. The aforementioned storage medium can be a non-transitory storage medium, including a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes, or can be a transitory storage medium.
[0061] The above description and drawings sufficiently illustrate the embodiments of the present disclosure to enable one skilled in the art to practice them. Other embodiments can include structural, logical, electrical, process, and other changes. The embodiments represent only a few of the possible variations. Individual components and functions are optional unless explicitly required, and the order of operations can be changed. Parts and features of some embodiments can be included in or replace parts and features of other embodiments. Also, the words used in this application are only used to describe the embodiments and do not limit the scope of protection. As used in the description herein, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms as well. Similarly, as used in this application, the term "and / or" refers to any and all possible combinations of one or more associated listed items. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprises" and the like mean the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, or device that includes the stated element. In this document, each embodiment focuses on the differences from other embodiments, and the same or similar parts between various embodiments can be referred to each other. For the method, product, etc. disclosed in the embodiments, if it corresponds to the method part disclosed in the embodiments, the relevant part can be referred to the description of the method part.
[0062] Those skilled in the art can clearly understand the unit and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner can depend on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to realize the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present disclosure. The skilled person can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0063] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units can only be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms. The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to implement the embodiments. In addition, the functional units in the embodiments of the present disclosure can be integrated in one processing unit, or each unit can be a physically independent unit, or two or more units can be integrated in one unit.
Claims
1. A method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture, characterized in that, include: Step A: Initialize and clear all packets and registers in the on-chip network; Step B, Sampling: First, generate a set of virtual channel configuration schemes, set the sampling time, and perform the following operations for each virtual channel configuration scheme: Configuration distribution: The current virtual tunnel configuration scheme is sent to all routers, and the routers update the virtual tunnel attributes of the input ports according to the current virtual tunnel configuration scheme. Performance sampling involves collecting performance data in real time during the sampling period. The performance data includes the number of instructions completed by the GPU core and CPU core, the data latency of each virtual channel, and the bandwidth utilization of the on-chip network. Data storage: After the sampling period ends, the parameters and performance data of the current virtual channel configuration scheme are stored. Step C: Optimal configuration scheme selection. Read the performance data corresponding to all virtual channel configuration schemes stored in the storage, calculate the comprehensive score of each virtual channel configuration scheme based on the performance data, and determine the optimal configuration scheme based on the comprehensive score. Step D: Normal operation. The optimal configuration scheme is sent to all routers. The routers update the virtual channel division according to the optimal configuration scheme, and the on-chip network operates according to the optimal configuration scheme.
2. The method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture according to claim 1, characterized in that: Based on performance data, a comprehensive score is calculated for each virtual channel configuration scheme. The optimal configuration scheme is determined based on this comprehensive score. , in This refers to the number of instructions completed by the GPU cores and CPU cores. This represents the data delay of the i-th virtual channel. for The weight, The weight corresponding to the data delay of a single virtual channel, where n is the number of virtual channels; Determination of Bandwidth Utilization Based on Network-on-Chip and When the bandwidth utilization of the network-on-chip is heavy, w1 < w2; when the bandwidth utilization of the network-on-chip is medium, w1 = w2; when the bandwidth utilization of the network-on-chip is light, w1 > w2; The virtual channel configuration with the highest overall score is the optimal configuration.
3. The method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture according to claim 2, characterized in that: The bandwidth utilization of the on-chip network is determined by setting a threshold.
4. The method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture according to claim 2, characterized in that, During normal operation, the bandwidth utilization of each virtual channel is recorded, and the bandwidth utilization during normal operation is compared with the bandwidth utilization stored during the sampling phase. If the bandwidth utilization of some virtual channels is low during both the sampling and normal operation phases, the virtual channel is disabled during the next initialization. If the bandwidth utilization of some virtual channels is high during both the sampling and normal operation phases, it is determined whether there are any idle virtual channels. If there are any idle virtual channels, the idle virtual channels are enabled during the next initialization. If there are no idle virtual channels, the normal initialization operation is performed.
5. The method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture according to claim 1, characterized in that, The virtual channel configuration scheme is determined based on the number of requested virtual channels. The virtual channel configuration scheme is: Request Virtual Channel : Response Virtual Channel = m : (nm)), where m is the number of requested virtual channels, n is the total number of virtual channels on each router's input port, and 0 is the maximum virtual channel. <m<n。 6. The method for dynamic configuration of on-chip network virtual channels based on heterogeneous architecture according to claim 1, characterized in that, It also includes step E, dynamic loop and exception handling. After the normal operation phase ends, it automatically returns to step A, and all configuration schemes are re-sampled and evaluated to adapt to dynamic changes in traffic. If an anomaly is detected during the sampling phase, a forced reset is immediately triggered, clearing the current sampling data and restarting the sampling phase. If a deadlock risk occurs during normal operation, stop operation and restart the initialization phase.
7. A dynamic configuration system for on-chip network virtual channels based on heterogeneous architecture, characterized in that: It includes a configuration scheme generation module, a sampling configuration decision module, and a virtual channel configuration module. The configuration scheme generation module generates a set of virtual channel configuration schemes. The sampling configuration decision module samples each configuration scheme in the set of virtual channel configuration schemes to generate the optimal configuration scheme. The virtual channel configuration module modifies the virtual channel attributes according to the virtual channel configuration scheme. The sampling configuration decision module includes a configuration reset module, a counting monitoring module, a preprocessing module, and a configuration selection module; The configuration reset module is used to perform a reset operation during the initialization phase or when the system is powered on and reset; the reset operation includes resetting the counter of the counting monitoring module, clearing the historical sampling data stored in the preprocessing module, and initializing the comparison logic of the configuration selection module; The counting monitoring module is used to collect performance data in real time during the sampling phase. The performance data includes the number of instructions completed by the GPU core and the CPU core, the data delay of each virtual channel, and the bandwidth utilization rate of the on-chip network; and store the collected data in the preprocessing module; The preprocessing module uses multiple groups of register arrays to store the data and parameter configuration information collected by the counting monitoring module. Each group of register arrays stores the data of one sampling period and its corresponding parameter configuration information, and preprocesses the collected data; The configuration selection module is used to read the performance data corresponding to all virtual channel configuration schemes stored in the preprocessing module after the sampling phase ends, select the optimal configuration scheme, and during the normal operation phase, the configuration selection module issues the optimal configuration scheme to the router.
8. The on-chip network virtual channel dynamic configuration system based on heterogeneous architecture according to claim 7, characterized in that: The preprocessing performed by the preprocessing module on the collected data is to assign weights to the number of instructions completed by the GPU core and the CPU core and the data delay of each virtual channel according to the bandwidth utilization rate of the on-chip network. When the bandwidth utilization rate of the on-chip network is heavy, w1 < w2. When the bandwidth utilization rate of the on-chip network is medium, w1 = w2. When the bandwidth utilization rate of the on-chip network is light, w1 > w2; w1 is the weight of the number of instructions completed by the GPU core and the CPU core, and w2 is the weight of the data delay of each virtual channel; the process for the configuration selection module to select the optimal configuration scheme is: calculate the comprehensive score of each virtual channel configuration scheme based on the performance data, and determine the optimal configuration scheme based on the comprehensive score as: , in This refers to the number of instructions completed by the GPU cores and CPU cores. This represents the data delay of the i-th virtual channel. for The weight, The weight corresponding to the data delay of a single virtual channel, where n is the number of virtual channels; The virtual channel configuration scheme with the highest comprehensive score is the optimal configuration scheme.
9. The on-chip network virtual channel dynamic configuration system based on heterogeneous architecture according to claim 7, characterized in that: It also includes a low-power switch to reduce the power consumption of the on-chip network. The implementation process is: record the bandwidth utilization rate of each virtual channel during the normal operation phase, and compare the bandwidth during the normal operation phase with the bandwidth utilization rate stored during the sampling phase. If the bandwidth utilization rates of some virtual channels are light during both the sampling phase and the normal operation phase, disable these virtual channels during the next initialization. If the bandwidth utilization rates of some virtual channels are heavy during both the sampling phase and the normal operation phase, determine whether there are idle virtual channels. If there are idle virtual channels, enable the idle virtual channels during the next initialization. If there are no idle virtual channels, perform a normal initialization operation.
10. A storage medium storing program instructions, characterized in that, When the program instructions are running, they execute the method for dynamically configuring virtual channels of the on-chip network based on a heterogeneous architecture according to any one of claims 1 to 6.