WO2022111466A1 - Task scheduling method, control method, electronic device and computer-readable medium - Google Patents

Task scheduling method, control method, electronic device and computer-readable medium Download PDF

Info

Publication number
WO2022111466A1
WO2022111466A1 PCT/CN2021/132400 CN2021132400W WO2022111466A1 WO 2022111466 A1 WO2022111466 A1 WO 2022111466A1 CN 2021132400 W CN2021132400 W CN 2021132400W WO 2022111466 A1 WO2022111466 A1 WO 2022111466A1
Authority
WO
WIPO (PCT)
Prior art keywords
core
cluster
core cluster
task
target
Prior art date
Application number
PCT/CN2021/132400
Other languages
French (fr)
Chinese (zh)
Inventor
吴臻志
祝夭龙
Original Assignee
北京灵汐科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京灵汐科技有限公司 filed Critical 北京灵汐科技有限公司
Publication of WO2022111466A1 publication Critical patent/WO2022111466A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5066Algorithms for mapping a plurality of inter-dependent sub-tasks onto a plurality of physical CPUs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • G06F15/7825Globally asynchronous, locally synchronous, e.g. network on chip
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a control method for task scheduling, a task scheduling method, a task scheduling method, an electronic device, a computer-readable medium, and a computer program product.
  • a many-core system can be composed of at least one chip, each chip has multiple computing units, and the smallest computing unit in each chip that can be independently scheduled and has complete computing power is called a core.
  • multiple cores can work together, and each core can run program instructions independently, using parallel computing capabilities to speed up program execution and provide multitasking capabilities.
  • the present disclosure provides a control method for task scheduling based on a many-core system, a task scheduling method, a task scheduling method, an electronic device, a computer-readable medium, and a computer program product.
  • an embodiment of the present disclosure provides a task scheduling control method, which is applied to the core of a many-core system, including: performing load detection on at least one core cluster of the many-core system, and determining whether the detected core cluster is in the core cluster.
  • There is a target core cluster and the target core cluster is at least one of the core clusters whose task allocation needs to be adjusted; if the target core cluster exists, the target core cluster is controlled to adjust the task allocation according to the load detection result ; wherein the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters.
  • an embodiment of the present disclosure provides a task scheduling method, which is applied to a first control core of a first core cluster of a many-core system.
  • the task scheduling method includes: performing load detection on the first core cluster, determining the Whether the first core cluster is the target core cluster, and the target core cluster is the core cluster whose task allocation needs to be adjusted; if the first core cluster is the target core cluster, according to the load of the first core cluster As a result of the detection, the task allocation of the first core cluster is adjusted; wherein, the many-core system includes multiple cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters , the first core cluster is one of at least one of the core clusters.
  • an embodiment of the present disclosure provides a task scheduling method, which is applied to the core of a many-core system, including: sending a request signaling for acquiring task information of a task processed by a target core cluster, so as to acquire the task information; the task information, form a second core cluster for replacing the target core cluster, and the core is the second control core of the second core cluster; run the target core on the second core cluster
  • the task of cluster processing wherein, the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, the many-core system includes at least one of the core clusters, and the target core cluster is the task allocation that needs to be adjusted of the core cluster.
  • an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, implements at least one of the following methods: the method described in the first aspect of the embodiment of the present disclosure A control method for task scheduling; the task scheduling method according to the second aspect of the embodiment of the present disclosure; and the task scheduling method according to the third aspect of the embodiment of the present disclosure.
  • embodiments of the present disclosure provide an electronic device, including: a plurality of cores; and a network-on-chip configured to exchange data and external data among the plurality of cores; One or more instructions that are executed by one or more of the cores to enable the one or more of the cores to perform at least one of the following methods: The control method for task scheduling described above; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a computer program product, which, when running on a computer, causes the computer to execute at least one of the following methods: the task scheduling described in the first aspect of the embodiment of the present disclosure A control method; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
  • load detection can be performed on each core cluster in the many-core system, and when there is a core cluster that needs to adjust the task allocation, the core cluster is controlled to adjust the task allocation according to the load detection result, thereby improving the flexibility of task processing in the many-core system. improve the utilization efficiency of computing resources in many-core systems.
  • FIG. 1 is a flowchart of a control method for task scheduling in an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a many-core system in an embodiment of the present disclosure
  • FIG. 3 is a flowchart of a task scheduling method in an embodiment of the present disclosure
  • FIG. 5 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
  • Fig. 7 is the composition block diagram of a kind of core in the embodiment of the present disclosure.
  • FIG. 8 is a block diagram of an electronic device in an embodiment of the present disclosure.
  • Static scheduling maps a certain part of the algorithm to the core of the chip, and each core only runs the mapped part of the algorithm, resulting in poor flexibility of task processing in many-core systems.
  • a core cluster is dynamically formed according to computing tasks.
  • the core cluster includes multiple cores, and the many-core system may have multiple cores.
  • Core clusters each core cluster performs corresponding computing tasks.
  • each cluster of cores typically performs computational tasks in a pipelined fashion.
  • the processing tasks change such as a sudden increase in business flow, some core clusters may be overloaded.
  • the reduction of the processing efficiency of a certain core cluster will lead to a reduction of the processing efficiency of the entire many-core system.
  • FIG. 1 is a flowchart of a control method for task scheduling in an embodiment of the present disclosure. 1, the control method includes:
  • step S110 load detection is performed on at least one core cluster of the many-core system, and it is determined whether there is a target core cluster in the detected core cluster, and the target core cluster is at least one of the core clusters that needs to adjust the task allocation the core cluster;
  • step S120 when the target core cluster exists, control the target core cluster to adjust task allocation according to the load detection result
  • the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters.
  • FIG. 2 is a schematic diagram of a many-core system in an embodiment of the present disclosure.
  • the many-core system includes a first core and a second core, and the first core and the second core have different control capabilities and different functions in the many-core system.
  • the first core may be the control core of the many-core system, which is used to receive instructions and tasks of the external system; control each core in the many-core system to perform processing tasks and the like.
  • a plurality of second cores are formed into a core cluster (as shown by the dotted box in FIG. 2 ). There may be multiple core clusters in a many-core system, and each core cluster performs a corresponding computing task.
  • the control core is used to receive the first core or other components (eg Many-core system synchronizers, external devices, etc.) instructions and tasks; split tasks; control each slave core in the core cluster to execute subtasks, etc.; slave cores are used to execute corresponding subtasks.
  • the present disclosure does not limit the specific functional classification of the cores and the types of tasks performed by each core.
  • the high-level control core in the many-core system performs load detection on each core cluster in the many-core system by performing steps S110 to S120, and when there are core clusters that need to adjust task allocation, the control needs The core cluster that adjusts the assignment of tasks adjusts the assignment of tasks.
  • the high-level control core that executes steps S110 to S120 may be the first core in the many-core system as shown in FIG. 2 , or may be any one of the many-core systems independent of each core cluster core. This embodiment of the present disclosure does not limit this.
  • the load detection refers to determining whether the tasks processed by the core cluster match the computing resources of the core cluster.
  • the result of the load detection may be that the target core cluster is overloaded, and adjusting the task allocation in step S120 may be to increase the number of cores in the target core cluster to increase the computing resources of the target core cluster; the result of the load detection may also be that the target core cluster computing resources Excessive, adjusting the task allocation in step S120 may be to reduce the number of cores in the target core cluster to save the computing resources of the many-core system and improve the utilization rate of the computing resources of the many-core system; the load detection result can also be the core cluster processing task and The computing resources of the core cluster are matched. This embodiment of the present disclosure does not limit this.
  • load detection is performed on each core cluster in the many-core system through a high-level control check, and when there are core clusters that need to adjust the task allocation, the core cluster that needs to adjust the task allocation is controlled to adjust the task.
  • Allocation can dynamically increase computing resources for overloaded core clusters, and can timely recycle computing resources of core clusters with excess computing resources, thereby improving the flexibility of task processing in many-core systems and reducing the processing efficiency of some core clusters.
  • the overall processing efficiency of the many-core system is reduced, and the utilization efficiency of the computing resources of the many-core system is improved at the same time.
  • the high-level control core finds that the core cluster is overloaded or has excessive computing resources through load detection, it determines that the core cluster needs to adjust task allocation.
  • step S110 includes:
  • the core cluster with overload or excess computing resources is the target core cluster.
  • each core cluster processes tasks in a pipeline manner
  • multiple core clusters have a uniform synchronization period.
  • the synchronization period is determined by the runtime of the longest-running core cluster. The longer the run time, the higher the load on the core cluster.
  • it may be determined whether there is an overloaded core cluster according to the relationship between the running durations of multiple core clusters within a certain period of time.
  • the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system includes:
  • the candidate target core cluster is the core cluster with the longest running time in N synchronization cycles, where N is a natural number greater than or equal to a predetermined number;
  • the candidate target core cluster exists, it is determined that there is an overloaded core cluster; wherein the candidate target core cluster is an overloaded core cluster.
  • a predetermined period of time may include multiple synchronization cycles (the number is greater than or equal to N). If there is a candidate target core cluster that has the longest running time in the N synchronization cycles within the predetermined time period, it can be It is determined that there are overloaded core clusters, and N is a natural number greater than or equal to a predetermined number. On the contrary, the judgment can be continued after the end of the next predetermined time period.
  • a predetermined synchronization period may be preset, and when the running duration of any one core cluster exceeds the predetermined synchronization period, it means that the core cluster is overloaded.
  • the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system includes:
  • the predetermined synchronization period can be set as: the time required for each core cluster to process a computing task in one phase during normal computing, and when the predetermined synchronization period is reached, each core in the core cluster can be phased Switch to the next phase.
  • the core cluster if the running duration of a phase of all or part of the cores in the core cluster exceeds a predetermined synchronization period, the core cluster may be considered to be overloaded.
  • the present disclosure does not limit the specific value of the predetermined synchronization period.
  • multiple overloaded core clusters may also be determined from the core clusters of the many-core system, which is not limited in the present disclosure.
  • a solution for adjusting the task allocation of the target core cluster without stopping is provided.
  • step S120 includes:
  • an idle core can be dynamically applied for, a new core cluster (called the second core cluster) can be rebuilt, and the target core cluster can be replaced by the second core cluster;
  • the second core cluster there is no need to suspend the operation of the target core cluster.
  • the target core cluster may be disbanded, and the cores in the target core cluster become idle cores, thereby releasing computing resources.
  • the high-level control core determines the control core of the second core cluster (referred to as the second control core), and the second core cluster interacts with the high-level control core and the control core of the target core cluster , to complete the formation of the second core cluster.
  • task information of tasks processed by the target core cluster may be stored in the control core of the target core cluster; task information of tasks processed by each core cluster may also be stored in the high-level control core. This embodiment of the present disclosure does not limit this.
  • the second control core may obtain task information of the task processed by the target core cluster from the control core of the target core cluster, and may also obtain task information of the task processed by the target core cluster from the high-level control core. This embodiment of the present disclosure also does not limit this.
  • the task information of the task processed by the target core cluster is transmitted to the second control core in response to the request signaling by the second control core to obtain the task information of the task processed by the target core cluster nuclear.
  • the task information of the task processed by the target core cluster is not limited.
  • the task information may include configuration information of each core in the second core cluster, and may also include information representing storage content of each core in the second core cluster.
  • the target core cluster can be replaced by the second core cluster, so as to realize the process of adjusting the task allocation of the target core cluster, thereby improving the efficiency of the adjustment.
  • FIG. 3 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a task scheduling method, which is applied to a first control core of a first core cluster of a many-core system.
  • Task scheduling methods include:
  • step S210 load detection is performed on the first core cluster to determine whether the first core cluster is a target core cluster, and the target core cluster is a core cluster that needs to adjust task allocation;
  • step S220 when the first core cluster is the target core cluster, adjust the task allocation of the first core cluster according to the load detection result of the first core cluster;
  • the many-core system includes a plurality of cores, at least one of the cores constitutes the core cluster, the many-core system includes at least one of the core clusters, and the first core cluster is one of the at least one core cluster.
  • any one core cluster (referred to as the first core cluster) in the many-core system performs load detection by executing steps S210 to S220 through its control core (referred to as the first control core).
  • the core cluster needs to adjust the task allocation, the task allocation of the first core cluster is adjusted. In this way, the load detection and task adjustment of each core cluster in the many-core system can be realized.
  • the load detection refers to determining whether the tasks processed by the core cluster match the computing resources of the core cluster.
  • the result of the load detection may be that the target core cluster is overloaded, and adjusting the task allocation in step S220 may be to increase the number of cores in the target core cluster to increase the computing resources of the target core cluster; the result of the load detection may also be that the target core cluster computing resources Excessive, in step S220, adjusting the task allocation can be to reduce the number of cores in the target core cluster to save the computing resources of the many-core system and improve the utilization rate of the computing resources of the many-core system; the load detection result can also be the core cluster processing task and The computing resources of the core cluster are matched. This embodiment of the present disclosure does not limit this.
  • the control of the core cluster in the many-core system checks the load of the core cluster, and adjusts the task allocation of the core cluster when the core cluster needs to adjust the task allocation, so that when the core cluster is overloaded Dynamically increase computing resources, and can release computing resources in time when the core cluster computing resources are excessive, thereby improving the flexibility of many-core system task processing and reducing the overall processing efficiency of the many-core system due to the reduction of the processing efficiency of some core clusters. , while improving the utilization efficiency of computing resources in many-core systems.
  • the first control core finds that the first control core is overloaded or has excess computing resources through load detection, it is determined that the first core cluster is the target core cluster, and task allocation needs to be adjusted.
  • step S210 includes:
  • the first core cluster When the first core cluster is overloaded or has excess computing resources, it is determined that the first core cluster is the target core cluster.
  • the first core cluster may be considered overloaded; otherwise, the first core cluster is overloaded. If the time required by each core in the core cluster to process a computing task of a phase is significantly lower than the average value of the cores in each core cluster, it can be considered that the first core cluster has excess computing resources.
  • the first core cluster if the first core cluster is overloaded or has excess computing resources, it may be determined that the first core cluster is the target core cluster, and task allocation needs to be adjusted. It should be understood that those skilled in the art can set specific judgment conditions for overload or excess computing resources according to actual situations, which are not limited in the present disclosure.
  • the synchronization period is determined by the runtime of the core cluster with the largest runtime. The longer the runtime, the higher the load on the core cluster. As an optional implementation manner, it may be determined whether the target core cluster is overloaded according to the relationship between the running duration of the target core cluster and the running durations of other core clusters within a certain period of time.
  • the step of determining whether the first core cluster is overloaded includes:
  • the running durations of multiple synchronization cycles in the predetermined time period determine the number of synchronization cycles with the longest running duration of the first core cluster in at least one of the core clusters;
  • the predetermined time period may include multiple synchronization cycles (the number is greater than or equal to N), and the running durations of the multiple synchronization cycles of the first core cluster in the predetermined time period may be determined first;
  • the running duration is sorted with the running duration of the synchronization cycle of each core cluster, and the synchronization cycle with the longest running duration is determined. If there is a synchronization period with the longest running time in the first core cluster, and the number N exceeds a predetermined value, it can be determined that the first core cluster is overloaded.
  • a predetermined synchronization period may be preset, and when the running duration of the target core cluster exceeds the predetermined synchronization period, it means that the target core cluster is overloaded.
  • the step of determining whether the first core cluster is overloaded includes:
  • the running time of the first core cluster exceeds the predetermined synchronization period, it is determined that the first core cluster is overloaded.
  • the predetermined synchronization period can be set as: the time required for each core cluster to process a computing task in one phase during normal computing, and when the predetermined synchronization period is reached, each core in the core cluster can be phased Switch to the next phase.
  • the first core cluster if the running duration of a phase of all or part of the cores in the first core cluster exceeds a predetermined synchronization period, the first core cluster may be considered to be overloaded.
  • the present disclosure does not limit the specific value of the predetermined synchronization period.
  • a solution for adjusting the task allocation of the target core cluster without stopping is provided.
  • control core of the target core cluster determines the control core of the new core cluster, and the control core of the new core cluster interacts with the control core of the target core cluster to complete the formation of the new core cluster .
  • FIG. 4 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
  • step S220 the step of adjusting the task allocation of the first core cluster according to the load detection result of the first core cluster includes:
  • step S221 apply for an idle core as the second control core of the second core cluster that replaces the first core cluster
  • step S222 in response to the request signaling of the second control core to acquire the task information of the task processed by the first core cluster, transmit the task information of the task processed by the first core cluster to the second control core control nucleus;
  • step S223 in response to the request signaling of the second control core to obtain the original data, obtain the original data;
  • step S224 transmitting the original data to the second control core
  • step S225 the received input and output information of the second core cluster is added to the pipeline composed of multiple core clusters
  • step S226 start signaling is sent to the second control core.
  • the first control core can dynamically apply for an idle core in step S221 as the second control core of the second core cluster that replaces the first core cluster.
  • the second control core may send a request signaling to the first control core, which is used to request task information of the task processed by the first core cluster; when the first control core receives the request signaling, it may In S22, in response to the request signaling, the task information of the task processed by the first core cluster is transmitted to the second control core.
  • the task information of the task processed by the target core cluster is not limited.
  • the task information may include configuration information of each core in the second core cluster, and may also include information representing the storage content of each core in the second core cluster.
  • the second control core may form a second core cluster to replace the first core cluster. For example, apply to the many-core system for multiple idle cores according to task information; configure tasks for multiple idle cores.
  • the second control core may send request signaling to the first control core for requesting raw data of the task processed by the first core cluster.
  • the first control core receives the request signaling, in step S223, in response to the request signaling, obtain the original data, and in step S224, transmit the original data to the second control core.
  • the step of acquiring the original data by the first control core includes: searching for data from each core in the first core cluster according to the original compilation information when the tasks of the first core cluster are configured, and reorganizing them into the raw data.
  • the second control core after receiving the raw data, allocates the raw data to each core in the second core cluster, so that the second core cluster can process the tasks processed by the first core cluster. Further, the second control core may determine the input and output routes of the second core cluster, and send the input and output information of the second core cluster to the first control core.
  • the first control core may add the received input and output information of the second core cluster to a pipeline composed of multiple core clusters in step S225.
  • the first control core adds the second core cluster to the pipeline by replacing the input and output information of the second core cluster into the pipeline composed of multiple core clusters, so that the second core cluster enters the pipeline. Normal computing task flow.
  • the first control core may send a start signaling to the second control core in step S226, so that the second core cluster starts to replace the first core cluster to process computing tasks.
  • step S220 further includes:
  • the first core cluster After receiving the message that the second core cluster has been started sent by the second control core, the first core cluster is disbanded.
  • the first core cluster can be disbanded, so that the cores in the first core cluster become idle cores, thereby releasing computing resources.
  • the second core cluster can replace the first core cluster to process computing tasks, so as to realize the process of adjusting the task allocation of the first core cluster, thereby improving the flexibility of task processing in the many-core system. Improve the utilization efficiency of computing resources in many-core systems.
  • a solution is provided for adjusting the task allocation of the first core cluster by shutting down. For example, when it is necessary to adjust the task allocation of the first core cluster, dynamically apply for an idle core as the core of the first core cluster, and perform task configuration.
  • step S220 includes: applying for an idle core as a core to which the first core cluster belongs; and re-assigning tasks to the cores of the first core cluster.
  • the first control core can send a request for adding cores to the high-level control core of the many-core system, so that the high-level control core allocates a new idle core to the first core cluster as the core of the first core cluster.
  • the first control core may set the number of cores to be added according to actual conditions, which is not limited in the present disclosure.
  • the first control core may reconfigure tasks for each core of the first core cluster, and after the task configuration is completed, control each core of the first core cluster to process computing tasks, so as to achieve The process of adjusting the task assignment of the first core cluster.
  • the present disclosure does not limit the specific manner of task configuration.
  • a global notification mechanism is included, for example, all cores and personal computer (PC, Personal Computer) terminals in the many-core system are broadcasted to notify invalid state information and valid state information.
  • PC personal computer
  • FIG. 5 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a task scheduling method, which is applied to the core of a many-core system, and the method includes:
  • step S310 a request signaling for obtaining task information of the task processed by the target core cluster is sent to obtain the task information
  • step S320 according to the acquired task information, a second core cluster for replacing the target core cluster is formed, and the core is the second control core of the second core cluster;
  • step S330 the task processed by the target core cluster is executed on the second core cluster
  • the many-core system includes a plurality of cores, at least one of the cores constitutes the core cluster, the many-core system includes at least one of the core clusters, and the target core cluster is the core cluster that needs to adjust task allocation .
  • a solution for adjusting task allocation of a target core cluster without stopping the system is provided. For example, when it is necessary to adjust the task allocation of the target core cluster, dynamically apply for idle cores, re-establish a second core cluster, and replace the target core cluster with the second core cluster; among which, when forming the second core cluster, the target does not need to be suspended.
  • the operation of the core cluster After the second core cluster replaces the target core cluster, the target core cluster may be disbanded, and the cores in the target core cluster become idle cores, thereby releasing computing resources.
  • the second control core of the second core cluster may be determined by the control core of the target core cluster, or the second control core of the second core cluster may be determined by the high-level control core. This embodiment of the present disclosure does not limit this.
  • the second control core interacts with the control core or high-level control core of the target core cluster through steps S310 to S330 to complete the formation of the second core cluster.
  • the second control core may send a request signaling for acquiring task information of the task processed by the target core cluster to the high-level control core, so as to obtain the task information;
  • the control core sends a request signaling for acquiring task information of the task processed by the target core cluster to acquire the task information.
  • the second control core may form a second core cluster for replacing the target core cluster according to the acquired task information; and then in step S330, run the target on the second core cluster The tasks handled by the core cluster.
  • the second control core is determined by the high-level control core or the control core of the core cluster whose task allocation needs to be adjusted, and then the second control core forms the second core cluster, so that the second control core can be
  • the computing resources are dynamically increased when the core cluster is overloaded, and the computing resources are released in time when the core cluster computing resources are excessive, which can improve the flexibility of task processing in the many-core system and avoid the reduction of the processing efficiency of some core clusters.
  • the overall processing efficiency of the many-core system is reduced, while the utilization efficiency of the computing resources of the many-core system is improved.
  • FIG. 6 is a flowchart of a task scheduling method in an embodiment of the present disclosure. 6, in some embodiments, step S320 includes:
  • step S321 apply for multiple idle cores according to the task information
  • step S322 task configuration is performed on a plurality of the idle cores
  • step S323 sending a request signaling for obtaining raw data to obtain the raw data
  • step S324 the obtained raw data is allocated to each of the idle cores according to the task information
  • step S325 determine the input and output information of the second core cluster
  • step S326 the input and output information of the second core cluster is sent to the control core of the target core cluster
  • step S330 includes:
  • step S331 in response to the start signaling sent by the control core of the target core cluster, the task processed by the target core cluster is executed on the second core cluster.
  • the second control core can apply for multiple idle cores according to the task information in step S321.
  • the number of idle cores required to execute the task is determined according to parameters such as the calculation amount and completion time requirements of the task processed by the target core cluster in the task information, which may be greater than the current number of cores in the target core cluster.
  • the present disclosure does not limit the specific number of idle cores to be applied for.
  • the second control core may send an allocation request for idle cores to the high-level control core, so that the high-level control core allocates a corresponding number of idle cores to the second core cluster.
  • the second control core may perform task configuration on the multiple idle cores in step S322 according to the task information, for example, split tasks and assign them to each idle core.
  • the present disclosure does not limit the specific manner of task configuration.
  • performing task configuration on idle cores may include determining configuration information corresponding to each core, and may also include specifying information that each core should store. This embodiment of the present disclosure does not limit this.
  • the second control core may, in step S323, send a request signaling for obtaining the original data to the control core of the target core cluster, so as to obtain the original data.
  • the acquired original data may be allocated to each idle core , so that the second core cluster can process the tasks processed by the target core cluster.
  • the second control core may determine the input and output routes of the second core cluster in step S325, obtain input and output information, and send the input and output information to the control core of the target core cluster in step S326.
  • the control core of the target core cluster after receiving the input and output information, replaces the input and output information of the second core cluster into a pipeline composed of a plurality of core clusters, and adds the second core cluster to the pipeline to Make the second core cluster enter the normal computing task flow.
  • the control core of the target core cluster adds the input and output information of the second core cluster to the pipeline, it sends a start signaling to the second control core of the second core cluster.
  • step S331 the second control core controls the second core cluster to execute the task processed by the target core cluster in response to the activation signaling, thereby realizing the formation of a second core cluster for replacing the target core cluster. the whole process.
  • the task scheduling method further includes: sending a message that the second core cluster has been started to the control core of the target core cluster, so as to dissolve the target core cluster.
  • the control core of the target core cluster may send a message that the second core cluster has been started. After receiving the message, the control core of the target core cluster can dissolve the target core cluster, so that the cores in the target core cluster become idle cores, thereby releasing computing resources.
  • a control device for task scheduling is also provided, which is applied to the core of a many-core system, and the control method includes:
  • the first detection module is used to perform load detection on at least one core cluster of the many-core system, and determine whether there is a target core cluster in the detected core cluster, and the target core cluster is at least one of the core clusters that needs to be adjusted a core cluster for task allocation; a first adjustment module, configured to control the target core cluster to adjust task allocation according to the load detection result in the presence of the target core cluster; wherein the many-core system includes a plurality of cores, at least One of the cores constitutes the core cluster, and the many-core system includes at least one of the core clusters.
  • the first detection module is configured to: determine whether there is an overloaded core cluster or a core cluster with excess computing resources in the detected core cluster; In the case of a core cluster with excess computing resources, it is determined that the core cluster with excessive load or excess computing resources is the target core cluster.
  • the first detection module is configured to: determine whether there is a candidate target core cluster within a predetermined period of time, where the candidate target core cluster is the core cluster with the longest running time in N synchronization cycles , where N is a natural number greater than or equal to a predetermined number; when the candidate target core cluster exists, it is determined that there is an overloaded core cluster; wherein, the candidate target core cluster is an overloaded core cluster.
  • the first detection module is configured to: determine whether there is a core cluster whose running duration exceeds a predetermined synchronization period; in the case of a core cluster whose running duration exceeds the predetermined synchronization period, determine that there is overload A core cluster, wherein a core cluster whose running time exceeds the predetermined synchronization period is an overloaded core cluster.
  • the first adjustment module is configured to: apply for an idle core as a second control core of a second core cluster that replaces the target core cluster; acquire the target core in response to the second control core
  • the request signaling of the task information of the task processed by the cluster transmits the task information of the task processed by the target core cluster to the second control core.
  • a task scheduling apparatus which is applied to a first control core of a first core cluster of a many-core system, and the task scheduling apparatus includes:
  • the second detection module is configured to perform load detection on the first core cluster, and determine whether the first core cluster is a target core cluster, and the target core cluster is a core cluster that needs to adjust task allocation;
  • a second adjustment module configured to adjust the task allocation of the first core cluster according to the load detection result of the first core cluster when the first core cluster is the target core cluster;
  • the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, the many-core system includes at least one of the core clusters, and the first core cluster is one of the at least one core cluster .
  • the second detection module is configured to: determine whether the first core cluster is overloaded or have excess computing resources; in the case of overloading or excess computing resources of the first core cluster, determine whether the first core cluster is overloaded or has excess computing resources.
  • the first core cluster is the target core cluster.
  • the second detection module is configured to: determine the running duration of multiple synchronization cycles of the first core cluster within a predetermined time period; The running duration is to determine the number of synchronization cycles with the longest running duration of the first core cluster in at least one of the core clusters; when the number of synchronization cycles with the longest running duration of the first core cluster exceeds a predetermined value, determine The first core cluster is overloaded.
  • the second detection module is configured to: determine whether the running duration of the first core cluster exceeds a predetermined synchronization period; when the running duration of the first core cluster exceeds the predetermined synchronization period Next, it is determined that the core cluster is overloaded.
  • the second adjustment module is configured to: apply for an idle core as a second control core of a second core cluster that replaces the first core cluster; acquire the first core cluster in response to the second control core
  • a request signaling of task information of a task processed by a core cluster transmits the task information of a task processed by the first core cluster to the second control core; in response to a request signal of the second control core to acquire original data order, obtain the original data; transmit the original data to the second control core; add the received input and output information of the second core cluster to the pipeline composed of multiple core clusters;
  • the second control core sends the start signaling.
  • the second adjustment module is further configured to: receive a message sent by the second control core that the second core cluster has been started, and dissolve the first core cluster.
  • the second adjustment module is further configured to: apply for an idle core as a core to which the first core cluster belongs; and re-assign tasks to the cores of the first core cluster.
  • a task scheduling apparatus which is applied to the core of a many-core system, and the task scheduling method includes:
  • a request signaling sending module configured to send a request signaling for acquiring task information of a task processed by the target core cluster, to acquire the task information
  • a core cluster forming module configured to form a second core cluster for replacing the target core cluster according to the acquired task information, and the core is the second control core of the second core cluster;
  • the system includes at least one of the core clusters, and the target core cluster is the core cluster for which task allocation needs to be adjusted.
  • the core cluster building module is configured to: apply for multiple idle cores according to the task information; perform task configuration on the multiple idle cores; send request signaling for obtaining raw data to obtain all the idle cores. Allocate the acquired raw data to each of the idle cores according to the task information; determine the input and output information of the second core cluster; send the input and output information of the second core cluster to all the idle cores The control core of the target core cluster; wherein, the task operation module is configured to: in response to a start signaling sent by the control core of the target core cluster, run the target core cluster processing on the second core cluster task.
  • the apparatus further includes: a startup message sending module, configured to send a message that the second core cluster has been started to the control core of the target core cluster, so as to make The target core cluster is dissolved.
  • a startup message sending module configured to send a message that the second core cluster has been started to the control core of the target core cluster, so as to make The target core cluster is dissolved.
  • FIG. 7 is a block diagram of the composition of a core in an embodiment of the present disclosure.
  • a core is further provided, which is applied to a many-core system.
  • the core includes: one or more processing units 101 ; and a storage unit 102 on which one or more programs are stored, When one or more programs are executed by one or more processing units, the one or more processing units implement at least one of the following methods: the control method for task scheduling described in the first aspect of the embodiment of the present disclosure; the implementation of the present disclosure Examples include the task scheduling method described in the second aspect; the task scheduling method described in the third aspect of the embodiments of the present disclosure.
  • the processing unit 101 is a device with data processing capability, including but not limited to an arithmetic unit, etc.
  • the storage unit 102 is a device with data storage capability, including but not limited to random access memory (RAM), read-only memory (ROM), Power Erasable Programmable Read-Only Memory (EEPROM), Flash Memory (FLASH).
  • RAM random access memory
  • ROM read-only memory
  • EEPROM Power Erasable Programmable Read-Only Memory
  • FLASH Flash Memory
  • a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, at least one of the following methods is implemented: the method described in the first aspect of the embodiment of the present disclosure.
  • FIG. 8 is a block diagram of an electronic device in an embodiment of the present disclosure.
  • an electronic device is further provided, including: a plurality of cores 201 ; and an on-chip network 202 configured to interact Data and external data between the multiple cores 201; one or more of the cores 201 store one or more instructions, and the one or more of the instructions are executed by the one or more of the cores 201 to make
  • One or more of the cores 201 can execute at least one of the following methods: the control method for task scheduling described in the first aspect of the embodiment of the present disclosure; the task scheduling method described in the second aspect of the embodiment of the present disclosure; the present disclosure The task scheduling method described in the third aspect of the embodiment.
  • a computer program product is also provided.
  • the computer program product When the computer program product runs on a computer, the computer program product causes the computer to execute at least one of the following methods: A control method; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
  • a second core cluster is formed, and the second core cluster processes the tasks processed by the target core cluster without suspending the operation of the target core cluster.
  • the process of adjusting the task allocation of the target core cluster includes: determining, by the control core or high-level control core of the target core cluster, a second control core in a second core cluster of the target core cluster; obtaining the target control core by the second control core
  • the task information of the task processed by the core in the example, the control core of the target core cluster holds the task information of the task processed by the target core cluster, the high-level control core also holds the task information of the task processed by the target core cluster, the second control core
  • the core can apply for task information to the control core of the target core cluster, and can also apply to the high-level control core for task information;
  • the second control core applies for a target number of idle cores and performs task configuration; the second control core sends request signaling to the control cores of the target core cluster to obtain original data;
  • the control core of the target core cluster After receiving the request signaling, the control core of the target core cluster searches for data from each core in the target core cluster according to the original compilation information, reorganizes the original data, and returns the original data to the second control core; The received raw data is allocated to each core in the second core cluster according to the task configuration information.
  • the second control core determines the input and output routes, and sends the input and output information of the second core cluster to the control core of the target core cluster; the control core of the target core cluster replaces the input and output information of the second core cluster into the pipeline, and sends the information to the first core cluster.
  • the second core cluster sends start signaling; the second core cluster starts according to the start signaling, and notifies the target core cluster.
  • the target core cluster is disbanded.
  • the following configurations may be performed: allocate memory, determine the information and parameters that should be stored by each idle core; and so on to reduce the computational complexity; configure routing; configure calculation control information such as operation sequence and operation time; configure synchronization management information.
  • the task configuration includes the following flow:
  • Each computational step is decomposed into several subtasks that can be parallelized according to the required memory and amount of computation.
  • each subtask can be mapped to an idle core; the memory required by each subtask shall not exceed the memory capacity limit of a single idle core, and the routing transmission volume (input and output) of the subtask shall not exceed the routing transmission bandwidth limit of a single idle core;
  • the subtask computation amount of each core is evenly distributed;
  • the optimal layout scheme determines the subtasks that each idle core needs to execute, and the optimal layout scheme is the layout scheme that minimizes the routing transmission bandwidth
  • the configuration information is sent to each idle core through the on-chip network, wherein each idle core will return a configuration completion signaling after receiving all the configuration information.
  • the operation of the target core cluster is suspended, and the cores in the target core cluster are increased or decreased according to the result of the load detection, so that the computing resources of the target core cluster and the computing tasks match.
  • the process of adjusting the task allocation of the target core cluster includes: applying for a new core, and performing task configuration.
  • remapping including a global notification mechanism, for example, valid (invalid) and invalid (valid) to broadcast notification to all cores and PC side.
  • the following configurations can be performed: allocate memory to determine the information and parameters that each core should store; configure arithmetic operators to reduce computational complexity by dismantling operations; configure routing; Configure calculation control information such as operation sequence and operation time; configure synchronization management information, etc.
  • the task configuration includes the following flow:
  • Each computational step is decomposed into several subtasks that can be parallelized according to the required memory and amount of computation.
  • each subtask can be mapped to one core; the memory required by each subtask shall not exceed the memory capacity limit of a single core, and the routing transmission volume (input and output) of the subtask shall not exceed the routing transmission bandwidth limit of a single core; preferably, The calculation amount of subtasks of each core is evenly distributed;
  • the optimal layout scheme determines the subtasks that each core needs to perform, and the optimal layout scheme is the layout scheme that minimizes the routing transmission bandwidth
  • the configuration information is sent to each core through the on-chip network, and each core will return a configuration completion signaling after receiving all the configuration information.
  • Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media.
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .

