Semi-centralized dynamic task scheduling device and method for data stream architecture

By using a semi-centralized dynamic task scheduling device that combines the advantages of centralized and distributed scheduling, global awareness triggering and on-demand strategies are achieved. This solves the problems of high communication overhead and lack of global awareness in existing technologies, and improves task scheduling efficiency and computing resource utilization.

CN120950196APending Publication Date: 2025-11-14INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510890805.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-14

Smart Images

  • Figure CN120950196A_ABST
    Figure CN120950196A_ABST
Patent Text Reader

Abstract

The invention provides a design scheme of a semi-centralized dynamic task scheduling device of a data flow architecture, the device comprises an on-chip network, an on-chip controller and a plurality of PEs, each PE is used for executing program tasks, the on-chip network is used for realizing communication among the PEs, the on-chip network is configured with a data flow network and a task flow network, the data flow network comprises a one-hop data transmission path between all adjacent PEs, and the task flow network comprises all task transmission paths connected with the PEs crossing multiple hops; when the PE is in an idle state, sending a global perception trigger signal to the on-chip controller, waiting for the on-chip controller to feed back a target PE capable of stealing a task, and stealing the task in the target PE; and the on-chip controller responds to the global perception trigger signal, selects a target PE capable of stealing the task for the PE sending the global perception trigger signal based on a preset selection strategy, and feeds back the selected target PE to the PE sending the global perception trigger signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, more specifically to the field of computer architecture, and more specifically to a semi-centralized dynamic task scheduling device and method with a data flow architecture. Background Technology

[0002] In today's digital age, the rapid development of information technology and the increasing complexity and diversity of modern applications pose unprecedented challenges to computing architectures. This is especially true for applications in critical fields such as artificial intelligence, the Internet of Things, and high-performance computing, which demand extremely high efficiency and flexibility in data processing. Against this backdrop, dataflow architecture, as an efficient data processing paradigm, has gradually become a research and application hotspot. However, the complex characteristics of modern applications place higher demands on the dynamic scheduling capabilities of dataflow architectures. Specifically, modern applications in critical fields often exhibit complex control flow patterns, such as branching or nested loops. These control flow constraints may prevent applications from being divided into program segments with roughly equal computation time. Therefore, to fully utilize multiple processing units (PEs), more complex scheduling mechanisms are needed to dynamically allocate new tasks to PEs. Furthermore, the workload of some tasks can only be determined at runtime, requiring runtime dynamic scheduling to achieve load balancing.

[0003] Dynamic scheduling can be divided into four distinct stages: scheduling triggering, load awareness, scheduling planning and decision-making, and task remapping. Ideal dynamic scheduling requires on-demand real-time triggering, global awareness, globally optimal planning, and low-latency remapping. Existing work has proposed several methods to improve the performance of dataflow architectures through dynamic scheduling, which can be broadly categorized into centralized and distributed dynamic scheduling. In centralized dynamic scheduling, a centralized controller periodically triggers scheduling during program execution, performing globally optimal planning by sensing the workload of all PEs, and then remapping tasks. In distributed dynamic scheduling, idle PEs trigger scheduling on demand. When a PE's local task queue is empty, it randomly selects another PE as a target and steals tasks from its queue, relying on local awareness for scheduling planning and task remapping. However, both paradigms face challenges in achieving efficient dynamic scheduling. Centralized dynamic scheduling requires frequent communication between the controller and PEs, resulting in significant communication overhead. Furthermore, the periodic triggering and passive control of PEs by the central controller make on-demand real-time scheduling difficult to achieve. Distributed dynamic scheduling lacks global awareness, easily getting trapped in local optima, and this problem becomes more pronounced as the PE array size increases.

[0004] In summary, existing task scheduling devices mainly adopt centralized dynamic scheduling schemes and distributed dynamic scheduling schemes. Among them, centralized dynamic scheduling relies excessively on the central controller and is limited by the hardware architecture specifically designed for data flow, while distributed dynamic scheduling relies excessively on distributed autonomous control PEs and lacks global awareness. Therefore, there is an urgent need for a task scheduling device that can schedule tasks on demand.

