Task processing method and allocation method, device, electronic device, medium
By dynamically forming core clusters in the multi-core system and optimizing task allocation, the problems of weak control capabilities and poor flexibility are solved, and more efficient task processing and resource utilization are achieved.
Patent Information
- Application Number
- CN202011330531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2040-11-24
AI Technical Summary
The control capabilities of each core in the existing multi-core system are weak, and the processing tasks are poor, making it difficult to effectively utilize the parallel computing capabilities of multiple processing cores.
By receiving pending tasks, dynamically determine the core cluster, including selecting the target processing core from multiple processing cores, forming the core cluster, and assigning tasks to the core cluster execution, combining task splitting and resource management, optimizing task allocation strategies.
It improves the task processing flexibility and efficiency of the multi-core system, enhances the control capabilities of some processing cores, optimizes resource utilization, and reduces the energy consumption caused by cross-chip interaction.
Smart Images

Figure CN114546630B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a task processing method, a task allocation method, an apparatus, a processing core, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] With the development of artificial intelligence technologies, the demand for data processing speed has been increasing day by day, making the application of many-core systems more and more extensive. A many-core system usually has a large number of cores (also called processing cores). A core is the smallest computing unit in a many-core system that can be independently scheduled and has complete computing capabilities. A core has certain storage, computing, and other resources. The cores of a many-core system can run program instructions independently. By utilizing the ability of parallel computing, the running speed of a program can be accelerated, and multitasking capabilities can be provided.
[0003] However, in existing many-core systems, each core passively performs arithmetic functions according to running program instructions, and the control capabilities of each core are relatively weak, and the flexibility of the many-core system in processing tasks is poor. Summary of the Invention
[0004] The present disclosure aims to at least solve one of the technical problems existing in the prior art, and provides a task processing method, a task allocation method, an apparatus, a processing core, an electronic device, a computer-readable medium, and a computer program product.
[0005] In a first aspect, the present disclosure provides a task processing method based on a many-core system. The many-core system includes a plurality of processing cores. The method includes: receiving a task to be processed; determining, according to the task to be processed, a core cluster for processing the task to be processed, where the core cluster includes at least one target processing core determined from the plurality of processing cores; and sending the task to be processed to the core cluster for the core cluster to execute the task to be processed.
[0006] In some embodiments, determining, according to the task to be processed, a core cluster for processing the task to be processed includes:
[0007] determining, according to the task to be processed, the required resource demand when executing the task to be processed;
[0008] determining at least one target processing core from all currently available processing cores according to the resource demand to form the core cluster.
[0009] In some embodiments, the plurality of processing cores include a first processing core and a plurality of second processing cores. The task processing method is implemented based on the first processing core, and the core cluster includes at least one target processing core determined from the plurality of second processing cores.
[0010] In some embodiments, the number of target processing cores is multiple. Before sending the task to be processed to the core cluster, it further includes: selecting a target processing core from the core cluster as the master core of the core cluster;
[0011] Sending the task to be processed to the core cluster includes: sending the task to be processed to the master core for the master core to allocate the task to at least some of the target processing cores in the core cluster according to the task to be processed.
[0012] In some embodiments, the many-core system includes at least one many-core chip, and each many-core chip includes multiple processing cores. When the number of target processing cores is multiple, the multiple target processing cores are located on the same many-core chip.
[0013] In a second aspect, the present disclosure provides a task allocation method, which is used for a core cluster pre-formed in a many-core system. The core cluster is determined based on the above task processing method, and the core cluster includes multiple target processing cores. The method includes: receiving a task to be processed; splitting the task to be processed into multiple subtasks; allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, and each of at least some of the target processing cores corresponds to at least one subtask for each of the target processing cores in at least some of the target processing cores to execute their respective corresponding subtasks.
[0014] In some embodiments, after splitting the task to be processed into multiple subtasks, it further includes:
[0015] Statistically analyzing the current available core resources of the core cluster where it is located;
[0016] Judging whether the core cluster where it is located currently has the condition to execute the multiple subtasks currently split according to the current available core resources;
[0017] In response to judging that the core cluster where it is located currently has the condition to execute the multiple subtasks currently split, performing the step of allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located.
[0018] In some embodiments, after determining whether the core cluster where it is located currently meets the conditions for executing the multiple sub-tasks split currently, it further includes: in response to determining that the core cluster where it is located currently does not meet the conditions for executing the multiple sub-tasks split currently, re-splitting the to-be-processed task to re-split into multiple new sub-tasks, and continuing to execute the step of determining whether the core cluster where it is located currently meets the conditions for executing the multiple sub-tasks split currently according to the current available core resource situation.
[0019] In some embodiments, before allocating the corresponding sub-tasks to at least some of the target processing cores in the core cluster where it is located, it further includes:
[0020] For each of the at least some target processing cores, determining at least one sub-task matching the target processing core according to the current remaining resource situation of the target processing core and the resource requirements corresponding to each of the sub-tasks split currently;
[0021] The allocating the corresponding sub-tasks to at least some of the target processing cores in the core cluster where it is located includes: for each of the sub-tasks, allocating the sub-task to the target processing core in the core cluster where it is located that matches the sub-task.
[0022] In some embodiments, before allocating the corresponding sub-tasks to at least some of the target processing cores in the core cluster where it is located, it further includes:
[0023] Determining the current optimal sub-task allocation strategy according to the resource requirements corresponding to each sub-task, the current remaining resource situation of each of the at least some target processing cores, and the location information;
[0024] The allocating the sub-tasks to each of the target processing cores in the core cluster where it is located includes: based on the current optimal sub-task allocation strategy, allocating the sub-tasks to each of the target processing cores in the core cluster where it is located.
[0025] In some embodiments, the method further includes:
[0026] Generating task configuration information of the sub-tasks corresponding to each of the target processing cores in at least some of the target processing cores;
[0027] Sending the task configuration information corresponding to each of the target processing cores to each of the target processing cores in at least some of the target processing cores respectively, so that each target processing core stores its corresponding task configuration information.
[0028] In some embodiments, after sending the respective task configuration information to each target processing core among at least some of the target processing cores, the following steps are further included:
[0029] In response to the configuration completion information returned by each target processing core, notify the data source corresponding to the task to be processed to provide the task data required by each target processing core to each target processing core;
[0030] Allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located includes: sending corresponding task execution instructions to each target processing core among at least some of the target processing cores, so that each target processing core executes its corresponding subtask in response to the task execution instruction.
[0031] In a third aspect, the present disclosure provides a task processing device, which is applied to a many-core system, and the many-core system includes multiple processing cores; the task processing device includes: a first receiving module, configured to receive a task to be processed; a core cluster formation module, configured to determine, according to the task to be processed, a core cluster for processing the task to be processed, and the core cluster includes at least one target processing core determined from the multiple processing cores; a sending module, configured to send the task to be processed to the core cluster for the core cluster to execute the task to be processed.
[0032] In a fourth aspect, the present disclosure provides a task allocation device, which is used to allocate tasks to a pre-formed core cluster in a many-core system, and the core cluster includes multiple target processing cores; the task allocation device includes: a second receiving module, configured to receive a task to be processed; a task splitting module, configured to split the task to be processed into multiple subtasks; a task allocation module, configured to allocate the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, and each target processing core in at least some of the target processing cores corresponds to at least one subtask, so that each target processing core in at least some of the target processing cores executes its corresponding subtask.
[0033] In a fifth aspect, the present disclosure provides a processing core, which includes the above-mentioned task processing device and / or the above-mentioned task allocation device.
[0034] Sixth aspect, the present disclosure provides an electronic device, which includes: a plurality of processing cores; a network on chip configured to interact data between the plurality of processing cores and external data; one or more first instructions are stored in one or more of the processing cores, and the one or more first instructions are executed by one or more of the processing cores, so that one or more of the processing cores can execute the above-mentioned task processing method; and / or, one or more second instructions are stored in one or more of the processing cores, and the one or more second instructions are executed by one or more of the processing cores, so that one or more of the processing cores can execute the above-mentioned task allocation method.
[0035] Seventh aspect, the present disclosure provides a computer-readable medium, on which a first computer program and / or a second computer program are stored. Wherein, the first computer program implements the above-mentioned task processing method when executed by a processing core; the second computer program implements the above-mentioned task allocation method when executed by a processing core.
[0036] Eighth aspect, the present disclosure provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the above-mentioned task processing method; or, when the computer program product runs on a computer, it causes the computer to execute the above-mentioned task allocation method.
[0037] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understandable through the following description. Description of the Drawings
[0038] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure, and do not constitute a limitation to the present disclosure. By describing the detailed exemplary embodiments with reference to the drawings, the above and other features and advantages will become more obvious to those skilled in the art. In the drawings:
[0039] Figure 1 It is a flowchart of a task processing method based on a many-core system provided by an embodiment of the present disclosure;
[0040] Figure 2 It is a flowchart of a task allocation method provided by an embodiment of the present disclosure;
[0041] Figure 3 It is a flowchart of another task allocation method provided by an embodiment of the present disclosure;
[0042] Figure 4 It is a flowchart of another task processing method based on a many-core system provided by an embodiment of the present disclosure;
[0043] Figure 5 It is a block diagram of the composition of a many-core system;
[0044] Figure 6 It is a block diagram of the composition of a task processing device provided by an embodiment of the present disclosure;
[0045] Figure 7 It is a block diagram of the composition of a task allocation device provided by an embodiment of the present disclosure;
[0046] Figure 8 It is a block diagram of the composition of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0047] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following.
[0048] Without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0049] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0050] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms "include" and / or "consist of" are used in this specification, the specified features, wholes, steps, operations, elements, and / or components are present, but one or more other features, wholes, steps, operations, elements, components, and / or their groups are not excluded. "Connection" or "coupling" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0051] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless clearly defined herein.
[0052] Figure 1 Flowchart of a task processing method based on a many-core system provided by an embodiment of the present disclosure.
[0053] Refer to Figure 1 , an embodiment of the present disclosure provides a task processing method based on a many-core system. Among them, the many-core system includes multiple processing cores. This task processing method can be executed by a task processing device, which can be implemented in software and / or hardware. This task processing method includes:
[0054] Step S11, receive a task to be processed.
[0055] Step S12, determine a core cluster for processing the task to be processed according to the task to be processed. The core cluster includes at least one target processing core determined from multiple processing cores.
[0056] Step S13, send the task to be processed to the core cluster for the core cluster to execute the task to be processed.
[0057] For each task to be processed received by the task processing method provided by the embodiment of the present disclosure, a corresponding core cluster is formed according to the task to be processed, and each task to be processed is processed by its corresponding core cluster, thereby improving the flexibility of task processing in the many-core system.
[0058] In the embodiment of the present disclosure, in step S11, receive the task to be processed sent by a host. Among them, the host is a processing unit outside the many-core system. For example, the host is a central processing unit (CPU). The host is used to transmit the task to be processed to the many-core system for the many-core system to perform task processing. The task to be processed can be any suitable computing task such as an image recognition task or a target detection task.
[0059] In some embodiments, the multiple processing cores of the many-core system include a first processing core and multiple second processing cores. The above task processing device can be the first processing core, that is, the above task processing method can be implemented based on the first processing core of the many-core system. In this case, in step S11, the first processing core receives the task to be processed. Specifically, the first processing core receives the task to be processed from the host. In this case, the first processing core of the many-core system is responsible for receiving the task to be processed and forming a core cluster for processing the task to be processed. Compared with the processing cores of traditional many-core systems, the control ability of some processing cores (the first processing core) in the many-core system in the embodiment of the present disclosure is improved.
[0060] In some embodiments, the task processing device may form a corresponding core cluster according to the resource requirements corresponding to the task to be processed. Specifically, step S12 may further include: step S121 and step S122.
[0061] Step S121: Determine the resource requirements needed when executing the task to be processed according to the task to be processed.
[0062] Specifically, when a task is created, it carries its corresponding resource requirements. Among them, the resources may be computing resources, storage resources, and / or bandwidth resources. In step S121, by parsing the task to be processed, the resource requirements needed when executing the task to be processed can be determined, such as the required computing resource requirements, storage resource requirements, and / or bandwidth resource requirements.
[0063] Step S122: Determine at least one target processing core from all currently available processing cores according to the resource requirements needed when executing the task to be processed, so as to form the core cluster.
[0064] In some embodiments, the task processing device may monitor or obtain the status of each processing core in the many-core system, so that all currently available processing cores in the many-core system can be determined. The available processing cores may be idle processing cores. In step S122, according to the resource requirements needed when executing the task to be processed, at least one processing core is determined from all currently available processing cores as the target processing core, so that the at least one target processing core is used as a core cluster, and the core cluster is used to process the task to be processed.
[0065] In some embodiments, if the task processing device is the first processing core in the many-core system, the core cluster includes at least one target processing core determined from multiple second processing cores. Specifically, in step S122, the first processing core determines at least one second processing core from all currently available second processing cores as the target processing core according to the resource requirements needed when executing the task to be processed, so as to form a core cluster, and the core cluster is used to process the task to be processed.
[0066] Among them, the current remaining (idle) resource situation of the at least one target processing core needs to meet the resource requirements needed when executing the task to be processed, that is, the total current remaining (idle) resources of the at least one target processing core need to be greater than or equal to the resource requirements needed when executing the task to be processed. It should be noted that the embodiments of the present disclosure do not specifically limit the number of target processing cores in the core cluster, as long as the current remaining resources of all target processing cores in the core cluster can at least meet the resource requirements needed when executing the task to be processed.
[0067] In the embodiments of the present disclosure, since the actual resource requirements of different tasks to be processed are different, therefore, according to the task processing method of the embodiments of the present disclosure, for different tasks to be processed, different core clusters can be formed according to the actual situations of different tasks to be processed, realizing the dynamic processing of different tasks to be processed and improving the flexibility of task processing in the many-core system.
[0068] In some embodiments, the task processing device can also form a corresponding core cluster according to the amount of delay requirements (computing time) corresponding to the task to be processed. Specifically, when the task is created, it can also carry its corresponding delay requirements. By parsing the task to be processed, the amount of delay constraint corresponding to the task to be processed can be determined. Then, in step S12, according to the amount of delay constraint corresponding to the task to be processed, at least one target processing core is determined from all currently available processing cores to form the core cluster.
[0069] Among them, the number of target processing cores can be determined according to the amount of delay constraint corresponding to the task to be processed. The embodiments of the present disclosure do not limit how to determine the number of target processing cores according to the amount of delay constraint, as long as the time used when one or more target processing cores are determined to process the task to be processed meets (is less than or equal to) the amount of delay constraint corresponding to the task to be processed.
[0070] For example, in some embodiments, first, a processing core is randomly selected from all currently available processing cores, and the time required for the one processing core to execute the task to be processed is predicted. If the time required for the one processing core to execute the task to be processed is less than or equal to the amount of delay constraint corresponding to the task to be processed, then the one processing core can be determined as the target processing core; if the time required for the one processing core to execute the task to be processed is greater than the amount of delay constraint corresponding to the task to be processed, then one or more processing cores are randomly selected from the other currently available processing cores, and the time required for the one or more processing cores to execute the task to be processed is predicted respectively. Then, the ratio of the time required for each selected processing core to execute the task to be processed to the number of selected processing cores is calculated. If the largest ratio among them is less than or equal to the amount of delay constraint corresponding to the task to be processed, then the selected multiple processing cores can be determined as multiple target processing cores.
[0071] For example, in some embodiments, the corresponding relationship between the amount of delay constraint and the number of required target processing cores can also be pre-configured. After determining the amount of delay constraint of the task to be processed, the number of target processing cores required to execute the task to be processed can be determined from the corresponding relationship, and thus the corresponding number of target processing cores can be selected from all currently available processing cores. For example, the corresponding number of processing cores is randomly selected from all currently available processing cores as the target processing cores.
[0072] In an embodiment of the present disclosure, to facilitate the management of the core cluster and the members in the cluster, after determining the core cluster for processing the to-be-processed task, a task processing device (such as a first processing core) may generate a core cluster list corresponding to the core cluster, and at the same time establish a correspondence between the core cluster and the to-be-processed task. The core cluster list includes, but is not limited to: the cluster identifier of the core cluster, the correspondence between the core cluster and the to-be-processed task, and the core identifier information corresponding to each target processing core in the core cluster. The core identifier information includes, but is not limited to: the core identifier of the target processing core and its address, location, etc. After generating the core cluster list corresponding to the core cluster, the core cluster list may also be sent to each target processing core in the core cluster for storage.
[0073] In some embodiments, when the number of target processing cores in the core cluster is 1, in step S13, sending the to-be-processed task to the core cluster includes: sending the to-be-processed task to the target processing core in the core cluster.
[0074] In some embodiments, when the number of target processing cores in the core cluster is multiple, for the sake of convenience in management, before sending the to-be-processed task to the core cluster, that is, in step S13, it further includes: selecting a target processing core from the core cluster as the master core of the core cluster to manage the core cluster where it is located through the master core, and a target processing core may be randomly selected as the master core of the core cluster. In some embodiments, the above core cluster list may further include information for identifying the identity of the master core of the core cluster.
[0075] In some embodiments, after determining the master core of the core cluster, in step S13, the step of sending the to-be-processed task to the core cluster may further include: sending the to-be-processed task to the master core of the core cluster for the master core to allocate the task to at least some of the target processing cores in the core cluster where it is located according to the to-be-processed task, and at least some of the target processing cores may include the master core itself.
[0076] In some embodiments, the to-be-processed task may be transferred to the master core of the corresponding core cluster through the on-chip network.
[0077] In the embodiments of the present disclosure, a many-core system may include at least one many-core chip, and each many-core chip may include a plurality of processing cores. In some embodiments, for each many-core chip, the corresponding plurality of processing cores may include a first processing core and a plurality of second processing cores. A host may transfer a task to be processed to any many-core chip for processing as needed, and the first processing core of each many-core chip may be used to execute the above-mentioned task processing method based on the received task to be processed. In the case where the number of target processing cores in a core cluster is multiple, the multiple target processing cores may be located on the same many-core chip, and may be located on the same many-core chip as the first processing core that forms the core cluster.
[0078] Since each target processing core for processing the task to be processed in the core cluster and the first processing core are both located on the same many-core chip, unnecessary energy consumption caused by cross-chip interaction during task processing can be effectively avoided, thus effectively ensuring the power consumption of the many-core system.
[0079] It can be understood that the above-mentioned task processing method describes a method for dynamically forming a corresponding core cluster for processing the task to be processed according to the task to be processed. Based on the above-mentioned task processing method, for each task to be processed, a corresponding core cluster can be formed to execute the task to be processed, improving the flexibility of task processing in the many-core system and at the same time improving the control ability of some processing cores (such as the first processing core, the main core of the core cluster) in the many-core system.
[0080] Figure 2 It is a flowchart of a task allocation method provided by an embodiment of the present disclosure.
[0081] Refer to Figure 2 To solve the problem of how a task to be processed is allocated in a core cluster after a task processing device transfers the task to be processed to the core cluster, an embodiment of the present disclosure provides a task allocation method. The task allocation method is used for a core cluster pre-formed in a many-core system. The core cluster is determined based on the above-mentioned task processing method. The core cluster includes a plurality of target processing cores, and one of the plurality of target processing cores is a target processing core serving as a main core. The task allocation method for the core cluster is implemented based on the main core of the core cluster. The task allocation method includes:
[0082] Step S21: Receive a task to be processed.
[0083] Specifically, in step S21, receive the task to be processed from a task processing device, or receive the task to be processed from a first processing core.
[0084] Step S22: Split the task to be processed into a plurality of subtasks.
[0085] As an example, after receiving a task to be processed, the task to be processed can be parsed, decomposed into several calculation steps, the dependency relationship between the calculation steps can be determined according to each calculation step, and sub-task division can be performed according to the resource requirements of the calculation steps (such as storage resource requirements and computing resource requirements) and the dependency relationship between the calculation steps. For example, calculation steps with a dependency relationship are divided into the same sub-task, and calculation steps without a dependency relationship are divided into different sub-tasks. At the same time, based on the resource requirements of the calculation steps, the resource requirements corresponding to each divided sub-task are made as average and balanced as possible. Among them, when the output of one calculation step is the input of another calculation step, there is a dependency relationship between the two calculation steps. When there is no serial relationship between the inputs and outputs of multiple calculation steps, there is no dependency relationship between the multiple calculation steps. In other words, calculation steps with a dependency relationship refer to calculation steps that need to be calculated serially, and calculation steps without a dependency relationship refer to calculation steps that can be calculated in parallel. The finally divided multiple sub-tasks are multiple sub-tasks that can be calculated in parallel.
[0086] For example, for a task to be processed based on a neural network, its calculation process includes convolution, pooling, convolution, pooling, convolution, pooling, and fully connected. Among them, the result of convolution is the input of pooling, and the result of pooling is the input of fully connected, which indicates that there is a dependency relationship between convolution, pooling, and fully connected. If any one of convolution, pooling, and fully connected can be decomposed into multiple calculation steps that can be calculated in parallel, for example, convolution can be decomposed into multiple calculation steps, and each calculation step is used to process part of the convolution, then there is no dependency relationship between the multiple calculation steps corresponding to convolution; similarly, there is no dependency relationship between the multiple calculation steps corresponding to pooling, and there is no dependency relationship between the multiple calculation steps corresponding to fully connected.
[0087] Step S23: Allocate corresponding sub-tasks to at least some of the target processing cores in its own core cluster. Each target processing core corresponds to at least one sub-task, so that each target processing core in at least some of the target processing cores can execute its corresponding sub-task.
[0088] For the task allocation method provided by the embodiments of the present disclosure, for each core cluster of the many-core system, the master core of the core cluster splits the task to be processed corresponding to the core cluster into multiple sub-tasks, and allocates the multiple sub-tasks to each target processing core (including the master core itself) in the cluster for processing, thereby effectively improving the processing efficiency of the task to be processed.
[0089] Figure 3 It is a flowchart of another task allocation method provided by the embodiments of the present disclosure.
[0090] In some embodiments, in order to effectively avoid the occurrence of failures when the core cluster processes its corresponding tasks to be processed, in some embodiments, referring to Figure 3 , after the above step S22, steps S221 to S223 are further included.
[0091] Step S221: Statistically analyze the current available core resources of the core cluster where it is located.
[0092] Among them, the current available core resources of the core cluster may include the number of target processing cores in the core cluster and the current remaining (idle) resource conditions corresponding to each target processing core, such as the current remaining resource amount, including the current remaining computing resource amount, the current remaining storage resource amount, and / or the current remaining bandwidth resource amount.
[0093] Step S222: According to the current available core resource conditions, determine whether the core cluster where it is located currently has the conditions to execute the multiple sub-tasks split currently. If so, jump to step S23; otherwise, execute step S223.
[0094] Specifically, in step S222, it is determined whether the current available core resource conditions of the core cluster where it is located meet the resource demand amounts corresponding to each of the sub-tasks split currently. If so, it is determined that the core cluster where it is located currently has the conditions to execute the multiple sub-tasks split currently; otherwise, it is determined that the core cluster where it is located currently does not have the conditions to execute the multiple sub-tasks split currently.
[0095] As an example, if the number of target processing cores in the core cluster is less than the number of sub-tasks split currently, and there is at least one target processing core that meets the conditions for executing multiple sub-tasks, and for the other target processing cores except this target processing core, each of the other target processing cores meets the conditions for executing at least one sub-task, and the number of sub-tasks that all target processing cores can execute is consistent with the number of sub-tasks split currently, then it is determined that the core cluster where it is located currently has the conditions to execute multiple sub-tasks. Among them, the condition that a target processing core meets the conditions for executing multiple sub-tasks may be that the current remaining resource amount of this target processing core is greater than or equal to the resource demand amount required for these multiple sub-tasks, and the condition that a target processing core meets the conditions for executing at least one sub-task may be that the current remaining resource amount of this target processing core is greater than or equal to the resource demand amount required for this at least one sub-task.
[0096] As an example, if the number of target processing cores in the core cluster is greater than or equal to the number of currently split sub-tasks, and for each target processing core, the target processing core meets the condition of executing at least one sub-task. For example, the remaining memory capacity corresponding to the target processing core (i.e., the current remaining storage resource amount) exceeds the static memory amount required for the at least one sub-task (i.e., the storage resource demand amount), and the remaining computing power corresponding to the target processing core (i.e., the current remaining computing resource amount) exceeds the computing amount required for the at least one sub-task (i.e., the computing resource demand amount), and the current routing transmission bandwidth threshold corresponding to the target processing core (i.e., the current remaining bandwidth resource amount) exceeds the routing transmission amount required for the at least one sub-task (i.e., the bandwidth resource demand amount), and the sum of the number of sub-tasks that all target processing cores can execute is consistent with the number of currently split sub-tasks, it indicates that all target processing cores in the core cluster meet the conditions for executing the corresponding sub-tasks, thereby determining that the core cluster where it is located currently has the condition to execute the multiple currently split sub-tasks. If there is at least one target processing core that does not meet the condition of executing any sub-task, for example, the remaining storage resource amount of the target processing core is less than the storage resource amount required for the sub-task, it is determined that the core cluster where it is located currently does not have the condition to execute the multiple currently split sub-tasks.
[0097] In step S222, in response to determining that the core cluster where it is located currently has the condition to execute the multiple currently split sub-tasks, perform the step of allocating sub-tasks to each target processing core in the core cluster where it is located, that is, execute step S23.
[0098] In step S222, in response to determining that the core cluster where it is located currently does not have the condition to execute the multiple currently split sub-tasks, jump to step S223.
[0099] Step S223, in response to determining that the core cluster where it is located currently does not have the condition to execute the multiple currently split sub-tasks, re-split the task to be processed to re-split into multiple new sub-tasks, and jump to step S222.
[0100] For example, by increasing or decreasing the number of sub-tasks to adjust the resource demand amounts required for some or all sub-tasks, or keeping the number of sub-tasks unchanged, divide some of the computing steps in some sub-tasks into other sub-tasks, thereby adjusting the resource demand amounts required for some or all sub-tasks.
[0101] If, after multiple re - splits of the tasks to be processed, the core cluster where it is located cannot meet the conditions for executing the multiple subtasks split out, it applies to the task processing device (such as the first processing core) to add more core resources to the core cluster where it is located, or determines other idle processing cores from the many - core system and adds the other idle processing cores in the many - core system to the core cluster where it is located, so as to expand the current remaining resources of the core cluster where it is located, so that the core cluster can meet the conditions for executing multiple subtasks. Among them, the threshold of the number of splits can be set in advance, for example, it can be set to 3 times.
[0102] Further, in order to determine the number of subtasks that each target processing core in at least some of the target processing cores can execute for task allocation, in some embodiments, before performing the step of allocating subtasks to each target processing core in the core cluster where it is located, that is, before performing step S23 in response to determining that the core cluster where it is located currently has the conditions for executing the multiple subtasks split out currently, this task allocation method further includes: for each target processing core in at least some of the target processing cores, according to the current remaining resources of the target processing core and the resource requirements corresponding to each of the currently split - out subtasks, determine at least one subtask that matches the target processing core.
[0103] For example, for at least some of the target processing cores, if the current remaining resources of a certain target processing core only meet the conditions for executing one of the multiple subtasks, then the target processing core corresponds and matches with this subtask, and when allocating tasks subsequently, allocate this subtask to the target processing core. If the current remaining resources of a certain target processing core meet the conditions for executing two of the currently split - out multiple subtasks, then the target processing core corresponds and matches with these two subtasks, and when allocating tasks subsequently, these two subtasks can be allocated to the target processing core.
[0104] After determining the subtasks that each target processing core in at least some of the target processing cores respectively corresponds and matches with, allocate the corresponding subtasks to the at least some of the target processing cores, specifically including: for each subtask, allocate the subtask to the target processing core in the core cluster where it is located that matches the subtask.
[0105] In some embodiments, in order to further improve the task processing efficiency, the subtasks can also be allocated according to the time - balancing strategy, so that the time required for each target processing core to process the subtasks allocated to it is equal or approximately equal, that is, the time used by each target processing core to process the corresponding subtasks is equal or approximately equal to the time used by other target processing cores.
[0106] In some embodiments, considering the impact of routing transmission bandwidth on the performance of the many-core system, before allocating corresponding subtasks to at least some target processing cores in the core cluster where it is located, that is, step S23, the task allocation method further includes: determining the current optimal subtask allocation strategy according to the resource requirements corresponding to each subtask, the current remaining resource situation of each target processing core in at least some target processing cores, and the location information.
[0107] Specifically, for each target processing core in at least some target processing cores, at least one subtask matching the target processing core is determined according to the current remaining resource situation of the target processing core and the resource requirements corresponding to each currently split subtask. After determining the subtasks matching each target processing core, the subtasks finally allocated to it are determined based on the location information of each target processing core, that is, the subtasks finally executed by each target processing core, so as to obtain the current optimal subtask allocation strategy. The optimal subtask allocation strategy includes the correspondence between each target processing core and the subtasks finally required to be executed, so that the overall routing transmission bandwidth corresponding to the core cluster where it is located is minimized, thereby ensuring the performance of the many-core system.
[0108] As an example, after determining the subtasks matching each target processing core, first, all possible initial subtask allocation strategies are determined according to the random allocation principle. The initial subtask allocation strategy includes the initial correspondence between each target processing core and the subtasks. For each initial subtask allocation strategy, the routing transmission cost corresponding to the initial subtask allocation strategy is calculated using a preset routing transmission cost algorithm. Among them, the routing transmission cost algorithm includes a routing transmission cost function:
[0109] W = ∑M n ,M n =|x i -x j |+|y i -y j |
[0110] Among them, W represents the routing transmission cost corresponding to the initial subtask allocation strategy, M n represents the routing transmission cost corresponding to the nth subtask, x i represents the x-axis position coordinate of the main core of the core cluster in the preset position coordinate system, y i represents the y-axis position coordinate of the main core of the core cluster in the preset position coordinate system, j represents the x-axis position coordinate of the target processing core corresponding to the nth subtask in the initial correspondence in the preset position coordinate system, y jIt represents the y-axis position coordinate of the target processing core corresponding to the nth sub-task in the initial correspondence relationship in the preset position coordinate system. The preset position coordinate system can be a two-dimensional coordinate system established with the first processing core in the many-core system as the origin in advance, or a two-dimensional coordinate system established with the master core in the core cluster as the origin in advance. At this time, the position coordinate of the master core in the core cluster is (0, 0).
[0111] After determining the routing transmission cost W corresponding to each initial sub-task allocation strategy, the initial sub-task allocation strategy with the minimum value of the routing transmission cost W is used as the optimal current optimal sub-task allocation strategy.
[0112] In some embodiments, optimization methods such as reinforcement learning methods based on neural networks, simulated annealing algorithms, and convex optimization algorithms can be further used to optimize the above routing transmission cost function, and the optimal solution for sub-task allocation based on the position information of the target processing core is calculated based on the optimized routing transmission cost function. This optimal solution is the current optimal sub-task allocation strategy.
[0113] In some embodiments, after determining the current optimal sub-task allocation strategy, corresponding sub-tasks are allocated to at least some of the target processing cores, which specifically includes: based on the current optimal sub-task allocation strategy, corresponding sub-tasks are allocated to at least some of the target processing cores in the core cluster where it is located.
[0114] In some embodiments, to facilitate the target processing core to execute its corresponding sub-task, after determining the sub-task corresponding to each target processing core among at least some of the target processing cores and before the step of allocating the corresponding sub-task to the target processing core, this task allocation method further includes: step S231 and step S233.
[0115] Step S231, generating task configuration information for the sub-tasks corresponding to each target processing core among at least some of the target processing cores.
[0116] Specifically, for each target processing core among at least some of the target processing cores, corresponding task configuration information is generated according to the sub-task corresponding to the target processing core. The task configuration information includes but is not limited to: memory configuration information, arithmetic operator configuration information, routing configuration information, calculation control configuration information, and synchronization management configuration information.
[0117] For example, the memory configuration information may include the memory information required for the target processing core to execute subtasks, the data, parameters, etc. that need to be stored or imported during the execution of subtasks. The arithmetic operator configuration information may include the information of the arithmetic operators to be executed. The routing configuration information may include the routing transmission paths of data such as calculation results (task execution results). The calculation control configuration information may include information such as the operation order and operation time. The synchronization management configuration information may include the information of the data to be synchronously processed.
[0118] In some embodiments, for the convenience of management and task execution, after determining the subtasks corresponding to each target processing core in at least some of the target processing cores and before the step of allocating the corresponding subtasks to the target processing cores, the task allocation method further includes: generating task execution instructions, address generation logic, control logic, and synchronization logic corresponding to each target processing core. Among them, the address generation logic may be, for example, the generation logic of the memory read / write addresses corresponding to the target processing core. The control logic may be, for example, the control logic of the operation timing and order of each target processing core. The synchronization logic may be, for example, the logic of the data to be synchronously processed. The above task configuration information may include logic such as address generation logic, control logic, and synchronization logic.
[0119] Step S232: Send the respective corresponding task configuration information to each target processing core in at least some of the target processing cores, so that each target processing core stores its corresponding task configuration information.
[0120] Specifically, in step S232, the respective corresponding task configuration information is sent to each target processing core in at least some of the target processing cores through the on-chip network.
[0121] Step S233: In response to the configuration completion information returned by each target processing core, notify the data source corresponding to the task to be processed to provide the task data required by each target processing core to each target processing core.
[0122] In step S233, after task configuration is performed on each target processing core in at least some of the target processing cores, the data source corresponding to the task to be processed may be notified to move the task data (such as the picture data, text data, etc. corresponding to the input task), and the data source may be notified by means of signaling.
[0123] In some embodiments, step S23 may include: sending the corresponding task execution instructions to each target processing core in at least some of the target processing cores, for each target processing core to execute its corresponding subtask in response to the task execution instructions. Among them, step 23 and the above step S233 may be executed synchronously and in parallel, or step S23 may be executed after step S233. The embodiments of the present disclosure do not limit this.
[0124] After each target processing core in at least a part of the target processing cores receives a corresponding task execution instruction, in response to the task execution instruction, it executes a corresponding subtask and obtains and stores a corresponding task execution result or calculation result. After the subtask is completed, it receives the subtask completion messages sent by each target processing core.
[0125] Then, after determining that the task to be processed is completed according to the task completion situation of each target processing core, it notifies the data source to read the task execution results distributed in each target processing core into a memory outside the many-core chip, such as a host memory (Host DDR) or other external memory (DDR).
[0126] In some embodiments, after the task to be processed is completed, the corresponding core cluster can be disassembled, for example, suspending the control logic. At the same time, it reports to the task processing device that the core cluster has been disassembled, so as to perform the next task to be processed.
[0127] Figure 4 The flowchart of another task processing method based on a many-core system provided by the embodiments of the present disclosure. Figure 5 It is a block diagram of the composition of a many-core system, as Figure 4 and Figure 5 shown. The many-core system includes a first processing core and a plurality of second processing cores. The task processing method includes:
[0128] Step S31: The first processing core receives a task to be processed sent by the host.
[0129] Step S32: The first processing core determines a core cluster for processing the task to be processed according to the task to be processed. The core cluster includes at least one target processing core determined from the plurality of second processing cores.
[0130] Step S33: The first processing core selects a target processing core from the core cluster as the main core of the core cluster and sends the task to be processed to the main core.
[0131] Step S34: The main core splits the task to be processed into a plurality of subtasks.
[0132] Step S35: The main core determines whether the core cluster currently has the condition to execute the plurality of currently split subtasks according to the current available core resources of the core cluster.
[0133] Step S36: In response to determining that the core cluster where the main core is located currently has the condition to execute the plurality of currently split subtasks, the main core determines at least one subtask corresponding to each target processing core in at least a part of the target processing cores.
[0134] Step S37: The main core generates task configuration information for the subtasks corresponding to each target processing core and sends the task configuration information to each target processing core.
[0135] Step S38: In response to the configuration completion information returned by each target processing core, the main core notifies the data source corresponding to the task to be processed to provide the task data required by each target processing core to each target processing core.
[0136] Step S39: The main core sends corresponding task execution instructions to each target processing core for each target processing core to execute its corresponding subtask in response to the task execution instructions.
[0137] Step S40: After the task to be processed is completed, the main core notifies the data source corresponding to the task to be processed to read out the execution results of each task distributed in each target processing core to the external memory.
[0138] Step S41: The main core disassembles the core cluster and feeds back the information that the core cluster has been disassembled to the first processing core.
[0139] It should be noted that Figure 4 For the specific description of the task processing method shown, reference can be made to the description of the task processing method shown above, and Figure 1 and Figure 2 and Figure 3 For the description of the task allocation method shown, details are not repeated here.
[0140] Figure 6 This is a block diagram of a task processing device provided by an embodiment of the present disclosure.
[0141] Referring to Figure 6 , an embodiment of the present disclosure provides a task processing device 500. The task processing device is applied to a many-core system, which includes multiple processing cores. The task processing device 500 includes: a first receiving module 501, a core cluster formation module 502, and a sending module 503.
[0142] Among them, the first receiving module 501 is configured to receive a task to be processed; the core cluster formation module 502 is configured to determine a core cluster for processing the task to be processed according to the task to be processed. The core cluster includes at least one target processing core determined from multiple processing cores; the sending module 503 is configured to send the task to be processed to the core cluster for the core cluster to execute the task to be processed.
[0143] In addition, the task processing device 500 provided by the embodiment of the present disclosure is used to implement the above task processing method. For other descriptions of the task processing device 500, reference can be made to the description in the above task processing method, and details are not repeated here.
[0144] Figure 7 This is a block diagram of a task allocation device provided by an embodiment of the present disclosure.
[0145] Referring toFigure 7 In an embodiment of the present disclosure, a task allocation device 600 is provided. The task allocation device 600 is used to implement the above-mentioned task allocation method, and allocate tasks to a pre-formed core cluster in a many-core system. The core cluster includes a plurality of target processing cores. The task allocation device 600 includes: a second receiving module 601, a task splitting module 602, and a task allocation module 603.
[0146] Among them, the second receiving module 601 is used to receive a task to be processed; the task splitting module 602 is used to split the task to be processed into a plurality of subtasks; the task allocation module 603 is used to allocate corresponding subtasks to at least some of the target processing cores in its own core cluster. Each of the at least some target processing cores corresponds to at least one subtask, so that each of the target processing cores in the at least some target processing cores can execute its corresponding subtask.
[0147] In addition, the task allocation device 600 provided in the embodiment of the present disclosure is used to implement the above-mentioned task allocation method. For other descriptions of the task allocation device 600, reference can be made to the descriptions in the above-mentioned task allocation method, which will not be elaborated here.
[0148] The embodiment of the present disclosure also provides a processing core, which includes: the above-mentioned task processing device and / or the above-mentioned task allocation device.
[0149] Figure 8 It is a block diagram of the composition of an electronic device provided by an embodiment of the present disclosure.
[0150] Referring to Figure 8 In an embodiment of the present disclosure, an electronic device is provided. The electronic device includes a plurality of processing cores 701 and a network-on-chip 702. Among them, the plurality of processing cores 701 are all connected to the network-on-chip 702, and the network-on-chip 702 is used to interact data between the plurality of processing cores and external data.
[0151] Among them, one or more first instructions are stored in one or more of the processing cores 701, and the one or more first instructions are executed by the one or more processing cores 701, so that the one or more processing cores 701 can execute the above-mentioned task processing method; and / or, one or more second instructions are stored in one or more of the processing cores 701, and the one or more second instructions are executed by the one or more processing cores 701, so that the one or more processing cores 701 can execute the above-mentioned task allocation method.
[0152] In addition, the embodiment of the present disclosure also provides a computer-readable medium, on which a first computer program and / or a second computer program are stored. Among them, the first computer program implements the above-mentioned task processing method when executed by a processing core; the second computer program implements the above-mentioned task allocation method when executed by a processing core.
[0153] In addition, an embodiment of the present disclosure also provides a computer program product. When the computer program product runs on a computer, it causes the computer to execute the above-mentioned task processing method, or when the computer program product runs on a computer, it causes the computer to execute the above-mentioned task allocation method.
[0154] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical disk storage, magnetic cassettes, tapes, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.
[0155] Example embodiments have been disclosed herein, and although specific terms have been used, they are used for and should be construed only for general illustrative purposes and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise explicitly stated, features, characteristics, and / or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in connection with other embodiments. Accordingly, those skilled in the art will understand that various forms and details may be changed without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A task processing method based on a many-core system, the many-core system including a plurality of processing cores, the method comprising: Receiving a task to be processed; Determining, according to the task to be processed, a core cluster for processing the task to be processed, the core cluster including at least one target processing core determined from the plurality of processing cores; Sending the task to be processed to the core cluster for the core cluster to execute the task to be processed, wherein the core cluster is configured to split the task to be processed into a plurality of subtasks; Allocating corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, each of at least some of the target processing cores corresponding to at least one subtask, for each of the target processing cores in at least some of the target processing cores to execute their respective corresponding subtasks.
2. The task processing method according to claim 1, wherein determining, according to the task to be processed, a core cluster for processing the task to be processed includes: Determining, according to the task to be processed, the required resource demand when executing the task to be processed; Determining at least one target processing core from all currently available processing cores according to the resource demand to form the core cluster.
3. The task processing method according to claim 1, wherein the plurality of processing cores include a first processing core and a plurality of second processing cores, the task processing method is implemented based on the first processing core, and the core cluster includes at least one target processing core determined from the plurality of second processing cores.
4. The task processing method according to claim 1, wherein the number of the target processing cores is multiple, and before sending the task to be processed to the core cluster, further comprising: Selecting a target processing core from the core cluster as the main core of the core cluster; The sending the task to be processed to the core cluster includes: Sending the task to be processed to the main core for the main core to allocate tasks to at least some of the target processing cores in the core cluster according to the task to be processed.
5. The task processing method according to any one of claims 1-4, wherein the many-core system includes at least one many-core chip, each many-core chip includes a plurality of the processing cores, and when the number of the target processing cores is multiple, the multiple target processing cores are located on the same many-core chip.
6. A task allocation method, the task allocation method being used for a core cluster pre-formed in a many-core system, the core cluster being determined according to the task processing method according to any one of claims 1-5 above, the core cluster including a plurality of target processing cores, the method comprising: Receiving a task to be processed; Splitting the task to be processed into a plurality of subtasks; Allocating corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, each of at least some of the target processing cores corresponding to at least one subtask, for each of the target processing cores in at least some of the target processing cores to execute their respective corresponding subtasks.
7. The task allocation method according to claim 6, wherein after splitting the to-be-processed task into multiple subtasks, it further includes: Statistically analyzing the current available core resources of the core cluster where it is located; Based on the current available core resources, determining whether the core cluster where it is located currently has the condition to execute the multiple subtasks currently split out; In response to determining that the core cluster where it is located currently has the condition to execute the multiple subtasks currently split out, performing the step of allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located.
8. The task allocation method according to claim 7, wherein after determining whether the core cluster where it is located currently has the condition to execute the multiple subtasks currently split out, it further includes: In response to determining that the core cluster where it is located currently does not have the condition to execute the multiple subtasks currently split out, re-splitting the to-be-processed task to re-split out multiple new subtasks, and continuing to perform the step of determining whether the core cluster where it is located currently has the condition to execute the multiple subtasks currently split out based on the current available core resources.
9. The task allocation method according to claim 6, wherein before allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, it further includes: For each of at least some of the target processing cores, determining at least one subtask matching the target processing core according to the current remaining resources of the target processing core and the resource requirements corresponding to each of the currently split subtasks; The step of allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located includes: for each subtask, allocating the subtask to the target processing core in the core cluster where it is located that matches the subtask.
10. The task allocation method according to claim 6, wherein before allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, it further includes: Determining the current optimal subtask allocation strategy according to the resource requirements corresponding to each subtask, the current remaining resources of each of at least some of the target processing cores, and the location information; The step of allocating the subtasks to each of the target processing cores in the core cluster where it is located includes: based on the current optimal subtask allocation strategy, allocating the subtasks to each of the target processing cores in the core cluster where it is located.
11. The task allocation method according to claim 9 or 10, wherein the method further includes: Generating task configuration information for the subtasks corresponding to each of at least some of the target processing cores; Sending the respective corresponding task configuration information to each of at least some of the target processing cores, so that each target processing core stores its corresponding task configuration information.
12. The task allocation method according to claim 11, wherein after sending the respective corresponding task configuration information to each of at least some of the target processing cores, the method further includes: In response to the configuration completion information returned by each target processing core, notifying the data source corresponding to the task to be processed to provide the task data required by each target processing core to each target processing core; Allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located includes: sending corresponding task execution instructions to each of at least some of the target processing cores, so that each target processing core executes the corresponding subtask in response to the task execution instruction.
13. A task processing device, which is applied to a many-core system. The many-core system includes a plurality of processing cores. The task processing device includes: A first receiving module, configured to receive a task to be processed; A core cluster formation module, configured to determine, according to the task to be processed, a core cluster for processing the task to be processed. The core cluster includes at least one target processing core determined from the plurality of processing cores; A sending module, configured to send the task to be processed to the core cluster for the core cluster to execute the task to be processed, wherein the core cluster is configured to split the task to be processed into a plurality of subtasks; Allocating the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, each of at least some of the target processing cores corresponding to at least one subtask, so that each of the target processing cores in at least some of the target processing cores executes the corresponding subtask.
14. A task allocation device, which is used to allocate tasks to a pre-formed core cluster in a many-core system. The core cluster is determined based on the task processing method according to any one of claims 1-5 above. The core cluster includes a plurality of target processing cores. The task allocation device includes: A second receiving module, configured to receive a task to be processed; A task splitting module, configured to split the task to be processed into a plurality of subtasks; A task allocation module, configured to allocate the corresponding subtasks to at least some of the target processing cores in the core cluster where it is located, each of at least some of the target processing cores corresponding to at least one subtask, so that each of the target processing cores in at least some of the target processing cores executes the corresponding subtask.
15. A processing core, comprising: The task processing device according to claim 13, and / or, the task allocation device according to claim 14.
16. An electronic device, including: A plurality of processing cores; And An on-chip network, configured to interact data between the plurality of processing cores and external data; One or more first instructions are stored in one or more of the processing cores, and the one or more first instructions are executed by one or more of the processing cores, so that one or more of the processing cores can execute the task processing method according to any one of claims 1-5; And / or One or more of the processing cores stores one or more second instructions, and one or more of the second instructions are executed by one or more of the processing cores to enable one or more of the processing cores to execute the task allocation method described in any one of claims 6-12.
17. A computer-readable medium having stored thereon a first computer program and / or a second computer program, wherein, When the first computer program is executed by a processing core, it implements the task processing method described in any one of claims 1-5; When the second computer program is executed by a processing core, it implements the task allocation method described in any one of claims 6-12.
18. A computer program product, when the computer program product runs on a computer, it causes the computer to execute the task processing method described in any one of claims 1-5; or, When the computer program product runs on a computer, it causes the computer to execute the task allocation method described in any one of claims 6-12.
Citation Information
Patent Citations
Many-core computing resource scheduling method and device
CN110347504A