Abstract

Provided are a task scheduling method, a control method, an electronic device and a computer-readable medium. The control method for task scheduling is applied to a core of a many-core system, and the control method comprises: performing load detection on at least one core cluster of a many-core system, and determining whether there is a target core cluster in the core cluster which has been subjected to detection, wherein the target core cluster is a core cluster where task allocation needs to be adjusted in the at least one core cluster; and when the target core cluster is present, controlling, according to a load detection result, the target core cluster to adjust the task allocation, wherein the many-core system comprises a plurality of cores, at least one of the cores constitutes the core cluster, and the many-core system comprises the at least one core cluster.

Description

任务调度方法、控制方法、电子设备、计算机可读介质Task scheduling method, control method, electronic device, computer readable medium 技术领域technical field
本公开涉及计算机技术领域,特别涉及一种任务调度的控制方法、一种任务调度方法、一种任务调度方法、一种电子设备、一种计算机可读介质、一种计算机程序产品。The present disclosure relates to the field of computer technology, and in particular, to a control method for task scheduling, a task scheduling method, a task scheduling method, an electronic device, a computer-readable medium, and a computer program product.
背景技术Background technique
众核系统可以是至少一个芯片构成的,每个芯片具有多个计算单元,每个芯片中可独立调度并拥有完整计算能力的最小计算单元称为核心。在众核系统中,多个核心可以联合工作,各个核心可以分别独立运行程序指令,利用并行计算的能力加快程序的运行速度,并提供多任务处理能力。A many-core system can be composed of at least one chip, each chip has multiple computing units, and the smallest computing unit in each chip that can be independently scheduled and has complete computing power is called a core. In a many-core system, multiple cores can work together, and each core can run program instructions independently, using parallel computing capabilities to speed up program execution and provide multitasking capabilities.
发明内容SUMMARY OF THE INVENTION
本公开提供一种基于众核系统的任务调度的控制方法、一种任务调度方法、一种任务调度方法、一种电子设备、一种计算机可读介质、一种计算机程序产品。The present disclosure provides a control method for task scheduling based on a many-core system, a task scheduling method, a task scheduling method, an electronic device, a computer-readable medium, and a computer program product.
第一方面,本公开实施例提供一种任务调度的控制方法,应用于众核系统的核心,包括:对众核系统的至少一个核心簇进行负载检测,判断所检测的所述核心簇中是否存在目标核心簇,所述目标核心簇为至少一个所述核心簇中需要调整任务分配的核心簇;在存在所述目标核心簇的情况下,根据负载检测结果控制所述目标核心簇调整任务分配;其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇。In a first aspect, an embodiment of the present disclosure provides a task scheduling control method, which is applied to the core of a many-core system, including: performing load detection on at least one core cluster of the many-core system, and determining whether the detected core cluster is in the core cluster. There is a target core cluster, and the target core cluster is at least one of the core clusters whose task allocation needs to be adjusted; if the target core cluster exists, the target core cluster is controlled to adjust the task allocation according to the load detection result ; wherein the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters.
第二方面,本公开实施例提供一种任务调度方法,应用于众核系统的第一核心簇的第一控制核,所述任务调度方法包括:对第一核心簇进行负载检测,判断所述第一核心簇是否为目标核心簇,所述目标核心簇为需要调整任务分配的核心簇;在所述第一核心簇是所述目标核心簇的情况下,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配;其中,所述众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述第一核心簇为至少一个所述核心簇中的一个。In a second aspect, an embodiment of the present disclosure provides a task scheduling method, which is applied to a first control core of a first core cluster of a many-core system. The task scheduling method includes: performing load detection on the first core cluster, determining the Whether the first core cluster is the target core cluster, and the target core cluster is the core cluster whose task allocation needs to be adjusted; if the first core cluster is the target core cluster, according to the load of the first core cluster As a result of the detection, the task allocation of the first core cluster is adjusted; wherein, the many-core system includes multiple cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters , the first core cluster is one of at least one of the core clusters.
第三方面,本公开实施例提供一种任务调度方法,应用于众核系统的核心,包括:发送获取目标核心簇处理的任务的任务信息的请求信令,以获取所述任务信息;根据获取的所述任务信息,组建用于替代所述目标核心簇的第二核心簇,所述核心为所述第二核心簇的第二控制核;在所述第二核心簇上运行所述目标核心簇处理的任务;其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述目标核心簇为需要调整任务分配的所述核心簇。In a third aspect, an embodiment of the present disclosure provides a task scheduling method, which is applied to the core of a many-core system, including: sending a request signaling for acquiring task information of a task processed by a target core cluster, so as to acquire the task information; the task information, form a second core cluster for replacing the target core cluster, and the core is the second control core of the second core cluster; run the target core on the second core cluster The task of cluster processing; wherein, the many-core system includes a plurality of cores, at least one of the cores forms the core cluster, the many-core system includes at least one of the core clusters, and the target core cluster is the task allocation that needs to be adjusted of the core cluster.
第四方面,本公开实施例提供一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现以下方法中的至少一者:本公开实施例第一方面所述的任务调 度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。In a fourth aspect, an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, implements at least one of the following methods: the method described in the first aspect of the embodiment of the present disclosure A control method for task scheduling; the task scheduling method according to the second aspect of the embodiment of the present disclosure; and the task scheduling method according to the third aspect of the embodiment of the present disclosure.
第五方面,本公开实施例提供一种电子设备,包括:多个核心;以及片上网络,被配置为交互所述多个核心间的数据和外部数据;一个或多个所述核心中存储有一个或多个指令,一个或多个所述指令被一个或多个所述核心执行,以使一个或多个所述核心能够执行以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。In a fifth aspect, embodiments of the present disclosure provide an electronic device, including: a plurality of cores; and a network-on-chip configured to exchange data and external data among the plurality of cores; One or more instructions that are executed by one or more of the cores to enable the one or more of the cores to perform at least one of the following methods: The control method for task scheduling described above; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
第六方面,本公开实施例提供一种计算机程序产品,所述计算机程序产品在计算机上运行时,使得计算机执行以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。In a sixth aspect, an embodiment of the present disclosure provides a computer program product, which, when running on a computer, causes the computer to execute at least one of the following methods: the task scheduling described in the first aspect of the embodiment of the present disclosure A control method; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
在本公开实施例中,能够对众核系统中各个核心簇进行负载检测,当存在核心簇需要调整任务分配时,根据负载检测结果控制核心簇调整任务分配,从而提高众核系统任务处理的灵活性,提高众核系统计算资源的利用效率。In the embodiment of the present disclosure, load detection can be performed on each core cluster in the many-core system, and when there is a core cluster that needs to adjust the task allocation, the core cluster is controlled to adjust the task allocation according to the load detection result, thereby improving the flexibility of task processing in the many-core system. improve the utilization efficiency of computing resources in many-core systems.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or critical features of embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.
附图说明Description of drawings
附图用来提供对本公开的进一步理解,并且构成说明书的一部分,与本公开的实施例一起用于解释本公开,并不构成对本公开的限制。通过参考附图对详细示例实施例进行描述,以上和其他特征和优点对本领域技术人员将变得更加显而易见,在附图中:The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification, and together with the embodiments of the present disclosure, they are used to explain the present disclosure, and are not intended to limit the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings, in which:
图1是本公开实施例中一种任务调度的控制方法的流程图;1 is a flowchart of a control method for task scheduling in an embodiment of the present disclosure;
图2是本公开实施例中众核系统的示意图;2 is a schematic diagram of a many-core system in an embodiment of the present disclosure;
图3是本公开实施例中一种任务调度方法的流程图;3 is a flowchart of a task scheduling method in an embodiment of the present disclosure;
图4是本公开实施例中一种任务调度方法的流程图;4 is a flowchart of a task scheduling method in an embodiment of the present disclosure;
图5是本公开实施例中一种任务调度方法的流程图;5 is a flowchart of a task scheduling method in an embodiment of the present disclosure;
图6是本公开实施例中一种任务调度方法的流程图;6 is a flowchart of a task scheduling method in an embodiment of the present disclosure;
图7是本公开实施例中一种核心的组成框图;Fig. 7 is the composition block diagram of a kind of core in the embodiment of the present disclosure;
图8是本公开实施例中一种电子设备的组成框图。FIG. 8 is a block diagram of an electronic device in an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本公开的技术方案,以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。In order for those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, and they should be considered to be exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。Various embodiments of the present disclosure and various features of the embodiments may be combined with each other without conflict.
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。The terminology used herein is used to describe particular embodiments only and is not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that when the terms "comprising" and/or "made of" are used in this specification, the stated features, integers, steps, operations, elements and/or components are specified to be present, but not precluded or Add one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Words like "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be construed as having meanings consistent with their meanings in the context of the related art and the present disclosure, and will not be construed as having idealized or over-formal meanings, unless expressly so limited herein.
在一些相关技术中,通过静态调度,按照提前制定好的调度策略将任务分配到众核系统上运行。静态调度将算法的某一部分映射到芯片的核心,每个核心只运行被映射的那一部分算法,导致众核系统任务处理的灵活性较差。In some related technologies, through static scheduling, tasks are allocated to the many-core system to run according to a scheduling policy formulated in advance. Static scheduling maps a certain part of the algorithm to the core of the chip, and each core only runs the mapped part of the algorithm, resulting in poor flexibility of task processing in many-core systems.
为了解决静态调度使众核系统任务处理的灵活性较差的问题,在本公开实施例中,根据计算任务动态地组建核心簇,核心簇中包括多个核心,众核系统中可以有多个核心簇,每个核心簇执行相应的计算任务。但是,各核心簇通常是以流水线方式执行计算任务。当处理的任务出现变化,例如业务流暴增,可能会导致部分核心簇超负载。在各核心簇以流水线方式执行计算任务的情况下,某一个核心簇处理效率降低会导致整个众核系统处理效率的降低。In order to solve the problem that static scheduling makes the many-core system less flexible in task processing, in the embodiment of the present disclosure, a core cluster is dynamically formed according to computing tasks. The core cluster includes multiple cores, and the many-core system may have multiple cores. Core clusters, each core cluster performs corresponding computing tasks. However, each cluster of cores typically performs computational tasks in a pipelined fashion. When the processing tasks change, such as a sudden increase in business flow, some core clusters may be overloaded. In the case where each core cluster performs computing tasks in a pipelined manner, the reduction of the processing efficiency of a certain core cluster will lead to a reduction of the processing efficiency of the entire many-core system.
有鉴于此,本公开实施例提供一种任务调度的控制方法,应用于众核系统的核心。图1是本公开实施例中一种任务调度的控制方法的流程图。参照图1,该控制方法包括:In view of this, an embodiment of the present disclosure provides a control method for task scheduling, which is applied to the core of a many-core system. FIG. 1 is a flowchart of a control method for task scheduling in an embodiment of the present disclosure. 1, the control method includes:
在步骤S110中,对众核系统的至少一个核心簇进行负载检测,判断所检测的所述核心簇中是否存在目标核心簇,所述目标核心簇为至少一个所述核心簇中需要调整任务分配的核心簇;In step S110, load detection is performed on at least one core cluster of the many-core system, and it is determined whether there is a target core cluster in the detected core cluster, and the target core cluster is at least one of the core clusters that needs to adjust the task allocation the core cluster;
在步骤S120中,在存在所述目标核心簇的情况下,根据负载检测结果控制所述目标核心簇调整任务分配;In step S120, when the target core cluster exists, control the target core cluster to adjust task allocation according to the load detection result;
其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇。The many-core system includes a plurality of cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters.
图2是本公开实施例中众核系统的示意图。如图2所示,众核系统中包括第一核心和第二核心,第一核心与第二核心的控制能力不同、在众核系统中的功能不同。第一核心可以为众核系统的控制核心,用于接收外部系统的指令、任务;控制众核系统中的各个核心执行处理任务等。多个第二核心组建成为核心簇(如图2中虚线框所示),众核系统中可以有多个核心簇,每个核心簇执行相应的计算任务。FIG. 2 is a schematic diagram of a many-core system in an embodiment of the present disclosure. As shown in FIG. 2 , the many-core system includes a first core and a second core, and the first core and the second core have different control capabilities and different functions in the many-core system. The first core may be the control core of the many-core system, which is used to receive instructions and tasks of the external system; control each core in the many-core system to perform processing tasks and the like. A plurality of second cores are formed into a core cluster (as shown by the dotted box in FIG. 2 ). There may be multiple core clusters in a many-core system, and each core cluster performs a corresponding computing task.
在每个核心簇的多个第二核心中,包括一个作为该核心簇的控制核的第二核心以及 至少一个作为从核心的第二核心,控制核用于接收第一核心或其他组件(例如众核系统的同步器、外部设备等)的指令、任务;对任务进行拆分;控制核心簇内的各个从核心执行子任务等;从核心用于执行相应的子任务。本公开对核心的具体功能分类及各个核心所执行的任务类型等均不作限制。In the plurality of second cores of each core cluster, including one second core as the control core of the core cluster and at least one second core as the slave core, the control core is used to receive the first core or other components (eg Many-core system synchronizers, external devices, etc.) instructions and tasks; split tasks; control each slave core in the core cluster to execute subtasks, etc.; slave cores are used to execute corresponding subtasks. The present disclosure does not limit the specific functional classification of the cores and the types of tasks performed by each core.
在本公开实施例中,由众核系统中的高级别控制核通过执行步骤S110至步骤S120对众核系统中各个核心簇统一进行负载检测,并在有核心簇需要调整任务分配时,控制需要调整任务分配的核心簇调整任务分配。In the embodiment of the present disclosure, the high-level control core in the many-core system performs load detection on each core cluster in the many-core system by performing steps S110 to S120, and when there are core clusters that need to adjust task allocation, the control needs The core cluster that adjusts the assignment of tasks adjusts the assignment of tasks.
在本公开实施例中,执行步骤S110至步骤S120的高级别控制核可以是如图2所示的众核系统中的第一核心;也可以是众核系统中独立于各个核心簇的任意一个核心。本公开实施例对此不做限定。In this embodiment of the present disclosure, the high-level control core that executes steps S110 to S120 may be the first core in the many-core system as shown in FIG. 2 , or may be any one of the many-core systems independent of each core cluster core. This embodiment of the present disclosure does not limit this.
在本公开实施例中,负载检测是指判断核心簇处理的任务与核心簇的计算资源是否匹配。负载检测的结果可以是目标核心簇超负荷,在步骤S120中调整任务分配可以是增加目标核心簇中的核心数量以增加目标核心簇的计算资源;负载检测的结果也可以是目标核心簇计算资源过剩,在步骤S120中调整任务分配可以是减少目标核心簇中的核心数量以节约众核系统的计算资源,提高众核系统计算资源的利用率;负载检测结果还可以是核心簇处理的任务与核心簇的计算资源相匹配。本公开实施例对此不做限定。In the embodiment of the present disclosure, the load detection refers to determining whether the tasks processed by the core cluster match the computing resources of the core cluster. The result of the load detection may be that the target core cluster is overloaded, and adjusting the task allocation in step S120 may be to increase the number of cores in the target core cluster to increase the computing resources of the target core cluster; the result of the load detection may also be that the target core cluster computing resources Excessive, adjusting the task allocation in step S120 may be to reduce the number of cores in the target core cluster to save the computing resources of the many-core system and improve the utilization rate of the computing resources of the many-core system; the load detection result can also be the core cluster processing task and The computing resources of the core cluster are matched. This embodiment of the present disclosure does not limit this.
在本公开实施例提供的任务调度的控制方法中,通过高级别控制核对众核系统中各个核心簇进行负载检测,在有核心簇需要调整任务分配时,控制需要调整任务分配的核心簇调整任务分配,能够动态地为超负载的核心簇增加计算资源,还能及时地回收计算资源过剩的核心簇的计算资源,从而能够提高众核系统任务处理的灵活性,减少部分核心簇处理效率降低导致众核系统整体处理效率降低的情况,同时提高众核系统计算资源的利用效率。In the control method for task scheduling provided by the embodiment of the present disclosure, load detection is performed on each core cluster in the many-core system through a high-level control check, and when there are core clusters that need to adjust the task allocation, the core cluster that needs to adjust the task allocation is controlled to adjust the task. Allocation can dynamically increase computing resources for overloaded core clusters, and can timely recycle computing resources of core clusters with excess computing resources, thereby improving the flexibility of task processing in many-core systems and reducing the processing efficiency of some core clusters. The overall processing efficiency of the many-core system is reduced, and the utilization efficiency of the computing resources of the many-core system is improved at the same time.
作为一种可选的实施方式,高级别控制核通过负载检测发现核心簇超负荷或计算资源过剩时,则判定核心簇需要调整任务分配。As an optional implementation manner, when the high-level control core finds that the core cluster is overloaded or has excessive computing resources through load detection, it determines that the core cluster needs to adjust task allocation.
相应地,在一些实施例中,步骤S110包括:Correspondingly, in some embodiments, step S110 includes:
判断所检测的所述核心簇中是否存在超负载或计算资源过剩的核心簇;Judging whether there is an overloaded core cluster or a core cluster with excess computing resources in the detected core clusters;
在所检测的所述核心簇中存在超负载或计算资源过剩的核心簇的情况下,判定超负载或计算资源过剩的核心簇为所述目标核心簇。If there is a core cluster with overload or excess computing resources in the detected core clusters, it is determined that the core cluster with overload or excess computing resources is the target core cluster.
在本公开实施例中,各个核心簇以流水线方式处理任务时,多个核心簇具有统一的同步周期。通常,同步周期由运行时间最长的核心簇的运行时长决定的。运行时间越长,表示核心簇的负载越大。作为一种可选的实施方式,可以根据一定时间段内多个核心簇的运行时长的关系,判断是否有超负荷的核心簇。In the embodiment of the present disclosure, when each core cluster processes tasks in a pipeline manner, multiple core clusters have a uniform synchronization period. Typically, the synchronization period is determined by the runtime of the longest-running core cluster. The longer the run time, the higher the load on the core cluster. As an optional implementation manner, it may be determined whether there is an overloaded core cluster according to the relationship between the running durations of multiple core clusters within a certain period of time.
相应地,在一些实施例中,判断众核系统的至少一个所述核心簇中是否存在超负载的核心簇的步骤包括:Correspondingly, in some embodiments, the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system includes:
判断预定时间段内,是否存在候选目标核心簇,所述候选目标核心簇为在N个同步周期内运行时间均最长的核心簇,其中,N为大于或等于预定数量的自然数;Judging whether there is a candidate target core cluster within a predetermined time period, the candidate target core cluster is the core cluster with the longest running time in N synchronization cycles, where N is a natural number greater than or equal to a predetermined number;
在存在所述候选目标核心簇的情况下,判定存在超负载的核心簇;其中,所述候选目标核心簇为超负载的核心簇。When the candidate target core cluster exists, it is determined that there is an overloaded core cluster; wherein the candidate target core cluster is an overloaded core cluster.
举例来说,预定时间段内可以包括多个同步周期(数量大于或等于N),如果存在一个候选目标核心簇,其在预定时间段内的N个同步周期内运行时间均最长,则可以确定存在超负载的核心簇,N为大于或等于预定数量的自然数。反之,则可在下一个预定时间段结束后继续进行判断。For example, a predetermined period of time may include multiple synchronization cycles (the number is greater than or equal to N). If there is a candidate target core cluster that has the longest running time in the N synchronization cycles within the predetermined time period, it can be It is determined that there are overloaded core clusters, and N is a natural number greater than or equal to a predetermined number. On the contrary, the judgment can be continued after the end of the next predetermined time period.
应当理解,本领域技术人员可根据实际情况设定预定时间段的时长,以及运行时间最长的同步周期的预定数量,本公开对此不作限制。It should be understood that those skilled in the art can set the duration of the predetermined time period and the predetermined number of synchronization cycles with the longest running time according to actual conditions, which are not limited in the present disclosure.
通过这种方式,能够提高对超负荷的核心簇判断的准确性,提高任务调整的针对性。In this way, the accuracy of judging the overloaded core clusters can be improved, and the pertinence of task adjustment can be improved.
作为另一种可选的实施方式,可以预设一个预定同步周期,当任意一个核心簇的运行时长超过预定同步周期时,则表示该核心簇超负荷。As another optional implementation manner, a predetermined synchronization period may be preset, and when the running duration of any one core cluster exceeds the predetermined synchronization period, it means that the core cluster is overloaded.
相应地,在一些实施例中,判断众核系统的至少一个所述核心簇中是否存在超负载的核心簇的步骤包括:Correspondingly, in some embodiments, the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system includes:
判断是否存在运行时长超过预定同步周期的核心簇;Determine whether there is a core cluster whose running time exceeds the predetermined synchronization period;
在存在运行时长超过所述预定同步周期的核心簇的情况下,判定存在超负载的核心簇,其中,运行时长超过所述预定同步周期的核心簇为超负载的核心簇。In the case that there is a core cluster whose running duration exceeds the predetermined synchronization period, it is determined that there is an overloaded core cluster, wherein the core cluster whose running duration exceeds the predetermined synchronization period is an overloaded core cluster.
举例来说,该预定同步周期可设定为:各个核心簇正常计算时处理一个阶段(phase)的计算任务所需的时间,在到达预定同步周期时,可对核心簇中的各核心进行phase切换,进行下一phase的处理。针对任一个核心簇,如果该核心簇中全部或部分核心的一个阶段的运行时长超过预定同步周期,则可认为该核心簇超负荷。本公开对预定同步周期的具体取值不作限制。For example, the predetermined synchronization period can be set as: the time required for each core cluster to process a computing task in one phase during normal computing, and when the predetermined synchronization period is reached, each core in the core cluster can be phased Switch to the next phase. For any core cluster, if the running duration of a phase of all or part of the cores in the core cluster exceeds a predetermined synchronization period, the core cluster may be considered to be overloaded. The present disclosure does not limit the specific value of the predetermined synchronization period.
在一些实施例中,也可从众核系统的核心簇中确定出多个超负载的核心簇,本公开对此不作限制。In some embodiments, multiple overloaded core clusters may also be determined from the core clusters of the many-core system, which is not limited in the present disclosure.
通过这种方式,能够提高对超负荷的核心簇判断的准确性,提高任务调整的针对性。In this way, the accuracy of judging the overloaded core clusters can be improved, and the pertinence of task adjustment can be improved.
在本公开实施例中,在步骤S120中控制目标核心簇调整任务分配时,提供一种不停机调整目标核心簇的任务分配的方案。In the embodiment of the present disclosure, when the target core cluster is controlled to adjust the task allocation in step S120, a solution for adjusting the task allocation of the target core cluster without stopping is provided.
相应地,在一些实施例中,步骤S120包括:Accordingly, in some embodiments, step S120 includes:
申请空闲核心作为替代所述目标核心簇的第二核心簇的第二控制核;apply for an idle core as the second control core of the second core cluster that replaces the target core cluster;
响应于所述第二控制核获取所述目标核心簇处理的任务的任务信息的请求信令,将所述目标核心簇处理的任务的任务信息传输到所述第二控制核In response to the request signaling for the second control core to acquire task information of the task processed by the target core cluster, transmit the task information of the task processed by the target core cluster to the second control core
也就是说,当需要调整目标核心簇的任务分配时,可动态申请空闲核心,重新组建一个新的核心簇(称为第二核心簇),用第二核心簇替代目标核心簇;其中,组建第二核心簇时,无需暂停目标核心簇的运行。在第二核心簇替代目标核心簇之后,可以解散目标核心簇,目标核心簇中的核心变为空闲核心,从而释放计算资源。That is to say, when the task allocation of the target core cluster needs to be adjusted, an idle core can be dynamically applied for, a new core cluster (called the second core cluster) can be rebuilt, and the target core cluster can be replaced by the second core cluster; When the second core cluster is used, there is no need to suspend the operation of the target core cluster. After the second core cluster replaces the target core cluster, the target core cluster may be disbanded, and the cores in the target core cluster become idle cores, thereby releasing computing resources.
作为一种可选的实施方式,由高级别控制核确定第二核心簇的控制核(称为第二控制核),第二核心簇通过与高级别控制核、目标核心簇的控制核进行交互,完成第二核 心簇的组建。As an optional implementation manner, the high-level control core determines the control core of the second core cluster (referred to as the second control core), and the second core cluster interacts with the high-level control core and the control core of the target core cluster , to complete the formation of the second core cluster.
在一些实施例中,可以在目标核心簇的控制核中,保存目标核心簇处理的任务的任务信息;也可以在高级别控制核中,保存各个核心簇处理的任务的任务信息。本公开实施例对此不做限定。In some embodiments, task information of tasks processed by the target core cluster may be stored in the control core of the target core cluster; task information of tasks processed by each core cluster may also be stored in the high-level control core. This embodiment of the present disclosure does not limit this.
在一些实施例中,第二控制核可以从目标核心簇的控制核获取目标核心簇处理的任务的任务信息,也可以从高级别控制核获取目标核心簇处理的任务的任务信息。本公开实施例对此也不做限定。In some embodiments, the second control core may obtain task information of the task processed by the target core cluster from the control core of the target core cluster, and may also obtain task information of the task processed by the target core cluster from the high-level control core. This embodiment of the present disclosure also does not limit this.
在一些实施例中,响应于所述第二控制核获取所述目标核心簇处理的任务的任务信息的请求信令,将所述目标核心簇处理的任务的任务信息传输到所述第二控制核。In some embodiments, the task information of the task processed by the target core cluster is transmitted to the second control core in response to the request signaling by the second control core to obtain the task information of the task processed by the target core cluster nuclear.
在本公开实施例中,对目标核心簇处理的任务的任务信息不做限定。例如,任务信息可以包括第二核心簇中各个核心的配置信息,也可以包括表示第二核心簇中各个核心的存储内容的信息。In the embodiment of the present disclosure, the task information of the task processed by the target core cluster is not limited. For example, the task information may include configuration information of each core in the second core cluster, and may also include information representing storage content of each core in the second core cluster.
通过这种方式,能够通过第二核心簇替代目标核心簇,实现目标核心簇调整任务分配的过程,从而提高调整的效率。In this way, the target core cluster can be replaced by the second core cluster, so as to realize the process of adjusting the task allocation of the target core cluster, thereby improving the efficiency of the adjustment.
图3是本公开实施例中一种任务调度方法的流程图,参照图3,本公开实施例提供一种任务调度方法,应用于众核系统的第一核心簇的第一控制核,所述任务调度方法包括:FIG. 3 is a flowchart of a task scheduling method in an embodiment of the present disclosure. Referring to FIG. 3 , an embodiment of the present disclosure provides a task scheduling method, which is applied to a first control core of a first core cluster of a many-core system. Task scheduling methods include:
在步骤S210中,对第一核心簇进行负载检测,判断所述第一核心簇是否为目标核心簇,所述目标核心簇为需要调整任务分配的核心簇;In step S210, load detection is performed on the first core cluster to determine whether the first core cluster is a target core cluster, and the target core cluster is a core cluster that needs to adjust task allocation;
在步骤S220中,在所述第一核心簇是所述目标核心簇的情况下,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配;In step S220, when the first core cluster is the target core cluster, adjust the task allocation of the first core cluster according to the load detection result of the first core cluster;
其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述第一核心簇为至少一个所述核心簇中的一个。The many-core system includes a plurality of cores, at least one of the cores constitutes the core cluster, the many-core system includes at least one of the core clusters, and the first core cluster is one of the at least one core cluster. One.
在本公开实施例中,众核系统中任一个核心簇(称为第一核心簇)通过其控制核(称为第一控制核)通过执行步骤S210至步骤S220进行负载检测,在该第一核心簇需要调整任务分配时,对该第一核心簇的任务分配进行调整。通过这种方式,可实现众核系统中各个核心簇的负载检测及任务调整。In the embodiment of the present disclosure, any one core cluster (referred to as the first core cluster) in the many-core system performs load detection by executing steps S210 to S220 through its control core (referred to as the first control core). When the core cluster needs to adjust the task allocation, the task allocation of the first core cluster is adjusted. In this way, the load detection and task adjustment of each core cluster in the many-core system can be realized.
在本公开实施例中,负载检测是指判断核心簇处理的任务与核心簇的计算资源是否匹配。负载检测的结果可以是目标核心簇超负荷,在步骤S220中调整任务分配可以是增加目标核心簇中的核心数量以增加目标核心簇的计算资源;负载检测的结果也可以是目标核心簇计算资源过剩,在步骤S220中调整任务分配可以是减少目标核心簇中的核心数量以节约众核系统的计算资源,提高众核系统计算资源的利用率;负载检测结果还可以是核心簇处理的任务与核心簇的计算资源相匹配。本公开实施例对此不做限定。In the embodiment of the present disclosure, the load detection refers to determining whether the tasks processed by the core cluster match the computing resources of the core cluster. The result of the load detection may be that the target core cluster is overloaded, and adjusting the task allocation in step S220 may be to increase the number of cores in the target core cluster to increase the computing resources of the target core cluster; the result of the load detection may also be that the target core cluster computing resources Excessive, in step S220, adjusting the task allocation can be to reduce the number of cores in the target core cluster to save the computing resources of the many-core system and improve the utilization rate of the computing resources of the many-core system; the load detection result can also be the core cluster processing task and The computing resources of the core cluster are matched. This embodiment of the present disclosure does not limit this.
在本公开实施例提供的任务调度方法中,由众核系统中核心簇的控制核对核心簇进行负载检测,在核心簇需要调整任务分配时调整核心簇的任务分配,能够在核心簇超负荷时动态地增加计算资源,还能够在核心簇计算资源过剩时及时的释放计算资源,从而 能够提高众核系统任务处理的灵活性,减少部分核心簇处理效率降低导致众核系统整体处理效率降低的情况,同时提高众核系统计算资源的利用效率。In the task scheduling method provided by the embodiment of the present disclosure, the control of the core cluster in the many-core system checks the load of the core cluster, and adjusts the task allocation of the core cluster when the core cluster needs to adjust the task allocation, so that when the core cluster is overloaded Dynamically increase computing resources, and can release computing resources in time when the core cluster computing resources are excessive, thereby improving the flexibility of many-core system task processing and reducing the overall processing efficiency of the many-core system due to the reduction of the processing efficiency of some core clusters. , while improving the utilization efficiency of computing resources in many-core systems.
作为一种可选的实施方式,如果第一控制核通过负载检测发现第一控制核超负荷或计算资源过剩,则判定第一核心簇为目标核心簇,需要调整任务分配。As an optional implementation manner, if the first control core finds that the first control core is overloaded or has excess computing resources through load detection, it is determined that the first core cluster is the target core cluster, and task allocation needs to be adjusted.
相应地,在一些实施例中,步骤S210包括:Correspondingly, in some embodiments, step S210 includes:
判断所述第一核心簇是否超负载或计算资源过剩;Determine whether the first core cluster is overloaded or has excess computing resources;
在所述第一核心簇超负载或计算资源过剩的情况下,判定所述第一核心簇为所述目标核心簇。When the first core cluster is overloaded or has excess computing resources, it is determined that the first core cluster is the target core cluster.
举例来说,如果第一核心簇中各个核心处理一个阶段(phase)的计算任务所需的时间明显超出各个核心簇中核心的平均值,则可认为第一核心簇超负载;反之,第一核心簇中各个核心处理一个阶段(phase)的计算任务所需的时间明显低于各个核心簇中核心的平均值,则可认为第一核心簇计算资源过剩。For example, if the time required for each core in the first core cluster to process a phase of computing tasks significantly exceeds the average value of the cores in each core cluster, the first core cluster may be considered overloaded; otherwise, the first core cluster is overloaded. If the time required by each core in the core cluster to process a computing task of a phase is significantly lower than the average value of the cores in each core cluster, it can be considered that the first core cluster has excess computing resources.
在一些实施例中,如果第一核心簇超负载或计算资源过剩,则可判定第一核心簇为目标核心簇,需要调整任务分配。应当理解,本领域技术人员可根据实际情况设定超负载或计算资源过剩的具体判断条件,本公开对此不作限制。In some embodiments, if the first core cluster is overloaded or has excess computing resources, it may be determined that the first core cluster is the target core cluster, and task allocation needs to be adjusted. It should be understood that those skilled in the art can set specific judgment conditions for overload or excess computing resources according to actual situations, which are not limited in the present disclosure.
通过这种方式,能够实现目标核心簇的判定,提高判定的效率。In this way, the determination of the target core cluster can be realized, and the efficiency of the determination can be improved.
在本公开实施例中,各个核心簇以流水线方式处理任务时,多个核心簇具有统一的同步周期。通常,同步周期由运行时长最大的核心簇的运行时长决定的。运行时长越大,表示核心簇的负载越大。作为一种可选的实施方式,可以根据一定时间段内目标核心簇的运行时长与其他核心簇的运行时长的关系,判断目标核心簇是否超负荷。In the embodiment of the present disclosure, when each core cluster processes tasks in a pipeline manner, multiple core clusters have a uniform synchronization period. Typically, the synchronization period is determined by the runtime of the core cluster with the largest runtime. The longer the runtime, the higher the load on the core cluster. As an optional implementation manner, it may be determined whether the target core cluster is overloaded according to the relationship between the running duration of the target core cluster and the running durations of other core clusters within a certain period of time.
相应地,在一些实施例中,判断第一核心簇是否超负载的步骤包括:Accordingly, in some embodiments, the step of determining whether the first core cluster is overloaded includes:
确定所述第一核心簇在预定时间段内的多个同步周期的运行时长;determining the running duration of multiple synchronization cycles of the first core cluster within a predetermined time period;
根据所述预定时间段内的多个同步周期的运行时长,确定所述第一核心簇在至少一个所述核心簇中运行时长最大的同步周期的数量;According to the running durations of multiple synchronization cycles in the predetermined time period, determine the number of synchronization cycles with the longest running duration of the first core cluster in at least one of the core clusters;
在所述第一核心簇运行时长最大的同步周期的数量超过预定数值的情况下,判定所述第一核心簇超负荷。When the number of synchronization cycles with the longest running duration of the first core cluster exceeds a predetermined value, it is determined that the first core cluster is overloaded.
举例来说,预定时间段内可以包括多个同步周期(数量大于或等于N),可先确定出第一核心簇在预定时间段内的多个同步周期的运行时长;再将各个同步周期的运行时长,分别与各个核心簇的同步周期的运行时长进行排序,确定出运行时长最大的同步周期。如果第一核心簇中存在运行时长最大的同步周期,且数量N超过预定数值,则可判定第一核心簇超负荷。For example, the predetermined time period may include multiple synchronization cycles (the number is greater than or equal to N), and the running durations of the multiple synchronization cycles of the first core cluster in the predetermined time period may be determined first; The running duration is sorted with the running duration of the synchronization cycle of each core cluster, and the synchronization cycle with the longest running duration is determined. If there is a synchronization period with the longest running time in the first core cluster, and the number N exceeds a predetermined value, it can be determined that the first core cluster is overloaded.
应当理解,本领域技术人员可根据实际情况设定预定时间段的时长,以及运行时长最大的同步周期的预定数量,本公开对此不作限制。It should be understood that those skilled in the art can set the duration of the predetermined time period and the predetermined number of synchronization cycles with the longest running duration according to actual conditions, which are not limited in the present disclosure.
通过这种方式,能够提高对超负荷的核心簇判断的准确性。In this way, the accuracy of judging an overloaded core cluster can be improved.
作为另一种可选的实施方式,可以预设一个预定同步周期,当目标核心簇的运行时长超过预定同步周期时,则表示目标核心簇超负荷。As another optional implementation manner, a predetermined synchronization period may be preset, and when the running duration of the target core cluster exceeds the predetermined synchronization period, it means that the target core cluster is overloaded.
相应地,在一些实施例中,判断第一核心簇是否超负载的步骤包括:Accordingly, in some embodiments, the step of determining whether the first core cluster is overloaded includes:
判断所述第一核心簇的运行时长是否超过预定同步周期;judging whether the running duration of the first core cluster exceeds a predetermined synchronization period;
在所述第一核心簇的运行时长超过所述预定同步周期的情况下,判定所述第一核心簇超负载。In the case that the running time of the first core cluster exceeds the predetermined synchronization period, it is determined that the first core cluster is overloaded.
举例来说,该预定同步周期可设定为:各个核心簇正常计算时处理一个阶段(phase)的计算任务所需的时间,在到达预定同步周期时,可对核心簇中的各核心进行phase切换,进行下一phase的处理。针对第一核心簇,如果该第一核心簇中全部或部分核心的一个阶段的运行时长超过预定同步周期,则可认为该第一核心簇超负荷。本公开对预定同步周期的具体取值不作限制。For example, the predetermined synchronization period can be set as: the time required for each core cluster to process a computing task in one phase during normal computing, and when the predetermined synchronization period is reached, each core in the core cluster can be phased Switch to the next phase. For the first core cluster, if the running duration of a phase of all or part of the cores in the first core cluster exceeds a predetermined synchronization period, the first core cluster may be considered to be overloaded. The present disclosure does not limit the specific value of the predetermined synchronization period.
通过这种方式,能够提高对超负荷的核心簇判断的准确性。In this way, the accuracy of judging an overloaded core cluster can be improved.
在本公开实施例中,在步骤S220中调整目标核心簇任务分配时,提供一种不停机调整目标核心簇的任务分配的方案。举例来说,当需要调整目标核心簇的任务分配时,可动态申请空闲核心,重新组建一个新的核心簇,用新的核心簇替代目标核心簇;其中,组建新的核心簇时,无需暂停目标核心簇的运行。在新的核心簇替代目标核心簇之后,可以解散目标核心簇,目标核心簇中的核心变为空闲核心,从而释放计算资源。In the embodiment of the present disclosure, when adjusting the task allocation of the target core cluster in step S220, a solution for adjusting the task allocation of the target core cluster without stopping is provided. For example, when it is necessary to adjust the task allocation of the target core cluster, you can dynamically apply for idle cores, re-establish a new core cluster, and replace the target core cluster with the new core cluster; among them, when forming a new core cluster, there is no need to pause. The operation of the target core cluster. After the new core cluster replaces the target core cluster, the target core cluster may be disbanded, and the cores in the target core cluster become idle cores, thereby releasing computing resources.
作为一种可选的实施方式,由目标核心簇的控制核确定新的核心簇的控制核,新的核心簇的控制核通过与目标核心簇的控制核进行交互,完成新的核心簇的组建。As an optional implementation manner, the control core of the target core cluster determines the control core of the new core cluster, and the control core of the new core cluster interacts with the control core of the target core cluster to complete the formation of the new core cluster .
图4是本公开实施例中一种任务调度方法的流程图。FIG. 4 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
在一些实施例中,参见图4,在步骤S220中,根据第一核心簇的负载检测结果调整第一核心簇的任务分配的步骤包括:In some embodiments, referring to FIG. 4, in step S220, the step of adjusting the task allocation of the first core cluster according to the load detection result of the first core cluster includes:
在步骤S221中,申请空闲核心作为替代所述第一核心簇的第二核心簇的第二控制核;In step S221, apply for an idle core as the second control core of the second core cluster that replaces the first core cluster;
在步骤S222中,响应于所述第二控制核获取所述第一核心簇处理的任务的任务信息的请求信令,将所述第一核心簇处理的任务的任务信息传输到所述第二控制核;In step S222, in response to the request signaling of the second control core to acquire the task information of the task processed by the first core cluster, transmit the task information of the task processed by the first core cluster to the second control core control nucleus;
在步骤S223中,响应于所述第二控制核获取原始数据的请求信令,获取所述原始数据;In step S223, in response to the request signaling of the second control core to obtain the original data, obtain the original data;
在步骤S224中,将所述原始数据传输到所述第二控制核;In step S224, transmitting the original data to the second control core;
在步骤S225中,将接收到的所述第二核心簇的输入输出信息添加到由多个核心簇组成的流水线中;In step S225, the received input and output information of the second core cluster is added to the pipeline composed of multiple core clusters;
在步骤S226中,向所述第二控制核发送启动信令。In step S226, start signaling is sent to the second control core.
举例来说,当需要调整目标核心簇的任务分配时,第一控制核可在步骤S221中动态申请空闲核心,作为替代第一核心簇的第二核心簇的第二控制核。For example, when the task allocation of the target core cluster needs to be adjusted, the first control core can dynamically apply for an idle core in step S221 as the second control core of the second core cluster that replaces the first core cluster.
在一些实施例中,第二控制核可向第一控制核发送请求信令,用于请求第一核心簇处理的任务的任务信息;第一控制核接收到该请求信令时,可在步骤S22中响应于该请求信令,将第一核心簇处理的任务的任务信息传输到所述第二控制核。In some embodiments, the second control core may send a request signaling to the first control core, which is used to request task information of the task processed by the first core cluster; when the first control core receives the request signaling, it may In S22, in response to the request signaling, the task information of the task processed by the first core cluster is transmitted to the second control core.
在本公开实施例中,对目标核心簇处理的任务的任务信息不做限定。例如,任务信 息可以包括第二核心簇中各个核心的配置信息,也可以包括表示第二核心簇中各个核心的存储内容的信息。In the embodiment of the present disclosure, the task information of the task processed by the target core cluster is not limited. For example, the task information may include configuration information of each core in the second core cluster, and may also include information representing the storage content of each core in the second core cluster.
在一些实施例中,第二控制核在确定所要处理的任务的任务信息后,可组建用于替代第一核心簇的第二核心簇。例如,根据任务信息向众核系统申请多个空闲核心;对多个空闲核心进行任务配置。In some embodiments, after determining the task information of the task to be processed, the second control core may form a second core cluster to replace the first core cluster. For example, apply to the many-core system for multiple idle cores according to task information; configure tasks for multiple idle cores.
在一些实施例中,在完成任务配置后,第二控制核可向第一控制核发送请求信令,用于请求第一核心簇处理的任务的原始数据。第一控制核接收到该请求信令时,可在步骤S223中,响应于该请求信令,获取原始数据,并在步骤S224中,将原始数据传输到第二控制核。In some embodiments, after completing the task configuration, the second control core may send request signaling to the first control core for requesting raw data of the task processed by the first core cluster. When the first control core receives the request signaling, in step S223, in response to the request signaling, obtain the original data, and in step S224, transmit the original data to the second control core.
本公开实施例对如何执行步骤S223获取原始数据不做限定。作为一种可选的实施方式,第一控制核获取所述原始数据的步骤,包括:根据第一核心簇任务配置时的原始编译信息,从第一核心簇中的各核心查找数据,重组为所述原始数据。This embodiment of the present disclosure does not limit how to perform step S223 to obtain the original data. As an optional implementation manner, the step of acquiring the original data by the first control core includes: searching for data from each core in the first core cluster according to the original compilation information when the tasks of the first core cluster are configured, and reorganizing them into the raw data.
在一些实施例中,第二控制核在接收到原始数据后,将原始数据分配到第二核心簇中的各个核心,从而使得第二核心簇能够处理第一核心簇处理的任务。进而,第二控制核可确定第二核心簇的输入输出路由,并将第二核心簇的输入输出信息发送到第一控制核。In some embodiments, after receiving the raw data, the second control core allocates the raw data to each core in the second core cluster, so that the second core cluster can process the tasks processed by the first core cluster. Further, the second control core may determine the input and output routes of the second core cluster, and send the input and output information of the second core cluster to the first control core.
在一些实施例中,第一控制核可在步骤S225中,将接收到的第二核心簇的输入输出信息添加到由多个核心簇组成的流水线中。In some embodiments, the first control core may add the received input and output information of the second core cluster to a pipeline composed of multiple core clusters in step S225.
在本公开实施例中,第一控制核通过将第二核心簇的输入输出信息替换到由多个核心簇组成的流水线中,将第二核心簇添加到流水线中,以使第二核心簇进入正常的计算任务流程。In the embodiment of the present disclosure, the first control core adds the second core cluster to the pipeline by replacing the input and output information of the second core cluster into the pipeline composed of multiple core clusters, so that the second core cluster enters the pipeline. Normal computing task flow.
在一些实施例中,第一控制核可在步骤S226中,向第二控制核发送启动信令,以使第二核心簇开始替代第一核心簇处理计算任务。In some embodiments, the first control core may send a start signaling to the second control core in step S226, so that the second core cluster starts to replace the first core cluster to process computing tasks.
在一些实施例中,步骤S220还包括:In some embodiments, step S220 further includes:
接收到所述第二控制核发送的所述第二核心簇已启动的消息,解散所述第一核心簇。After receiving the message that the second core cluster has been started sent by the second control core, the first core cluster is disbanded.
在本公开实施例中,当第二核心簇启动执行第一核心簇处理的任务后,可解散第一核心簇,使得第一核心簇中的核心成为空闲核心,从而释放计算资源。In the embodiment of the present disclosure, after the second core cluster starts the task of executing the processing of the first core cluster, the first core cluster can be disbanded, so that the cores in the first core cluster become idle cores, thereby releasing computing resources.
通过这种方式,能够通过第二核心簇替代第一核心簇处理计算任务,实现调整第一核心簇的任务分配的过程,从而提高众核系统任务处理的灵活性。提高众核系统计算资源的利用效率。In this way, the second core cluster can replace the first core cluster to process computing tasks, so as to realize the process of adjusting the task allocation of the first core cluster, thereby improving the flexibility of task processing in the many-core system. Improve the utilization efficiency of computing resources in many-core systems.
在本公开实施例中,在步骤S220中调整第一核心簇任务分配时,提供一种停机调整第一核心簇的任务分配的方案。举例来说,当需要调整第一核心簇的任务分配时,动态申请空闲核心作为第一核心簇的核心,并进行任务配置。In the embodiment of the present disclosure, when adjusting the task allocation of the first core cluster in step S220, a solution is provided for adjusting the task allocation of the first core cluster by shutting down. For example, when it is necessary to adjust the task allocation of the first core cluster, dynamically apply for an idle core as the core of the first core cluster, and perform task configuration.
相应地,在一些实施例中,步骤S220包括:申请空闲核心作为所述第一核心簇所属的核心;对所述第一核心簇的核心重新进行任务分配。Correspondingly, in some embodiments, step S220 includes: applying for an idle core as a core to which the first core cluster belongs; and re-assigning tasks to the cores of the first core cluster.
也就是说,第一控制核可向众核系统的高级别控制核发送增加核心的请求,以使高 级别控制核为第一核心簇分配新的空闲核心,作为第一核心簇的核心。第一控制核可根据实际情况设定所增加的核心的数量,本公开对此不作限制。That is, the first control core can send a request for adding cores to the high-level control core of the many-core system, so that the high-level control core allocates a new idle core to the first core cluster as the core of the first core cluster. The first control core may set the number of cores to be added according to actual conditions, which is not limited in the present disclosure.
在一些实施例中,在增加核心后,第一控制核可重新对第一核心簇的各个核心进行任务配置,并在任务配置完成后,控制第一核心簇的各个核心处理计算任务,从而实现调整第一核心簇的任务分配的过程。本公开对任务配置的具体方式不作限制。In some embodiments, after adding cores, the first control core may reconfigure tasks for each core of the first core cluster, and after the task configuration is completed, control each core of the first core cluster to process computing tasks, so as to achieve The process of adjusting the task assignment of the first core cluster. The present disclosure does not limit the specific manner of task configuration.
需要说明的是,在本公开实施例中,包括全局通知机制,例如,将无效状态信息和有效状态信息广播通知众核系统中的所有核心及个人电脑(PC,Personal Computer)端。这样,便于众核系统中其他核心簇、核心以及PC端根据第一核心簇的状态执行任务切换、任务暂停或者任务重启等操作。It should be noted that, in the embodiment of the present disclosure, a global notification mechanism is included, for example, all cores and personal computer (PC, Personal Computer) terminals in the many-core system are broadcasted to notify invalid state information and valid state information. In this way, it is convenient for other core clusters, cores and PCs in the many-core system to perform operations such as task switching, task suspension or task restart according to the state of the first core cluster.
图5是本公开实施例中一种任务调度方法的流程图。FIG. 5 is a flowchart of a task scheduling method in an embodiment of the present disclosure.
参照图5,本公开实施例提供一种任务调度方法,应用于众核系统的核心,该方法包括:Referring to FIG. 5 , an embodiment of the present disclosure provides a task scheduling method, which is applied to the core of a many-core system, and the method includes:
在步骤S310中,发送获取目标核心簇处理的任务的任务信息的请求信令,以获取所述任务信息;In step S310, a request signaling for obtaining task information of the task processed by the target core cluster is sent to obtain the task information;
在步骤S320中,根据获取的所述任务信息,组建用于替代所述目标核心簇的第二核心簇,所述核心为所述第二核心簇的第二控制核;In step S320, according to the acquired task information, a second core cluster for replacing the target core cluster is formed, and the core is the second control core of the second core cluster;
在步骤S330中,在所述第二核心簇上运行所述目标核心簇处理的任务;In step S330, the task processed by the target core cluster is executed on the second core cluster;
其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述目标核心簇为需要调整任务分配的所述核心簇。The many-core system includes a plurality of cores, at least one of the cores constitutes the core cluster, the many-core system includes at least one of the core clusters, and the target core cluster is the core cluster that needs to adjust task allocation .
在本公开实施例中,提供一种不停机调整目标核心簇的任务分配的方案。举例来说,当需要调整目标核心簇的任务分配时,动态申请空闲核心,重新组建一个第二核心簇,用第二核心簇替代目标核心簇;其中,组建第二核心簇时,无需暂停目标核心簇的运行。在第二核心簇替代目标核心簇之后,可以解散目标核心簇,目标核心簇中的核心变为空闲核心,从而释放计算资源。In an embodiment of the present disclosure, a solution for adjusting task allocation of a target core cluster without stopping the system is provided. For example, when it is necessary to adjust the task allocation of the target core cluster, dynamically apply for idle cores, re-establish a second core cluster, and replace the target core cluster with the second core cluster; among which, when forming the second core cluster, the target does not need to be suspended. The operation of the core cluster. After the second core cluster replaces the target core cluster, the target core cluster may be disbanded, and the cores in the target core cluster become idle cores, thereby releasing computing resources.
在本公开实施例中,可以由目标核心簇的控制核确定第二核心簇的第二控制核,也可以由高级别控制核确定第二核心簇的第二控制核。本公开实施例对此不做限定。第二控制核通过步骤S310至步骤S330与目标核心簇的控制核或高级别控制核进行交互,完成第二核心簇的组建。In the embodiment of the present disclosure, the second control core of the second core cluster may be determined by the control core of the target core cluster, or the second control core of the second core cluster may be determined by the high-level control core. This embodiment of the present disclosure does not limit this. The second control core interacts with the control core or high-level control core of the target core cluster through steps S310 to S330 to complete the formation of the second core cluster.
在本公开实施例中,在步骤S310中,第二控制核可向高级别控制核发送获取目标核心簇处理的任务的任务信息的请求信令,以获取任务信息;也可以向目标核心簇的控制核发送获取目标核心簇处理的任务的任务信息的请求信令,以获取任务信息。本公开实施例对此不做限定。In the embodiment of the present disclosure, in step S310, the second control core may send a request signaling for acquiring task information of the task processed by the target core cluster to the high-level control core, so as to obtain the task information; The control core sends a request signaling for acquiring task information of the task processed by the target core cluster to acquire the task information. This embodiment of the present disclosure does not limit this.
在本公开实施例中,在步骤S320中,第二控制核可根据获取的任务信息,组建用于替代目标核心簇的第二核心簇;进而在步骤S330中,在第二核心簇上运行目标核心簇处理的任务。In the embodiment of the present disclosure, in step S320, the second control core may form a second core cluster for replacing the target core cluster according to the acquired task information; and then in step S330, run the target on the second core cluster The tasks handled by the core cluster.
在本公开实施例提供的任务调度方法中,由高级别控制核或需要调整任务分配的核 心簇的控制核确定第二控制核,然后由第二控制核组建第二核心簇,从而能够在不停机的情况下,在核心簇超负荷时动态地增加计算资源,在核心簇计算资源过剩时及时的释放计算资源,从而能够提高众核系统任务处理的灵活性,避免部分核心簇处理效率降低导致众核系统整体处理效率降低,同时提高了众核系统计算资源的利用效率。In the task scheduling method provided by the embodiment of the present disclosure, the second control core is determined by the high-level control core or the control core of the core cluster whose task allocation needs to be adjusted, and then the second control core forms the second core cluster, so that the second control core can be In the case of shutdown, the computing resources are dynamically increased when the core cluster is overloaded, and the computing resources are released in time when the core cluster computing resources are excessive, which can improve the flexibility of task processing in the many-core system and avoid the reduction of the processing efficiency of some core clusters. The overall processing efficiency of the many-core system is reduced, while the utilization efficiency of the computing resources of the many-core system is improved.
图6是本公开实施例中一种任务调度方法的流程图。参照图6,在一些实施例中,步骤S320包括:FIG. 6 is a flowchart of a task scheduling method in an embodiment of the present disclosure. 6, in some embodiments, step S320 includes:
在步骤S321中,根据所述任务信息申请多个空闲核心;In step S321, apply for multiple idle cores according to the task information;
在步骤S322中,对多个所述空闲核心进行任务配置;In step S322, task configuration is performed on a plurality of the idle cores;
在步骤S323中,发送获取原始数据的请求信令,以获取所述原始数据;In step S323, sending a request signaling for obtaining raw data to obtain the raw data;
在步骤S324中,根据所述任务信息将获取的所述原始数据分配到各个所述空闲核心;In step S324, the obtained raw data is allocated to each of the idle cores according to the task information;
在步骤S325中,确定所述第二核心簇的输入输出信息;In step S325, determine the input and output information of the second core cluster;
在步骤S326中,将所述第二核心簇的输入输出信息发送到所述目标核心簇的控制核;In step S326, the input and output information of the second core cluster is sent to the control core of the target core cluster;
其中,步骤S330包括:Wherein, step S330 includes:
在步骤S331中,响应于所述目标核心簇的控制核发送的启动信令,在所述第二核心簇上运行所述目标核心簇处理的任务。In step S331, in response to the start signaling sent by the control core of the target core cluster, the task processed by the target core cluster is executed on the second core cluster.
举例来说,第二控制核获取到任务信息后,可在步骤S321中根据任务信息申请多个空闲核心。例如,根据任务信息中目标核心簇处理的任务的计算量、完成时间要求等参数,确定出执行该任务所需的空闲核心的数量,该数量可能大于目标核心簇当前的核心数量。本公开对待申请的空闲核心的具体数量不作限制。For example, after acquiring the task information, the second control core can apply for multiple idle cores according to the task information in step S321. For example, the number of idle cores required to execute the task is determined according to parameters such as the calculation amount and completion time requirements of the task processed by the target core cluster in the task information, which may be greater than the current number of cores in the target core cluster. The present disclosure does not limit the specific number of idle cores to be applied for.
在一些实施例中,根据待申请的空闲核心的数量,第二控制核可向高级别控制核发送空闲核心的分配请求,以使高级别控制核为第二核心簇分配相应数量的空闲核心。In some embodiments, according to the number of idle cores to be applied for, the second control core may send an allocation request for idle cores to the high-level control core, so that the high-level control core allocates a corresponding number of idle cores to the second core cluster.
在一些实施例中,在申请到多个空闲核心后,第二控制核可根据任务信息,在步骤S322中对多个空闲核心进行任务配置,例如对任务进行拆分并分配给各个空闲核心。本公开对任务配置的具体方式不作限制。In some embodiments, after applying for multiple idle cores, the second control core may perform task configuration on the multiple idle cores in step S322 according to the task information, for example, split tasks and assign them to each idle core. The present disclosure does not limit the specific manner of task configuration.
在本公开实施例中,对空闲核心进行任务配置可以包括确定个核心对应的配置信息,还可以包括明确各核心应当存储的信息。本公开实施例对此不做限定。In this embodiment of the present disclosure, performing task configuration on idle cores may include determining configuration information corresponding to each core, and may also include specifying information that each core should store. This embodiment of the present disclosure does not limit this.
在一些实施例中,在完成任务配置后,第二控制核可在步骤S323中,向目标核心簇的控制核发送获取原始数据的请求信令,以获取原始数据。In some embodiments, after completing the task configuration, the second control core may, in step S323, send a request signaling for obtaining the original data to the control core of the target core cluster, so as to obtain the original data.
在一些实施例中,第二控制核在接收到目标核心簇的控制核发送的原始数据时,可在在步骤S324中,根据任务信息以及任务配置情况,将获取的原始数据分配到各个空闲核心,使得第二核心簇能够处理目标核心簇处理的任务。In some embodiments, when the second control core receives the original data sent by the control core of the target core cluster, in step S324, according to the task information and the task configuration, the acquired original data may be allocated to each idle core , so that the second core cluster can process the tasks processed by the target core cluster.
在一些实施例中,第二控制核可在步骤S325中确定第二核心簇的输入输出路由,得到输入输出信息,并在步骤S326中将输入输出信息发送到目标核心簇的控制核。In some embodiments, the second control core may determine the input and output routes of the second core cluster in step S325, obtain input and output information, and send the input and output information to the control core of the target core cluster in step S326.
在一些实施例中,目标核心簇的控制核在接收输入输出信息后将第二核心簇的输入 输出信息替换到由多个核心簇组成的流水线中,将第二核心簇添加到流水线中,以使第二核心簇进入正常的计算任务流程。目标核心簇的控制核将第二核心簇的输入输出信息添加到流水线中后,会向第二核心簇的第二控制核发送启动信令。In some embodiments, after receiving the input and output information, the control core of the target core cluster replaces the input and output information of the second core cluster into a pipeline composed of a plurality of core clusters, and adds the second core cluster to the pipeline to Make the second core cluster enter the normal computing task flow. After the control core of the target core cluster adds the input and output information of the second core cluster to the pipeline, it sends a start signaling to the second control core of the second core cluster.
在一些实施例中,第二控制核在步骤S331中,响应于启动信令,控制第二核心簇运行目标核心簇处理的任务,从而实现了组建用于替代目标核心簇的第二核心簇的整个过程。In some embodiments, in step S331, the second control core controls the second core cluster to execute the task processed by the target core cluster in response to the activation signaling, thereby realizing the formation of a second core cluster for replacing the target core cluster. the whole process.
在本公开实施例中,在步骤S331之后,所述任务调度方法还包括:向所述目标核心簇的控制核发送所述第二核心簇已启动的消息,以使所述目标核心簇解散。In this embodiment of the present disclosure, after step S331, the task scheduling method further includes: sending a message that the second core cluster has been started to the control core of the target core cluster, so as to dissolve the target core cluster.
也就是说,当第二核心簇启动执行目标核心簇处理的任务后,可目标核心簇的控制核发送所述第二核心簇已启动的消息。目标核心簇的控制核接收到该消息后,可解散目标核心簇,使得目标核心簇中的核心成为空闲核心,从而释放计算资源。That is, after the second core cluster starts the task of executing the processing of the target core cluster, the control core of the target core cluster may send a message that the second core cluster has been started. After receiving the message, the control core of the target core cluster can dissolve the target core cluster, so that the cores in the target core cluster become idle cores, thereby releasing computing resources.
根据本公开的实施例,还提供一种任务调度的控制装置,应用于众核系统的核心,所述控制方法装置:According to an embodiment of the present disclosure, a control device for task scheduling is also provided, which is applied to the core of a many-core system, and the control method includes:
第一检测模块,用于对众核系统的至少一个核心簇进行负载检测,判断所检测的所述核心簇中是否存在目标核心簇,所述目标核心簇为至少一个所述核心簇中需要调整任务分配的核心簇;第一调整模块,用于在存在所述目标核心簇的情况下,根据负载检测结果控制所述目标核心簇调整任务分配;其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇。The first detection module is used to perform load detection on at least one core cluster of the many-core system, and determine whether there is a target core cluster in the detected core cluster, and the target core cluster is at least one of the core clusters that needs to be adjusted a core cluster for task allocation; a first adjustment module, configured to control the target core cluster to adjust task allocation according to the load detection result in the presence of the target core cluster; wherein the many-core system includes a plurality of cores, at least One of the cores constitutes the core cluster, and the many-core system includes at least one of the core clusters.
在一些实施例中,所述第一检测模块,用于:判断所检测的所述核心簇中是否存在超负载或计算资源过剩的核心簇;在所检测的所述核心簇中存在超负载或计算资源过剩的核心簇的情况下,判定超负载或计算资源过剩的核心簇为所述目标核心簇。In some embodiments, the first detection module is configured to: determine whether there is an overloaded core cluster or a core cluster with excess computing resources in the detected core cluster; In the case of a core cluster with excess computing resources, it is determined that the core cluster with excessive load or excess computing resources is the target core cluster.
在一些实施例中,所述第一检测模块,用于:判断预定时间段内,是否存在候选目标核心簇,所述候选目标核心簇为在N个同步周期内运行时间均最长的核心簇,其中,N为大于或等于预定数量的自然数;在存在所述候选目标核心簇的情况下,判定存在超负载的核心簇;其中,所述候选目标核心簇为超负载的核心簇。In some embodiments, the first detection module is configured to: determine whether there is a candidate target core cluster within a predetermined period of time, where the candidate target core cluster is the core cluster with the longest running time in N synchronization cycles , where N is a natural number greater than or equal to a predetermined number; when the candidate target core cluster exists, it is determined that there is an overloaded core cluster; wherein, the candidate target core cluster is an overloaded core cluster.
在一些实施例中,所述第一检测模块,用于:判断是否存在运行时长超过预定同步周期的核心簇;在存在运行时长超过所述预定同步周期的核心簇的情况下,判定存在超负载的核心簇,其中,运行时长超过所述预定同步周期的核心簇为超负载的核心簇。In some embodiments, the first detection module is configured to: determine whether there is a core cluster whose running duration exceeds a predetermined synchronization period; in the case of a core cluster whose running duration exceeds the predetermined synchronization period, determine that there is overload A core cluster, wherein a core cluster whose running time exceeds the predetermined synchronization period is an overloaded core cluster.
在一些实施例中,所述第一调整模块,用于:申请空闲核心作为替代所述目标核心簇的第二核心簇的第二控制核;响应于所述第二控制核获取所述目标核心簇处理的任务的任务信息的请求信令,将所述目标核心簇处理的任务的任务信息传输到所述第二控制核。In some embodiments, the first adjustment module is configured to: apply for an idle core as a second control core of a second core cluster that replaces the target core cluster; acquire the target core in response to the second control core The request signaling of the task information of the task processed by the cluster transmits the task information of the task processed by the target core cluster to the second control core.
根据本公开的实施例,还提供一种任务调度装置,应用于众核系统的第一核心簇的第一控制核,所述任务调度装置包括:According to an embodiment of the present disclosure, there is also provided a task scheduling apparatus, which is applied to a first control core of a first core cluster of a many-core system, and the task scheduling apparatus includes:
第二检测模块,用于对第一核心簇进行负载检测,判断所述第一核心簇是否为目标核心簇,所述目标核心簇为需要调整任务分配的核心簇;The second detection module is configured to perform load detection on the first core cluster, and determine whether the first core cluster is a target core cluster, and the target core cluster is a core cluster that needs to adjust task allocation;
第二调整模块,用于在所述第一核心簇是所述目标核心簇的情况下,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配;其中,所述众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述第一核心簇为至少一个所述核心簇中的一个。A second adjustment module, configured to adjust the task allocation of the first core cluster according to the load detection result of the first core cluster when the first core cluster is the target core cluster; The many-core system includes a plurality of cores, at least one of the cores forms the core cluster, the many-core system includes at least one of the core clusters, and the first core cluster is one of the at least one core cluster .
在一些实施例中,所述第二检测模块,用于:判断所述第一核心簇是否超负载或计算资源过剩;在所述第一核心簇超负载或计算资源过剩的情况下,判定所述第一核心簇为所述目标核心簇。In some embodiments, the second detection module is configured to: determine whether the first core cluster is overloaded or have excess computing resources; in the case of overloading or excess computing resources of the first core cluster, determine whether the first core cluster is overloaded or has excess computing resources. The first core cluster is the target core cluster.
在一些实施例中,所述第二检测模块,用于:确定所述第一核心簇在预定时间段内的多个同步周期的运行时长;根据所述预定时间段内的多个同步周期的运行时长,确定所述第一核心簇在至少一个所述核心簇中运行时长最大的同步周期的数量;在所述第一核心簇运行时长最大的同步周期的数量超过预定数值的情况下,判定所述第一核心簇超负荷。In some embodiments, the second detection module is configured to: determine the running duration of multiple synchronization cycles of the first core cluster within a predetermined time period; The running duration is to determine the number of synchronization cycles with the longest running duration of the first core cluster in at least one of the core clusters; when the number of synchronization cycles with the longest running duration of the first core cluster exceeds a predetermined value, determine The first core cluster is overloaded.
在一些实施例中,所述第二检测模块,用于:判断所述第一核心簇的运行时长是否超过预定同步周期;在所述第一核心簇的运行时长超过所述预定同步周期的情况下,判定所述核心簇超负载。In some embodiments, the second detection module is configured to: determine whether the running duration of the first core cluster exceeds a predetermined synchronization period; when the running duration of the first core cluster exceeds the predetermined synchronization period Next, it is determined that the core cluster is overloaded.
在一些实施例中,所述第二调整模块,用于:申请空闲核心作为替代所述第一核心簇的第二核心簇的第二控制核;响应于所述第二控制核获取所述第一核心簇处理的任务的任务信息的请求信令,将所述第一核心簇处理的任务的任务信息传输到所述第二控制核;响应于所述第二控制核获取原始数据的请求信令,获取所述原始数据;将所述原始数据传输到所述第二控制核;将接收到的所述第二核心簇的输入输出信息添加到由多个核心簇组成的流水线中;向所述第二控制核发送启动信令。In some embodiments, the second adjustment module is configured to: apply for an idle core as a second control core of a second core cluster that replaces the first core cluster; acquire the first core cluster in response to the second control core A request signaling of task information of a task processed by a core cluster transmits the task information of a task processed by the first core cluster to the second control core; in response to a request signal of the second control core to acquire original data order, obtain the original data; transmit the original data to the second control core; add the received input and output information of the second core cluster to the pipeline composed of multiple core clusters; The second control core sends the start signaling.
在一些实施例中,所述第二调整模块,还用于:接收到所述第二控制核发送的所述第二核心簇已启动的消息,解散所述第一核心簇。In some embodiments, the second adjustment module is further configured to: receive a message sent by the second control core that the second core cluster has been started, and dissolve the first core cluster.
在一些实施例中,所述第二调整模块,还用于:申请空闲核心作为所述第一核心簇所属的核心;对所述第一核心簇的核心重新进行任务分配。In some embodiments, the second adjustment module is further configured to: apply for an idle core as a core to which the first core cluster belongs; and re-assign tasks to the cores of the first core cluster.
根据本公开的实施例,还提供一种任务调度装置,应用于众核系统的核心,所述任务调度方法包括:According to an embodiment of the present disclosure, a task scheduling apparatus is also provided, which is applied to the core of a many-core system, and the task scheduling method includes:
请求信令发送模块,用于发送获取目标核心簇处理的任务的任务信息的请求信令,以获取所述任务信息;A request signaling sending module, configured to send a request signaling for acquiring task information of a task processed by the target core cluster, to acquire the task information;
核心簇组建模块,用于根据获取的所述任务信息,组建用于替代所述目标核心簇的第二核心簇,所述核心为所述第二核心簇的第二控制核;a core cluster forming module, configured to form a second core cluster for replacing the target core cluster according to the acquired task information, and the core is the second control core of the second core cluster;
任务运行模块,用于在所述第二核心簇上运行所述目标核心簇处理的任务;其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述目标核心簇为需要调整任务分配的所述核心簇。A task running module for running the task processed by the target core cluster on the second core cluster; wherein, the many-core system includes multiple cores, at least one of the cores forms the core cluster, and the many-core system includes multiple cores. The system includes at least one of the core clusters, and the target core cluster is the core cluster for which task allocation needs to be adjusted.
在一些实施例中,所述核心簇组建模块,用于:根据所述任务信息申请多个空闲核心;对多个所述空闲核心进行任务配置;发送获取原始数据的请求信令,以获取所述原 始数据;根据所述任务信息将获取的所述原始数据分配到各个所述空闲核心;确定所述第二核心簇的输入输出信息;将所述第二核心簇的输入输出信息发送到所述目标核心簇的控制核;其中,所述任务运行模块,用于:响应于所述目标核心簇的控制核发送的启动信令,在所述第二核心簇上运行所述目标核心簇处理的任务。In some embodiments, the core cluster building module is configured to: apply for multiple idle cores according to the task information; perform task configuration on the multiple idle cores; send request signaling for obtaining raw data to obtain all the idle cores. Allocate the acquired raw data to each of the idle cores according to the task information; determine the input and output information of the second core cluster; send the input and output information of the second core cluster to all the idle cores The control core of the target core cluster; wherein, the task operation module is configured to: in response to a start signaling sent by the control core of the target core cluster, run the target core cluster processing on the second core cluster task.
在一些实施例中,在所述任务运行模块之后,所述装置还包括:启动消息发送模块,用于向所述目标核心簇的控制核发送所述第二核心簇已启动的消息,以使所述目标核心簇解散。In some embodiments, after the task running module, the apparatus further includes: a startup message sending module, configured to send a message that the second core cluster has been started to the control core of the target core cluster, so as to make The target core cluster is dissolved.
图7是本公开实施例中一种核心的组成框图。参照图7,根据本公开的实施例,还提供一种核心,应用于众核系统,所述核心包括:一个或多个处理单元101;存储单元102,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理单元执行,使得一个或多个处理单元实现以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。其中,处理单元101为具有数据处理能力的器件,其包括但不限于运算器等;存储单元102为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH)。FIG. 7 is a block diagram of the composition of a core in an embodiment of the present disclosure. 7 , according to an embodiment of the present disclosure, a core is further provided, which is applied to a many-core system. The core includes: one or more processing units 101 ; and a storage unit 102 on which one or more programs are stored, When one or more programs are executed by one or more processing units, the one or more processing units implement at least one of the following methods: the control method for task scheduling described in the first aspect of the embodiment of the present disclosure; the implementation of the present disclosure Examples include the task scheduling method described in the second aspect; the task scheduling method described in the third aspect of the embodiments of the present disclosure. Wherein, the processing unit 101 is a device with data processing capability, including but not limited to an arithmetic unit, etc.; the storage unit 102 is a device with data storage capability, including but not limited to random access memory (RAM), read-only memory ( ROM), Power Erasable Programmable Read-Only Memory (EEPROM), Flash Memory (FLASH).
根据本公开的实施例,还提供一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。According to an embodiment of the present disclosure, there is also provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, at least one of the following methods is implemented: the method described in the first aspect of the embodiment of the present disclosure. A control method for task scheduling; the task scheduling method according to the second aspect of the embodiment of the present disclosure; and the task scheduling method according to the third aspect of the embodiment of the present disclosure.
图8是本公开实施例中一种电子设备的组成框图,参照图8,根据本公开的实施例,还提供一种电子设备,包括:多个核心201;以及片上网络202,被配置为交互所述多个核心201间的数据和外部数据;一个或多个所述核心201中存储有一个或多个指令,一个或多个所述指令被一个或多个所述核心201执行,以使一个或多个所述核心201能够执行以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。FIG. 8 is a block diagram of an electronic device in an embodiment of the present disclosure. Referring to FIG. 8 , according to an embodiment of the present disclosure, an electronic device is further provided, including: a plurality of cores 201 ; and an on-chip network 202 configured to interact Data and external data between the multiple cores 201; one or more of the cores 201 store one or more instructions, and the one or more of the instructions are executed by the one or more of the cores 201 to make One or more of the cores 201 can execute at least one of the following methods: the control method for task scheduling described in the first aspect of the embodiment of the present disclosure; the task scheduling method described in the second aspect of the embodiment of the present disclosure; the present disclosure The task scheduling method described in the third aspect of the embodiment.
根据本公开的实施例,还提供一种计算机程序产品,所述计算机程序产品在计算机上运行时,使得计算机执行以下方法中的至少一者:本公开实施例第一方面所述的任务调度的控制方法;本公开实施例第二方面所述的任务调度方法;本公开实施例第三方面所述的任务调度方法。According to an embodiment of the present disclosure, a computer program product is also provided. When the computer program product runs on a computer, the computer program product causes the computer to execute at least one of the following methods: A control method; the task scheduling method described in the second aspect of the embodiment of the present disclosure; and the task scheduling method described in the third aspect of the embodiment of the present disclosure.
为了使本领域技术人员能够更清楚地理解本公开实施例提供的技术方案,下面通过具体的实施例,对本公开实施例提供的技术方案进行详细说明:In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure will be described in detail below through specific embodiments:
在一些实施例中,在需要调整目标核心簇的任务分配时,组建第二核心簇,并由第二核心簇处理目标核心簇处理的任务,无需暂停目标核心簇的运行。In some embodiments, when the task allocation of the target core cluster needs to be adjusted, a second core cluster is formed, and the second core cluster processes the tasks processed by the target core cluster without suspending the operation of the target core cluster.
在示例中,调整目标核心簇的任务分配的流程包括:由目标核心簇的控制核或高级别控制核确定目标核心簇的第二核心簇中的第二控制核;第二控制核获取目标控制核处 理的任务的任务信息;在示例中,目标核心簇的控制核保存有目标核心簇处理的任务的任务信息,高级别控制核也保存有目标核心簇处理的任务的任务信息,第二控制核可以向目标核心簇的控制核申请任务信息,也可以向高级别控制核申请任务信息;In an example, the process of adjusting the task allocation of the target core cluster includes: determining, by the control core or high-level control core of the target core cluster, a second control core in a second core cluster of the target core cluster; obtaining the target control core by the second control core The task information of the task processed by the core; in the example, the control core of the target core cluster holds the task information of the task processed by the target core cluster, the high-level control core also holds the task information of the task processed by the target core cluster, the second control core The core can apply for task information to the control core of the target core cluster, and can also apply to the high-level control core for task information;
第二控制核根据任务信息,申请目标数量的空闲核心并进行任务配置;第二控制核向目标核心簇的控制核发送请求信令,获取原始数据;According to the task information, the second control core applies for a target number of idle cores and performs task configuration; the second control core sends request signaling to the control cores of the target core cluster to obtain original data;
目标核心簇的控制核在接收到请求信令后,根据原始的编译信息,从目标核心簇中的各核心查找数据,重组原始数据,将原始数据返回给第二控制核;第二控制核根据接收到的原始数据,按照任务配置信息,分配到第二核心簇中的各核心。After receiving the request signaling, the control core of the target core cluster searches for data from each core in the target core cluster according to the original compilation information, reorganizes the original data, and returns the original data to the second control core; The received raw data is allocated to each core in the second core cluster according to the task configuration information.
第二控制核确定输入输出路由,将第二核心簇的输入输出信息发送到目标核心簇的控制核;目标核心簇的控制核把第二核心簇的输入输出信息替换到流水线中,并向第二核心簇发送启动信令;第二核心簇根据启动信令启动,并通知目标核心簇。目标核心簇解散。The second control core determines the input and output routes, and sends the input and output information of the second core cluster to the control core of the target core cluster; the control core of the target core cluster replaces the input and output information of the second core cluster into the pipeline, and sends the information to the first core cluster. The second core cluster sends start signaling; the second core cluster starts according to the start signaling, and notifies the target core cluster. The target core cluster is disbanded.
在示例中,第二控制核对第二核心簇中的空闲核心进行任务配置时,可以进行如下配置:分配内存,确定各空闲核心应当存储的信息、参数等;配置运算算子,通过拆解运算等降低运算复杂度;配置路由;配置运算顺序、运算时间等计算控制信息;配置同步管理信息。In an example, when the second control check performs task configuration on the idle cores in the second core cluster, the following configurations may be performed: allocate memory, determine the information and parameters that should be stored by each idle core; and so on to reduce the computational complexity; configure routing; configure calculation control information such as operation sequence and operation time; configure synchronization management information.
在示例中,任务配置包括以下流程:In the example, the task configuration includes the following flow:
将计算任务分解为若干计算步骤,确定各个计算步骤间的依赖关系;Decompose the computing task into several computing steps, and determine the dependencies between the computing steps;
根据需要的内存和计算量将每个计算步骤分解为可并行的若干子任务。其中,每个子任务可映射于一个空闲核心;每个子任务所需的内存不得超过单个空闲核心的内存容量限制,子任务的路由传输量(输入输出)不得超过单个空闲核心的路由传输带宽限制;优选地,各个核的子任务运算量平均分配;Each computational step is decomposed into several subtasks that can be parallelized according to the required memory and amount of computation. Among them, each subtask can be mapped to an idle core; the memory required by each subtask shall not exceed the memory capacity limit of a single idle core, and the routing transmission volume (input and output) of the subtask shall not exceed the routing transmission bandwidth limit of a single idle core; Preferably, the subtask computation amount of each core is evenly distributed;
确定按照当前对计算任务的分解,计算任务需要的空闲核心的数量、带宽,判断当前计算资源是否满足计算任务的需求;如不满足,重新分解计算任务;如经过多次分解仍不满足,申请更多的空闲核心;如申请更多的空闲核心后对计算任务进行分解仍不满足计算任务的需求,则向上级核心报错;若当前计算资源满足计算任务的需求,则判定对计算任务的分解成功;Determine the number of idle cores and bandwidth required by the computing task according to the current decomposition of the computing task, and determine whether the current computing resources meet the requirements of the computing task; if not, re-decompose the computing task; More idle cores; if the computing task is decomposed after applying for more idle cores and still does not meet the requirements of the computing task, an error will be reported to the upper-level core; if the current computing resources meet the requirements of the computing task, the decomposition of the computing task will be determined success;
在对计算任务的分解成功时,根据各个空闲核心的物理位置,寻找最优化的布局方案,确定各个空闲核心需要执行的子任务,最优化的布局方案为使得路由传输带宽最小化的布局方案;When the decomposition of the computing task is successful, according to the physical location of each idle core, find the optimal layout scheme, determine the subtasks that each idle core needs to execute, and the optimal layout scheme is the layout scheme that minimizes the routing transmission bandwidth;
根据最优化的布局方案计算路由配置信息,生成各个空闲核心的运算指令、地址产生逻辑、控制逻辑及同步逻辑等配置信息;Calculate routing configuration information according to the optimized layout scheme, and generate configuration information such as operation instructions, address generation logic, control logic and synchronization logic of each idle core;
将配置信息通过片上网络发送给各个空闲核心,其中,各个空闲核心接收所有配置信息后会返回配置完毕信令。The configuration information is sent to each idle core through the on-chip network, wherein each idle core will return a configuration completion signaling after receiving all the configuration information.
在一些实施例中,在需要调整目标核心簇的任务分配时,暂停目标核心簇的运行,同时根据负载检测的结果增减目标核心簇中的核心,以使目标核心簇的计算资源与计算 任务匹配。其中,调整目标核心簇的任务分配的流程包括:申请新核,并进行任务配置。其中,在重新映射时,包括全局通知机制,例如,有效(invalid)和无效(valid)要广播通知所有核心以及PC端。In some embodiments, when the task allocation of the target core cluster needs to be adjusted, the operation of the target core cluster is suspended, and the cores in the target core cluster are increased or decreased according to the result of the load detection, so that the computing resources of the target core cluster and the computing tasks match. The process of adjusting the task allocation of the target core cluster includes: applying for a new core, and performing task configuration. Among them, when remapping, including a global notification mechanism, for example, valid (invalid) and invalid (valid) to broadcast notification to all cores and PC side.
在示例中,申请新核并进行任务配置时,可以进行如下配置:分配内存,确定各核心应当存储的信息、参数等;配置运算算子,通过拆解运算等降低运算复杂度;配置路由;配置运算顺序、运算时间等计算控制信息;配置同步管理信息等。In the example, when applying for a new core and configuring tasks, the following configurations can be performed: allocate memory to determine the information and parameters that each core should store; configure arithmetic operators to reduce computational complexity by dismantling operations; configure routing; Configure calculation control information such as operation sequence and operation time; configure synchronization management information, etc.
在示例中,任务配置包括以下流程:In the example, the task configuration includes the following flow:
将计算任务分解为若干计算步骤,确定各个计算步骤间的依赖关系;Decompose the computing task into several computing steps, and determine the dependencies between the computing steps;
根据需要的内存和计算量将每个计算步骤分解为可并行的若干子任务。其中,每个子任务可映射于一个核心;每个子任务所需的内存不得超过单个核心的内存容量限制,子任务的路由传输量(输入输出)不得超过单个核心的路由传输带宽限制;优选地,各个核的子任务运算量平均分配;Each computational step is decomposed into several subtasks that can be parallelized according to the required memory and amount of computation. Among them, each subtask can be mapped to one core; the memory required by each subtask shall not exceed the memory capacity limit of a single core, and the routing transmission volume (input and output) of the subtask shall not exceed the routing transmission bandwidth limit of a single core; preferably, The calculation amount of subtasks of each core is evenly distributed;
确定按照当前对计算任务的分解,计算任务需要的核心的数量、带宽,判断当前计算资源是否满足计算任务的需求;如不满足,重新分解计算任务;如经过多次分解仍不满足,申请更多的核心;如申请更多的核心后对计算任务进行分解仍不满足计算任务的需求,则向上级核心报错;若当前计算资源满足计算任务的需求,则判定对计算任务的分解成功;Determine the number of cores and bandwidth required by the computing task according to the current decomposition of the computing task, and determine whether the current computing resources meet the requirements of the computing task; if not, re-decompose the computing task; There are many cores; if the computing tasks are decomposed after applying for more cores and the requirements of the computing tasks are still not satisfied, an error will be reported to the upper-level core; if the current computing resources meet the requirements of the computing tasks, it is determined that the decomposition of the computing tasks is successful;
在对计算任务的分解成功时,根据各个核心的物理位置,寻找最优化的布局方案,确定各个核心需要执行的子任务,最优化的布局方案为使得路由传输带宽最小化的布局方案;When the decomposition of the computing task is successful, according to the physical location of each core, find the optimal layout scheme, determine the subtasks that each core needs to perform, and the optimal layout scheme is the layout scheme that minimizes the routing transmission bandwidth;
根据最优化的布局方案计算路由配置信息,生成各个核心的运算指令、地址产生逻辑、控制逻辑及同步逻辑等配置信息;Calculate routing configuration information according to the optimized layout scheme, and generate configuration information such as operation instructions, address generation logic, control logic and synchronization logic of each core;
将配置信息通过片上网络发送给各个核心,其中,各个核心接收所有配置信息后会返回配置完毕信令。The configuration information is sent to each core through the on-chip network, and each core will return a configuration completion signaling after receiving all the configuration information.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或 者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, functional modules/units in the systems, and devices can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components Components execute cooperatively. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit . Such software may be distributed on computer-readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules or other data flexible, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices, or may Any other medium used to store desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery media, as is well known to those of ordinary skill in the art .
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should only be construed in a general descriptive sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with other embodiments, unless expressly stated otherwise. Features and/or elements are used in combination. Accordingly, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (18)

  1. 一种任务调度的控制方法,应用于众核系统的核心,所述控制方法包括:A control method for task scheduling, applied to the core of a many-core system, the control method comprising:
    对众核系统的至少一个核心簇进行负载检测,判断所检测的所述核心簇中是否存在目标核心簇,所述目标核心簇为至少一个所述核心簇中需要调整任务分配的核心簇;Perform load detection on at least one core cluster of the many-core system, and determine whether there is a target core cluster in the detected core cluster, and the target core cluster is a core cluster that needs to adjust task allocation in at least one of the core clusters;
    在存在所述目标核心簇的情况下,根据负载检测结果控制所述目标核心簇调整任务分配;In the presence of the target core cluster, controlling the target core cluster to adjust task allocation according to the load detection result;
    其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇。The many-core system includes a plurality of cores, at least one of the cores forms the core cluster, and the many-core system includes at least one of the core clusters.
  2. 根据权利要求1所述的控制方法,其中,对众核系统的至少一个核心簇进行负载检测,判断是否存在目标核心簇的步骤包括:The control method according to claim 1, wherein the step of performing load detection on at least one core cluster of the many-core system and judging whether there is a target core cluster comprises:
    判断所检测的所述核心簇中是否存在超负载或计算资源过剩的核心簇;Judging whether there is an overloaded core cluster or a core cluster with excess computing resources in the detected core clusters;
    在所检测的所述核心簇中存在超负载或计算资源过剩的核心簇的情况下,判定超负载或计算资源过剩的核心簇为所述目标核心簇。If there is a core cluster with overload or excess computing resources in the detected core clusters, it is determined that the core cluster with overload or excess computing resources is the target core cluster.
  3. 根据权利要求2所述的控制方法,其中,判断众核系统的至少一个所述核心簇中是否存在超负载的核心簇的步骤包括:The control method according to claim 2, wherein the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system comprises:
    判断预定时间段内,是否存在候选目标核心簇,所述候选目标核心簇为在N个同步周期内运行时间均最长的核心簇,其中,N为大于或等于预定数量的自然数;Judging whether there is a candidate target core cluster within a predetermined time period, the candidate target core cluster is the core cluster with the longest running time in N synchronization cycles, where N is a natural number greater than or equal to a predetermined number;
    在存在所述候选目标核心簇的情况下,判定存在超负载的核心簇;其中,所述候选目标核心簇为超负载的核心簇。In the case that the candidate target core cluster exists, it is determined that there is an overloaded core cluster; wherein, the candidate target core cluster is an overloaded core cluster.
  4. 根据权利要求2所述的控制方法,其中,判断众核系统的至少一个所述核心簇中是否存在超负载的核心簇的步骤包括:The control method according to claim 2, wherein the step of judging whether there is an overloaded core cluster in at least one of the core clusters of the many-core system comprises:
    判断是否存在运行时长超过预定同步周期的核心簇;Determine whether there is a core cluster whose running time exceeds the predetermined synchronization period;
    在存在运行时长超过所述预定同步周期的核心簇的情况下,判定存在超负载的核心簇,其中,运行时长超过所述预定同步周期的核心簇为超负载的核心簇。In the case that there is a core cluster whose running duration exceeds the predetermined synchronization period, it is determined that there is an overloaded core cluster, wherein the core cluster whose running duration exceeds the predetermined synchronization period is an overloaded core cluster.
  5. 根据权利要求1至4中任意一项所述的控制方法,其中,根据负载检测结果控制所述目标核心簇调整任务分配的步骤包括:The control method according to any one of claims 1 to 4, wherein the step of controlling the target core cluster to adjust task allocation according to the load detection result comprises:
    申请空闲核心作为替代所述目标核心簇的第二核心簇的第二控制核;apply for an idle core as the second control core of the second core cluster that replaces the target core cluster;
    响应于所述第二控制核获取所述目标核心簇处理的任务的任务信息的请求信令,将所述目标核心簇处理的任务的任务信息传输到所述第二控制核。In response to the request signaling for the second control core to acquire task information of the task processed by the target core cluster, the task information of the task processed by the target core cluster is transmitted to the second control core.
  6. 一种任务调度方法,应用于众核系统的第一核心簇的第一控制核,所述任务调度 方法包括:A task scheduling method, applied to the first control core of the first core cluster of a many-core system, the task scheduling method comprising:
    对第一核心簇进行负载检测,判断所述第一核心簇是否为目标核心簇,所述目标核心簇为需要调整任务分配的核心簇;Perform load detection on the first core cluster to determine whether the first core cluster is a target core cluster, and the target core cluster is a core cluster that needs to adjust task allocation;
    在所述第一核心簇是所述目标核心簇的情况下,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配;In the case that the first core cluster is the target core cluster, adjusting the task allocation of the first core cluster according to the load detection result of the first core cluster;
    其中,所述众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述第一核心簇为至少一个所述核心簇中的一个。The many-core system includes a plurality of cores, at least one of the cores forms the core cluster, the many-core system includes at least one of the core clusters, and the first core cluster is at least one of the core clusters one of the.
  7. 根据权利要求6所述的任务调度方法,其中,判断所述第一核心簇是否为目标核心簇的步骤包括:The task scheduling method according to claim 6, wherein the step of judging whether the first core cluster is a target core cluster comprises:
    判断所述第一核心簇是否超负载或计算资源过剩;Determine whether the first core cluster is overloaded or has excess computing resources;
    在所述第一核心簇超负载或计算资源过剩的情况下,判定所述第一核心簇为所述目标核心簇。When the first core cluster is overloaded or has excess computing resources, it is determined that the first core cluster is the target core cluster.
  8. 根据权利要求7所述的任务调度方法,其中,判断所述第一核心簇是否超负载的步骤包括:The task scheduling method according to claim 7, wherein the step of judging whether the first core cluster is overloaded comprises:
    确定所述第一核心簇在预定时间段内的多个同步周期的运行时长;determining the running duration of multiple synchronization cycles of the first core cluster within a predetermined time period;
    根据所述预定时间段内的多个同步周期的运行时长,确定所述第一核心簇在至少一个所述核心簇中运行时长最大的同步周期的数量;According to the running durations of multiple synchronization cycles in the predetermined time period, determine the number of synchronization cycles with the longest running duration of the first core cluster in at least one of the core clusters;
    在所述第一核心簇运行时长最大的同步周期的数量超过预定数值的情况下,判定所述第一核心簇超负荷。When the number of synchronization cycles with the longest running duration of the first core cluster exceeds a predetermined value, it is determined that the first core cluster is overloaded.
  9. 根据权利要求7所述的任务调度方法,其中,判断所述第一核心簇是否超负载的步骤包括:The task scheduling method according to claim 7, wherein the step of judging whether the first core cluster is overloaded comprises:
    判断所述第一核心簇的运行时长是否超过预定同步周期;judging whether the running duration of the first core cluster exceeds a predetermined synchronization period;
    在所述第一核心簇的运行时长超过所述预定同步周期的情况下,判定所述核心簇超负载。When the running time of the first core cluster exceeds the predetermined synchronization period, it is determined that the core cluster is overloaded.
  10. 根据权利要求6至9中任意一项所述的任务调度方法,其中,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配的步骤包括:The task scheduling method according to any one of claims 6 to 9, wherein, according to the load detection result of the first core cluster, the step of adjusting the task allocation of the first core cluster comprises:
    申请空闲核心作为替代所述第一核心簇的第二核心簇的第二控制核;apply for an idle core as the second control core of the second core cluster that replaces the first core cluster;
    响应于所述第二控制核获取所述第一核心簇处理的任务的任务信息的请求信令,将所述第一核心簇处理的任务的任务信息传输到所述第二控制核;In response to the request signaling that the second control core obtains the task information of the task processed by the first core cluster, the task information of the task processed by the first core cluster is transmitted to the second control core;
    响应于所述第二控制核获取原始数据的请求信令,获取所述原始数据;Acquiring the raw data in response to the request signaling of the second control core to obtain the raw data;
    将所述原始数据传输到所述第二控制核;transmitting the raw data to the second control core;
    将接收到的所述第二核心簇的输入输出信息添加到由多个核心簇组成的流水线中;adding the received input and output information of the second core cluster to a pipeline composed of multiple core clusters;
    向所述第二控制核发送启动信令。Send start signaling to the second control core.
  11. 根据权利要求10所述的任务调度方法,其中,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配的步骤还包括:The task scheduling method according to claim 10, wherein, according to the load detection result of the first core cluster, the step of adjusting the task allocation of the first core cluster further comprises:
    接收到所述第二控制核发送的所述第二核心簇已启动的消息,解散所述第一核心簇。After receiving the message that the second core cluster has been started sent by the second control core, the first core cluster is disbanded.
  12. 根据权利要求6至9中任意一项所述的任务调度方法,其中,根据所述第一核心簇的负载检测结果,调整所述第一核心簇的任务分配的步骤包括:The task scheduling method according to any one of claims 6 to 9, wherein, according to the load detection result of the first core cluster, the step of adjusting the task allocation of the first core cluster comprises:
    申请空闲核心作为所述第一核心簇所属的核心;apply for an idle core as the core to which the first core cluster belongs;
    对所述第一核心簇的核心重新进行任务分配。Tasks are reassigned to the cores of the first core cluster.
  13. 一种任务调度方法,应用于众核系统的核心,所述任务调度方法包括:A task scheduling method is applied to the core of a many-core system, and the task scheduling method includes:
    发送获取目标核心簇处理的任务的任务信息的请求信令,以获取所述任务信息;Sending request signaling for obtaining task information of the task processed by the target core cluster to obtain the task information;
    根据获取的所述任务信息,组建用于替代所述目标核心簇的第二核心簇,所述核心为所述第二核心簇的第二控制核;According to the acquired task information, a second core cluster for replacing the target core cluster is formed, and the core is the second control core of the second core cluster;
    在所述第二核心簇上运行所述目标核心簇处理的任务;running the task processed by the target core cluster on the second core cluster;
    其中,众核系统中包括多个核心,至少一个所述核心组成所述核心簇,所述众核系统包括至少一个所述核心簇,所述目标核心簇为需要调整任务分配的所述核心簇。The many-core system includes multiple cores, at least one of the cores constitutes the core cluster, the many-core system includes at least one of the core clusters, and the target core cluster is the core cluster that needs to adjust task allocation .
  14. 根据权利要求13所述的任务调度方法,其中,根据获取的所述任务信息,组建用于替代所述目标核心簇的第二核心簇的步骤包括:The task scheduling method according to claim 13, wherein, according to the acquired task information, the step of forming a second core cluster for replacing the target core cluster comprises:
    根据所述任务信息申请多个空闲核心;apply for multiple idle cores according to the task information;
    对多个所述空闲核心进行任务配置;performing task configuration on a plurality of the idle cores;
    发送获取原始数据的请求信令,以获取所述原始数据;Sending request signaling for obtaining raw data to obtain the raw data;
    根据所述任务信息将获取的所述原始数据分配到各个所述空闲核心;Allocate the acquired raw data to each of the idle cores according to the task information;
    确定所述第二核心簇的输入输出信息;determining the input and output information of the second core cluster;
    将所述第二核心簇的输入输出信息发送到所述目标核心簇的控制核;sending the input and output information of the second core cluster to the control core of the target core cluster;
    其中,在所述第二核心簇上运行所述目标核心簇处理的任务的步骤包括:Wherein, the step of running the task processed by the target core cluster on the second core cluster includes:
    响应于所述目标核心簇的控制核发送的启动信令,在所述第二核心簇上运行所述目标核心簇处理的任务。In response to the start signaling sent by the control core of the target core cluster, the task processed by the target core cluster is executed on the second core cluster.
  15. 根据权利要求13或14所述的任务调度方法,其中,在所述第二核心簇上运行所述目标核心簇处理的任务的步骤之后,所述任务调度方法还包括:The task scheduling method according to claim 13 or 14, wherein after the step of running the task processed by the target core cluster on the second core cluster, the task scheduling method further comprises:
    向所述目标核心簇的控制核发送所述第二核心簇已启动的消息,以使所述目标核心簇解散。Sending a message that the second core cluster has been started to the control core of the target core cluster to dissolve the target core cluster.
  16. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现以下方法中的至少一者:A computer-readable medium having stored thereon a computer program that, when executed by a processor, implements at least one of the following methods:
    根据权利要求1至5中任意一项所述的任务调度的控制方法;The control method for task scheduling according to any one of claims 1 to 5;
    根据权利要求6至12中任意一项所述的任务调度方法;The task scheduling method according to any one of claims 6 to 12;
    根据权利要求13至15中任意一项所述的任务调度方法。The task scheduling method according to any one of claims 13 to 15.
  17. 一种电子设备,包括:An electronic device comprising:
    多个核心;以及multiple cores; and
    片上网络,被配置为交互所述多个核心间的数据和外部数据;a network-on-chip configured to exchange data among the plurality of cores and external data;
    一个或多个所述核心中存储有一个或多个指令,一个或多个所述指令被一个或多个所述核心执行,以使一个或多个所述核心能够执行以下方法中的至少一者:One or more of the cores have one or more instructions stored therein, and the one or more of the instructions are executed by the one or more of the cores to enable the one or more of the cores to perform at least one of the following methods: By:
    根据权利要求1至5中任意一项所述的任务调度的控制方法;The control method for task scheduling according to any one of claims 1 to 5;
    根据权利要求6至12中任意一项所述的任务调度方法;The task scheduling method according to any one of claims 6 to 12;
    根据权利要求13至15中任意一项所述的任务调度方法。The task scheduling method according to any one of claims 13 to 15.
  18. 一种计算机程序产品,所述计算机程序产品在计算机上运行时,使得计算机执行以下方法中的至少一者:A computer program product that, when run on a computer, causes the computer to perform at least one of the following methods:
    根据权利要求1至5中任意一项所述的任务调度的控制方法;The control method for task scheduling according to any one of claims 1 to 5;
    根据权利要求6至12中任意一项所述的任务调度方法;The task scheduling method according to any one of claims 6 to 12;
    根据权利要求13至15中任意一项所述的任务调度方法。The task scheduling method according to any one of claims 13 to 15.