[0005] It should be noted that the background information presented here is only for illustrating relevant information about the present invention to aid in understanding the technical solutions of the present invention, and does not imply that the relevant information is necessarily prior art. In the absence of evidence indicating that the relevant information was disclosed before the filing date of this invention, the relevant information should not be considered prior art. Summary of the Invention

[0006] Therefore, the purpose of this invention is to overcome the shortcomings of the prior art and provide a semi-centralized dynamic task scheduling device and method with a data flow architecture.

[0007] The objective of this invention is achieved through the following technical solution:

[0008] According to a first aspect of the present invention, a semi-centralized dynamic task scheduling device with a dataflow architecture is proposed for executing a multi-dataflow graph program model. The device includes an on-chip network, an on-chip controller, and multiple program execution units (PEs). Each PE executes a program task. The on-chip network enables communication between PEs. The on-chip network is configured with a dataflow network and a taskflow network. The dataflow network includes one-hop data transmission paths between all adjacent PEs, and the taskflow network includes task transmission paths connecting PEs spanning multiple hops. Each PE is configured to: when idle, send a global awareness trigger signal to the on-chip controller and wait for feedback from the on-chip controller regarding a target PE from which a task can be stolen; and steal the task from the target PE. The on-chip controller is configured to: respond to the global awareness trigger signal, select a target PE from which a task can be stolen based on a preset selection strategy, and feed back the selected target PE to the PE that sent the global awareness trigger signal.

[0009] Preferably, the PE is configured with a queue for storing tasks and is configured to: execute the tasks in the queue sequentially, and when the number of tasks in the queue is less than a preset threshold, configure itself to an idle state.

[0010] Preferably, the preset threshold is 1.

[0011] Preferably, the on-chip controller is configured to: in response to a global awareness trigger signal, perform a global awareness operation to obtain the throughput of each PE; configure PEs with throughput less than a preset throughput threshold as busy; select a target PE that can transfer its own task for each busy PE using a preset selection strategy, and feed back the selected target PE to the corresponding busy PE.

[0012] Preferably, the busy PE is configured to receive a target PE whose tasks can be transferred from the on-chip controller, and transfer some of its tasks to the target PE.

[0013] Preferably, in the on-chip controller, the global awareness operation includes: acquiring the task consumption rate, the task production rate, and the throughput acquired during the last execution of the global awareness operation for each PE at the current moment, and determining the throughput of each PE in the following manner:

[0014]

[0015] in, Represents a PE, Indicates the current time The predicted throughput This indicates the value obtained during the last global awareness operation. The predicted throughput Indicates the current time Task consumption rate Indicates the current time The task production rate is represented by , where represents a weighting coefficient ranging from [0,1], used to adjust... and The weighting ratio.

[0016] Preferably, the preset strategy is configured to select the target PE with the lowest task scheduling cost in the following manner:

[0017]

[0018] in, Indicates the target PE ratio. This represents the set containing all PEs in the device. Represents any PE in the device. This represents a function to obtain the PE corresponding to the minimum task scheduling cost. This represents the task scheduling cost, which includes the cost of dynamic task remapping and the cost of workload imbalance. The task dynamic remapping cost represents the cost of transferring some tasks from a busy PE to a target PE when selecting a transferable task. The required task transfer cost, when selecting a target PE for the stolen task, is represented by the task dynamic remapping cost, which will be derived from... The task transmission cost required to transmit the stolen task to the PE that sends the global awareness trigger signal. This represents the workload imbalance cost, which is expressed when selecting the target PE for transferable tasks. After receiving a portion of the tasks transferred from a busy PE The workload imbalance cost is represented by the load intensity when selecting the target PE for the stolen task. After the PE that was sent the global awareness trigger signal stole part of the task The load strength, This represents the weighting parameter, which controls the weight of workload imbalance costs in task scheduling costs.

[0019] Preferably, the dynamic remapping cost is determined as follows: The task transmission distance is obtained, wherein when selecting a target PE for a transferable task, the task transmission distance is the number of hops between the busy PE and the target PE for the transfer task; when selecting a target PE for a stealable task, the task transmission distance is the number of hops between the PE sending the global awareness trigger signal and the target PE for the stealable task; the dynamic remapping cost is configured based on the obtained task transmission distance, wherein the greater the transmission distance, the higher the dynamic remapping cost.