PCT/CN2021/132400 2020-11-24 2021-11-23 Task scheduling method, control method, electronic device and computer-readable medium WO2022111466A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011330751.1 2020-11-24
CN202011330751.1A CN114546631A (en) 2020-11-24 2020-11-24 Task scheduling method, control method, core, electronic device and readable medium

Publications (1)

Publication Number Publication Date
WO2022111466A1 true WO2022111466A1 (en) 2022-06-02

Family

ID=81660359

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132400 WO2022111466A1 (en) 2020-11-24 2021-11-23 Task scheduling method, control method, electronic device and computer-readable medium

Country Status (2)

Country Link
CN (1) CN114546631A (en)
WO (1) WO2022111466A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086232A (en) * 2022-06-13 2022-09-20 清华大学 Task processing and data stream generating method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059548A1 (en) * 2012-08-23 2014-02-27 Nvidia Corporation Processor cluster migration techniques
CN103870322A (en) * 2012-12-17 2014-06-18 联发科技股份有限公司 Method for controlling task migration, other-than-temporary computer readable medium, heterogeneous multi-core system
US20140208072A1 (en) * 2013-01-18 2014-07-24 Nec Laboratories America, Inc. User-level manager to handle multi-processing on many-core coprocessor-based systems
CN104995603A (en) * 2013-11-14 2015-10-21 联发科技股份有限公司 Task scheduling method and related non-transitory computer readable medium for dispatching task in multi-core processor system based at least partly on distribution of tasks sharing same data and/or accessing same memory address (ES)
CN105528330A (en) * 2014-09-30 2016-04-27 杭州华为数字技术有限公司 Load balancing method and device, cluster and many-core processor
CN105607720A (en) * 2014-11-17 2016-05-25 联发科技股份有限公司 Method of managing calculating system energy efficiency and system of managing energy efficiency
CN108170525A (en) * 2016-12-07 2018-06-15 晨星半导体股份有限公司 The device and method of the task load configuration of dynamic adjustment multi-core processor
CN108694151A (en) * 2017-04-09 2018-10-23 英特尔公司 Computing cluster in universal graphics processing unit is seized
CN111198757A (en) * 2020-01-06 2020-05-26 北京小米移动软件有限公司 CPU kernel scheduling method, CPU kernel scheduling device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140059548A1 (en) * 2012-08-23 2014-02-27 Nvidia Corporation Processor cluster migration techniques
CN103870322A (en) * 2012-12-17 2014-06-18 联发科技股份有限公司 Method for controlling task migration, other-than-temporary computer readable medium, heterogeneous multi-core system
US20140208072A1 (en) * 2013-01-18 2014-07-24 Nec Laboratories America, Inc. User-level manager to handle multi-processing on many-core coprocessor-based systems
CN104995603A (en) * 2013-11-14 2015-10-21 联发科技股份有限公司 Task scheduling method and related non-transitory computer readable medium for dispatching task in multi-core processor system based at least partly on distribution of tasks sharing same data and/or accessing same memory address (ES)
CN105528330A (en) * 2014-09-30 2016-04-27 杭州华为数字技术有限公司 Load balancing method and device, cluster and many-core processor
CN105607720A (en) * 2014-11-17 2016-05-25 联发科技股份有限公司 Method of managing calculating system energy efficiency and system of managing energy efficiency
CN108170525A (en) * 2016-12-07 2018-06-15 晨星半导体股份有限公司 The device and method of the task load configuration of dynamic adjustment multi-core processor
CN108694151A (en) * 2017-04-09 2018-10-23 英特尔公司 Computing cluster in universal graphics processing unit is seized
CN111198757A (en) * 2020-01-06 2020-05-26 北京小米移动软件有限公司 CPU kernel scheduling method, CPU kernel scheduling device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086232A (en) * 2022-06-13 2022-09-20 清华大学 Task processing and data stream generating method and device