[0020] Preferably, the workload imbalance cost is determined in the following way:

[0021]

[0022] in, This represents the total number of PEs. This indicates the total number of tasks in the task queue of the target PE, used when selecting a target PE for transferable tasks. This indicates the total number of tasks in the target PE's task queue after the target PE receives a portion of the tasks transferred from a busy PE. This is relevant when selecting a target PE from which tasks can be stolen. This indicates the total number of tasks in the target PE's task queue after the target PE was partially stolen by the PE that sent the global awareness trigger signal. Indicates the first The total number of tasks in the task queue of each PE.

[0023] According to a second aspect of the present invention, a method for executing a multi-dataflow graph program model based on a task scheduling device according to any one of the first aspects of the present invention is provided. The method includes: obtaining a multi-dataflow graph program model to be executed, wherein the model contains multiple dataflow graphs, and each dataflow graph contains multiple tasks; and assigning all tasks in the multi-dataflow graph program model to be executed to PEs in a task scheduling device, so that the task scheduling device executes the multi-dataflow graph program model.

[0024] Compared with the prior art, the advantages of the present invention are as follows:

[0025] This invention proposes a design scheme for a semi-centralized dynamic task scheduling device with a dataflow architecture. This scheme combines the advantages of centralized and distributed dynamic scheduling. It accurately obtains the real-time status information of processing units (PEs) through a global awareness mechanism triggered on demand. For PEs in a busy state, an efficient task migration strategy is adopted to rationally allocate computing resources. For idle PEs, a task stealing strategy is implemented to make full use of idle computing power. This dynamic scheduling mechanism not only effectively reduces unnecessary global awareness overhead, but also significantly improves the efficiency and flexibility of task scheduling, realizes the efficient utilization of computing resources, and provides strong support for the efficient operation of complex applications. Attached Figure Description

[0026] The embodiments of the present invention will be further described below with reference to the accompanying drawings, wherein:

[0027] Figure 1 This is a schematic diagram illustrating the dynamic scheduling phase division according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram illustrating task scheduling classification according to an embodiment of the present invention;

[0029] Figure 3 A schematic diagram of a semi-centralized dynamic task scheduling method based on a data flow many-core architecture according to an embodiment of the present invention;

[0030] Figure 4 This is a schematic diagram of a semi-centralized dynamic scheduling device based on a data flow many-core architecture according to an embodiment of the present invention.

[0031] Figure 5 This is a schematic diagram of a global monitoring controller according to an embodiment of the present invention;

[0032] Figure 6 This is a schematic diagram of a task flow network according to an embodiment of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention is further described in detail below through specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0034] As mentioned in the background section, dynamic scheduling can be divided into four distinct stages: scheduling triggering, load awareness, scheduling planning and decision-making, and task remapping. (See [link to relevant documentation]). Figure 1 Ideal dynamic scheduling requires on-demand real-time triggering, global awareness, globally optimal planning, and low-latency remapping. Existing work has proposed several methods to improve the performance of dataflow architectures through dynamic scheduling. These methods can be divided into centralized and distributed dynamic scheduling. See [link to relevant documentation]. Figure 2 In centralized dynamic scheduling, a centralized controller periodically triggers scheduling during program execution, performing globally optimal planning by sensing the workload of all process partners (PEs) and then remapping tasks. In distributed dynamic scheduling, idle PEs trigger scheduling on demand. When a PE's local task queue is empty, it randomly selects another PE as a target and steals tasks from its queue, relying on local awareness for scheduling planning and task remapping. However, both paradigms face challenges in achieving efficient dynamic scheduling. Centralized dynamic scheduling requires frequent communication between the controller and PEs, resulting in significant communication overhead. Furthermore, periodic triggering and PEs passively controlled by the central controller make on-demand real-time scheduling difficult to achieve. Distributed dynamic scheduling lacks global awareness, is prone to getting trapped in local optima, and this problem becomes more pronounced as the PE array size increases. In summary, existing task scheduling devices mainly adopt centralized and distributed dynamic scheduling schemes. Centralized dynamic scheduling relies excessively on the central controller and is limited by hardware architectures specifically designed for data flow, while distributed dynamic scheduling relies excessively on distributed, autonomously controlled PEs and lacks global awareness.

[0035] To address the aforementioned issues, this invention proposes a design scheme for a semi-centralized dynamic task scheduling device based on a data flow architecture. This scheme divides PEs into busy and idle states based on their throughput and employs a dynamic scheduling scheme that combines centralized and distributed dynamic scheduling. Specifically, this scheme uses an on-demand triggering strategy to activate global awareness to obtain the state of the PEs, adopts a task migration strategy for busy PEs, and employs a task stealing strategy for idle PEs to achieve dynamic task scheduling among PEs.

[0036] According to an embodiment of the present invention, a design scheme for a semi-centralized dynamic task scheduling device with a dataflow architecture is proposed. This device is used to execute a multi-dataflow graph program model. In general, the device includes an on-chip network, an on-chip controller, and multiple physical process controllers (PEs). Each PE executes a program task, and each on-chip network enables communication between PEs. The on-chip network is configured with a dataflow network and a taskflow network. The dataflow network includes one-hop data transmission paths between all adjacent PEs, and the taskflow network includes task transmission paths connecting PEs spanning multiple hops. Each PE is configured to: when idle, send a global awareness trigger signal to the on-chip controller and wait for feedback from the on-chip controller regarding a target PE from which a task can be stolen; and steal the task from the target PE. The on-chip controller is configured to: respond to the global awareness trigger signal, select a target PE from which a task can be stolen based on a preset selection strategy, and feed back the selected target PE to the PE that sent the global awareness trigger signal.