Also Published As

Publication number Publication date
CN114546631A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN107003887B (en) CPU overload setting and cloud computing workload scheduling mechanism
US8893148B2 (en) Performing setup operations for receiving different amounts of data while processors are performing message passing interface tasks
US8312464B2 (en) Hardware based dynamic load balancing of message passing interface tasks by modifying tasks
US8127300B2 (en) Hardware based dynamic load balancing of message passing interface tasks
US8108876B2 (en) Modifying an operation of one or more processors executing message passing interface tasks
CN109564528B (en) System and method for computing resource allocation in distributed computing
CN105786603B (en) Distributed high-concurrency service processing system and method
US8954765B2 (en) Energy based resource allocation across virtualized machines and data centers
CN110221920B (en) Deployment method, device, storage medium and system
US20090064166A1 (en) System and Method for Hardware Based Dynamic Load Balancing of Message Passing Interface Tasks
CN112114950A (en) Task scheduling method and device and cluster management system
US9471387B2 (en) Scheduling in job execution
WO2022111453A1 (en) Task processing method and apparatus, task allocation method, and electronic device and medium
US20230136661A1 (en) Task scheduling for machine-learning workloads
CN110990154A (en) Big data application optimization method and device and storage medium
WO2023020010A1 (en) Process running method, and related device
WO2020108337A1 (en) Cpu resource scheduling method and electronic equipment
CN113132456A (en) Edge cloud cooperative task scheduling method and system based on deadline perception
CN114518955A (en) Flunk cloud native deployment architecture method and system based on kubernets
WO2022111466A1 (en) Task scheduling method, control method, electronic device and computer-readable medium
CN114546630A (en) Task processing method and distribution method, device, electronic equipment and medium
WO2024087663A1 (en) Job scheduling method and apparatus, and chip
WO2024067491A1 (en) Electronic device, distributed system, and task scheduling method
WO2022222975A1 (en) Load processing method, calculation node, calculation node cluster, and related device
CN113127186B (en) Method, device, server and storage medium for configuring cluster node resources

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21896967

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 210923)

122 Ep: pct application non-entry in european phase

Ref document number: 21896967

Country of ref document: EP

Kind code of ref document: A1