[0037] To better understand the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0038] According to one embodiment of the present invention, two key workload states of a Processing Provider (PE) are defined: an idle state and a busy state. A PE enters the idle state after starting to execute its last task; conversely, when the task generation rate exceeds the task execution consumption rate (i.e., the PE's throughput is insufficient), the PE enters the busy state. The goal of dynamic scheduling is to optimize workload balancing by ensuring that more PEs are in a balanced state, rather than being in a high-load (busy) or low-load (idle) state. To achieve this goal, the present invention proposes two workload balancing strategies: task migration for busy PEs and task stealing for idle PEs. These two workload balancing strategies optimize runtime workload allocation by performing on-demand, real-time task scheduling for idle and busy PEs.

[0039] To more clearly illustrate the two workload balancing strategies adopted in this invention, the following will describe the task stealing strategy for idle PEs and the task migration strategy for busy PEs respectively.

[0040] (1) Task stealing strategy for idle PE

[0041] According to one embodiment of the present invention, each PE is configured with a queue for storing tasks and is configured to: execute tasks in the queue sequentially; when the number of tasks in the queue is less than a preset threshold, configure itself to an idle state, send a global awareness trigger signal to the on-chip controller, and wait for the on-chip controller to provide feedback on the target PE from which tasks can be stolen, and then steal some tasks from the target PE. Preferably, the preset threshold is 1. It should be understood that it takes a certain amount of time for the on-chip controller to receive the global awareness signal and then provide feedback on the target PE from which tasks can be stolen. Therefore, when the queue of a PE is about to be exhausted, it sends a global awareness trigger signal to the on-chip controller. In addition, the preset threshold can be configured by the implementer according to the rate at which the PE executes tasks.

[0042] (2) Task migration strategy for busy PE

[0043] According to one embodiment of the present invention, in this invention, the on-chip controller responds to a global awareness trigger signal, performs a global awareness operation to obtain the throughput of each PE; configures PEs with throughput less than a preset throughput threshold as busy; selects a target PE that can transfer its own tasks for each busy PE using a preset selection strategy, and feeds back the selected target PE to the corresponding busy PE; the busy PE receives the target PE that can transfer its own tasks from the on-chip controller and transfers part of its own tasks to the target PE.

[0044] It should be noted that in the dynamic data flow-driven execution model, maintaining throughput balance is crucial for achieving workload balancing. The mismatch between task production rate and task consumption rate can be monitored through the instruction counter of each PE and detected by the controller through global awareness. If the task production rate consistently exceeds the task consumption rate, the task queue of that PE will remain fully loaded, indicating a throughput bottleneck. Therefore, predicting in advance whether a PE has a throughput bottleneck is crucial for achieving workload balancing in the task scheduling device. According to one embodiment of the present invention, the throughput of each PE is obtained through global awareness operation to predict whether the PE is busy (i.e., whether a throughput bottleneck exists). Specifically, the task consumption rate, task production rate, and throughput obtained during the last global awareness operation of each PE are obtained, and the throughput of each PE is determined in the following manner:

[0045] ,

[0046] in, Represents a PE, Indicates the current time The predicted throughput This indicates the value obtained during the last global awareness operation. The predicted throughput Indicates the current time Task consumption rate Indicates the current time The task production rate is represented by , where represents a weighting coefficient ranging from [0,1], used to adjust... and The weighting ratio.

[0047] According to one embodiment of the present invention, the present invention selects target PEs for stealing tasks from idle PEs (PEs sending global awareness trigger signals) and selects target PEs for transferring tasks from busy PEs with the goal of minimizing costs. It should be understood that load imbalance leads to a decrease in the performance of the task scheduling device, and dynamic remapping also introduces additional overhead. To effectively balance the overhead of dynamic remapping and the adverse effects of load imbalance, the present invention proposes a cost-minimizing task stealing / transfer mechanism. This mechanism takes the dynamic mapping cost of tasks and the load imbalance cost as the main factors affecting task scheduling costs. For a single task stealing or transfer, the controller calculates the score (task scheduling cost) of each PE in the array as the target PE for stealing or transferring tasks, and selects the PE with the lowest score (lowest task scheduling cost) as the target PE. Specifically, the task scheduling cost is calculated as follows:

[0048]

[0049] in, Indicates the target PE ratio. This represents the set containing all PEs in the device. Represents any PE in the device. This represents a function that retrieves the PE (Execution Point) that minimizes task scheduling cost. This represents the task scheduling cost, which includes the cost of dynamic task remapping and the cost of workload imbalance. The task dynamic remapping cost represents the cost of transferring some tasks from a busy PE to a target PE when selecting a transferable task. The required task transfer cost, when selecting a target PE for the stolen task, is represented by the task dynamic remapping cost, which will be derived from... The task transmission cost required to transmit the stolen task to the PE that sends the global awareness trigger signal. This represents the workload imbalance cost, which is expressed when selecting the target PE for transferable tasks. After receiving a portion of the tasks transferred from a busy PE The workload imbalance cost is represented by the load intensity when selecting the target PE for the stolen task. After the PE that was sent the global awareness trigger signal stole part of the task The load strength, This represents the weighting parameter, which controls the weight of workload imbalance costs in task scheduling costs.

[0050] According to one embodiment of the invention, in this invention, the dynamic remapping cost is the data transmission resource consumption required to transfer a task from one PE to another. The dynamic remapping cost is calculated as follows: obtaining the task transmission distance, wherein when selecting a target PE for a transferable task, the task transmission distance is the number of hops between the busy PE and the target PE for the transferred task; when selecting a target PE for a stealable task, the task transmission distance is the number of hops between the PE sending the global awareness trigger signal and the target PE for the stealable task; configuring the dynamic remapping cost based on the obtained task transmission distance, wherein the larger the transmission distance, the higher the dynamic remapping cost.

[0051] To facilitate the calculation of dynamic remapping costs in this invention, the following description will be provided with specific examples:

[0052] The distance from a busy PE or a PE sending a global awareness trigger signal to the target PE is a key factor in evaluating the cost of dynamic task mapping. In this example, other PEs on the array are divided into neighboring PEs (PEs within one hop distance) and nearby PEs (PEs with a distance greater than one hop but less than HPC). max PE at long distance and PE at long distance (greater than HPC) max (distance PE), where HPC max This indicates the maximum number of PEs that can be skipped for task transfer within one execution cycle of a PE. The dynamic task mapping costs for the three distances of PEs mentioned above are respectively R. neigh , 𝐷 nearby and 𝐷 remote Among them, due to the idle PE exceeding HPC max The PE cannot perform point-to-point bypass scheduling, thus significantly increasing the cost of dynamic remapping. In this example, 𝐷nearby is only slightly larger than 𝐷. neigh , 𝐷 remote Significantly greater than 𝐷 neigh To avoid task transfer between long-distance PEs, the value of λ affects the load imbalance cost. A larger λ assigns more weight to the load balancing objective, ensuring higher performance for the task scheduler after task theft or transfer, while a smaller λ primarily focuses on reducing remapping overhead and saving energy. Preferably, λ is the optimal value. The value is configured as This configuration means that if the active workload of the target PE exceeds the total active workload of all other PEs after a task transfer or task theft, then the target PE will be prioritized as the final target PE for task theft or task transfer.

[0053] According to one embodiment of the present invention, the workload imbalance cost is used as a standard to measure the workload balance of the task scheduling device after task theft or task transfer. It should be noted that when some PEs have a large number of unexecuted tasks, while other PEs have few tasks or even no tasks to be executed, the task scheduling device is considered to be in a state of workload imbalance. The present invention uses methods such as transferring tasks from busy PEs to other PEs or having idle PEs actively steal tasks from busy PEs to schedule tasks in PEs, in order to balance the operating load between PEs. Therefore, the present invention needs to calculate the workload imbalance cost of the task scheduling device after task theft or task transfer to evaluate the effect of the selected target PE on balancing the operating load between PEs. The calculation method of the workload imbalance cost is as follows:

[0054] ,

[0055] in, This represents the total number of PEs. This indicates the total number of tasks in the task queue of the target PE, used when selecting a target PE for transferable tasks. This indicates the total number of tasks in the target PE's task queue after the target PE receives a portion of the tasks transferred from a busy PE. This is relevant when selecting a target PE from which tasks can be stolen. This indicates the total number of tasks in the target PE's task queue after the target PE was partially stolen by the PE that sent the global awareness trigger signal. Indicates the first The total number of tasks in the task queue of each PE.

[0056] According to one embodiment of the present invention, a semi-centralized dynamic task scheduling method is proposed, see [link to relevant documentation]. Figure 3The method includes: S1, On-demand triggering. Centralized dynamic scheduling is typically triggered periodically by a centralized controller during runtime, while decentralized dynamic scheduling is typically triggered on demand by idle PEs. Unlike previous methods, this method employs a triggering mechanism jointly driven by the controller and PEs. To achieve better load balancing, tasks are dynamically scheduled not only for idle PEs (low load) but also for busy PEs (high load). S2, Global awareness and planning. Centralized dynamic scheduling relies on the controller's global awareness for globally optimal planning, while decentralized dynamic scheduling uses the local awareness of idle PEs for scheduling planning. Global optimal planning is often more effective than local optimal planning; however, the communication overhead of global awareness is significantly higher than that of local awareness. Similar to centralized dynamic scheduling, this method also relies on the controller's global awareness and globally optimal planning. However, the method of this invention reduces unnecessary global awareness by triggering global awareness on demand by idle PEs, rather than by the controller triggering it periodically (which is often very frequent), thereby reducing communication overhead. S3, Low-latency remapping. Both centralized and decentralized dynamic scheduling face the challenges of high latency and inefficient remapping. Unlike static scheduling, dynamic scheduling requires task remapping between PEs during execution, which demands low-latency and flexible point-to-point task scheduling capabilities. However, current dataflow architectures are often limited by hardware architectures dedicated to dataflow, which cannot support low-latency point-to-point communication.

[0057] According to an embodiment of the present invention, the present invention proposes a design scheme for a semi-centralized dynamic task scheduling device based on the above-described data flow architecture. This design utilizes a data flow many-core architecture semi-centralized dynamic scheduling device. See [link to relevant documentation]. Figure 4 The device mainly includes: a semi-autonomous PE array, on-chip storage, a globally monitored on-chip controller, a data flow network supporting data-driven execution, and a task flow network supporting point-to-point bypass transmission. The PE array is configured to run computer programs to execute the aforementioned semi-centralized dynamic scheduling method of the data flow many-core processor; the globally monitored on-chip controller is responsible for global load awareness and globally optimal scheduling planning decisions; the data flow network is responsible for data interaction between the PE array and the on-chip storage; the task flow network is responsible for low-latency runtime task remapping; and the on-chip storage is further divided into a data buffer and an instruction buffer, responsible for storing the data and instructions required during program execution, respectively.

[0058] According to one embodiment of the present invention, each PE in the semi-autonomous PE array consists of three key modules: a task management unit, a storage unit, and a functional unit. The task management unit includes a task controller responsible for managing workload remapping, such as task stealing and migration, and an instruction counter for recording the remaining active contexts and instructions within the processing unit. These components are crucial for achieving on-demand dynamic scheduling. Once the number of remaining active contexts reaches zero, the processing unit transitions to an idle state and proactively sends a workload reallocation request to the globally monitored controller via the task controller. Upon receiving this signal, the globally monitored controller begins global awareness to select a suitable PE for task stealing. The storage unit includes a data RAM for storing data and an instruction RAM for storing instructions. During the initialization phase before execution, each PE retrieves necessary instructions and configuration information from the instruction buffer, stores the instructions in the instruction RAM within the PE, and configures the data RAM under the control of the task controller. The functional unit has a computational pipeline for performing arithmetic and logical operations and is also equipped with a load / store stream for transferring data between the data buffer and the PE. It also includes a flow unit for feeding data into downstream processing units. The execution of a Data Flow Graph (DFG) node is divided into four sequential phases: loading, computation, flow, and storage.

[0059] According to one embodiment of the present invention, see Figure 5 The on-chip controller (OCC) for global monitoring comprises four key modules: a control register accessible to the host core for interaction between the PE array (actually an accelerator) and the host core; a configuration information controller for initializing configuration information and instructions; a PE monitor for managing global workload awareness; and a task scheduler for planning task stealing / migrating. Upon receiving a program start signal from the host core via the control register, the configuration controller instructs the instruction buffer to dispatch instructions and configuration information to each PE. During execution, the PE monitor responds to stealing requests from idle PEs and initiates global awareness. Based on the global awareness results, the task scheduler selects idle PEs as task stealing targets, selects busy PEs, and determines suitable task migration target PEs.

[0060] According to one embodiment of the present invention, the present invention also uses a reconfigurable single-cycle multi-hop interconnect to implement a task flow network supporting point-to-point bypass transmission, so as to achieve low latency and flexible dynamic task remapping. See [link to relevant documentation]. Figure 6The task flow network provides a single-cycle data path from the source PE to the target PE without requiring additional fast physical direct connections. Furthermore, the task flow network utilizes shared crossbar switches and asynchronously operating links to support multi-hop transmission within a single cycle. At the heart of the interconnect are crossbar switches, each output driven by a clockless repeater that can be configured to asynchronously skip signals to the next hop (North, South, East, West, or Center) or stop and receive incoming data. The task flow network enables data transmission across multiple PEs within a single cycle.

[0061] According to an embodiment of the present invention, a program execution method based on a semi-centralized dynamic scheduling device of the above-described data flow many-core architecture is proposed. The method includes: obtaining a multi-data flow graph program model to be executed, wherein the model contains multiple data flow graphs, and each data flow graph contains multiple tasks; allocating all tasks in the multi-data flow graph program model to be executed to PEs in a task scheduling device, so that the task scheduling device executes the multi-data flow graph program model.

[0062] According to one embodiment of the present invention, the present invention combines the advantages of centralized dynamic scheduling and distributed dynamic scheduling. It accurately obtains the real-time status information of processing units (PEs) through a global awareness mechanism triggered on demand. For PEs in a busy state, an efficient task migration strategy is adopted to rationally allocate computing resources. For idle PEs, a task stealing strategy is implemented to make full use of idle computing power. This dynamic scheduling mechanism not only effectively reduces unnecessary global awareness overhead, but also significantly improves the efficiency and flexibility of task scheduling, realizes the efficient utilization of computing resources, and provides strong support for the efficient operation of complex applications.

[0063] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.

[0064] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A semi-centralized dynamic task scheduling device with a dataflow architecture for executing a multi-dataflow graph program model, wherein, The device includes an on-chip network, an on-chip controller, and multiple physical processors (PEs). Each PE is used to execute program tasks, and the on-chip network is used to enable communication between the PEs. Its features include: The on-chip network is configured with a data flow network and a task flow network. The data flow network includes a one-hop data transmission path between all adjacent PEs, and the task flow network includes a task transmission path that connects PEs that span multiple hops. The PE is configured to: when in an idle state, send a global awareness trigger signal to the on-chip controller and wait for the on-chip controller to provide feedback on the target PE from which the task can be stolen, and steal the task from the target PE. The on-chip controller is configured to: in response to a global awareness trigger signal, select a target PE that can steal the task for the PE that sends the global awareness trigger signal based on a preset selection strategy, and feed back the selected target PE to the PE that sends the global awareness trigger signal.

2. The apparatus according to claim 1, characterized in that, The PE is configured to have a queue for storing tasks and is configured to execute the tasks in the queue sequentially. When the number of tasks in the queue is less than a preset threshold, it will be configured to be in an idle state.

3. The apparatus according to claim 2, characterized in that, The preset threshold is 1.

4. The apparatus according to claim 1, characterized in that, The on-chip controller is configured to: In response to the global awareness trigger signal, perform global awareness operations to obtain the throughput of each PE; Configure PEs with throughput less than a preset throughput threshold to be in a busy state; A preset selection strategy is used to select a target PE that can transfer its own task to each busy PE, and the selected target PE is fed back to the corresponding busy PE.

5. The apparatus according to claim 4, characterized in that, The busy PE is configured to receive feedback from the on-chip controller of the target PE that can transfer its own tasks, and transfer some of its own tasks to the target PE.

6. The apparatus according to claim 4, characterized in that, In the on-chip controller, the global awareness operation includes: Obtain the current task consumption rate, current task production rate, and throughput of each PE at the current moment, and determine the throughput of each PE in the following way: in, Represents a PE, Indicates the current time The predicted throughput This indicates the value obtained during the last global awareness operation. The predicted throughput Indicates the current time Task consumption rate Indicates the current time The task production rate is represented by , where represents a weighting coefficient ranging from [0,1], used to adjust... and The weighting ratio.

7. The apparatus according to any one of claims 1 or 4, characterized in that, The preset strategy is configured to select the target PE with the lowest task scheduling cost in the following manner: in, Indicates the target PE ratio. This represents the set containing all PEs in the device. Represents any PE in the device. This represents a function to obtain the PE corresponding to the minimum task scheduling cost. This represents the task scheduling cost, which includes the cost of dynamic task remapping and the cost of workload imbalance. The task dynamic remapping cost represents the cost of transferring some tasks from a busy PE to a target PE when selecting a transferable task. The required task transfer cost, when selecting a target PE for the stolen task, is represented by the task dynamic remapping cost, which will be derived from... The task transmission cost required to transmit the stolen task to the PE that sends the global awareness trigger signal. This represents the workload imbalance cost, which is expressed when selecting the target PE for transferable tasks. After receiving a portion of the tasks transferred from a busy PE The workload imbalance cost is represented by the load intensity when selecting the target PE for the stolen task. After the PE that was sent the global awareness trigger signal stole part of the task The load strength, This represents the weighting parameter, which controls the weight of workload imbalance costs in task scheduling costs.

8. The apparatus according to claim 7, characterized in that, The cost of dynamic remapping is determined as follows: The task transmission distance is obtained. When selecting the target PE of the transferable task, the task transmission distance is the number of hops between the busy PE and the target PE of the transferable task. When selecting the target PE of the stealable task, the task transmission distance is the number of hops between the PE that sends the global awareness trigger signal and the target PE of the stealable task. The dynamic remapping cost is configured based on the acquired task transmission distance, where the greater the transmission distance, the higher the dynamic remapping cost.

9. The apparatus according to claim 7, characterized in that, The cost of workload imbalance is determined as follows: in, This represents the total number of PEs. This indicates the total number of tasks in the task queue of the target PE, used when selecting a target PE for transferable tasks. This indicates the total number of tasks in the target PE's task queue after the target PE receives a portion of the tasks transferred from a busy PE. This is relevant when selecting a target PE from which tasks can be stolen. This indicates the total number of tasks in the target PE's task queue after the target PE was partially stolen by the PE that sent the global awareness trigger signal. Indicates the first The total number of tasks in the task queue of each PE.

10. A method for executing a multi-dataflow graph program model based on the task scheduling device according to any one of claims 1-9, characterized in that, The method includes: Obtain the multi-dataflow graph program model to be executed, wherein the model contains multiple dataflow graphs, and each dataflow graph contains multiple tasks; All tasks in the multi-dataflow graph program model to be executed are assigned to PEs in the task scheduler so that the task scheduler can execute the multi-dataflow graph program model.