Core sharing method and device, processing core, electronic device, medium

By introducing a nuclear sharing method in the multi-core system, allowing shared nuclear arrays between core clusters, the problem of cross-core cluster business sharing in the multi-core system is solved, and flexibility in processing nuclear data sharing and task processing is achieved.

CN114546493BActive Publication Date: 2025-06-06LYNXI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011330876.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-24
Publication Date
2025-06-06
Estimated Expiration
2040-11-24

AI Technical Summary

Technical Problem

In a multi-core system, how to effectively realize business sharing across core clusters, especially in scenarios such as deep learning networks, there are difficulties in handling data sharing and task allocation between cores.

Method used

By introducing a kernel sharing method in the multi-core system, a shared core array is allowed to be shared core arrays between core clusters. The shared core array is composed of multiple shared cores. The shared core is determined from its own core clusters and other predetermined core clusters, and is used to receive and execute tasks of multiple core clusters and store task data of each core cluster.

Benefits of technology

It realizes cross-cluster service sharing among multiple core clusters in the multi-core system, meets the need for multiple core clusters to share the processing core data, and improves the control capability of processing cores and the flexibility of task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546493B_ABST
    Figure CN114546493B_ABST
Patent Text Reader

Abstract

The present disclosure provides a core sharing method based on a many-core system, wherein the many-core system includes a plurality of pre-configured core clusters, each of which includes at least one second processing core, and the method includes: receiving a core sharing request; according to the core sharing request, determining at least one second processing core from the second processing cores of the first core cluster to which the system is located and / or a predetermined second core cluster, as a shared core between the first core cluster and the second core cluster, wherein at least one shared core constitutes a shared core array; wherein the shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, respectively, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster. The present disclosure also provides a core sharing device, a processing core, an electronic device, and a computer-readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a core sharing method and device based on a many-core system, a processing core, an electronic device, and a computer-readable medium. Background Art

[0002] With the development of artificial intelligence technology, the demand for data processing speed is increasing, making the application of many-core systems more and more extensive. Many-core systems usually have many cores (also called processing cores). The core is the smallest computing unit in the many-core system that can be independently scheduled and has complete computing capabilities. The core has certain storage, computing and other resources. The cores of the many-core system can run program instructions independently, and the ability of parallel computing can speed up the running speed of the program and provide multi-tasking capabilities. Summary of the invention

[0003] The present disclosure provides a core sharing method and device based on a many-core system, a processing core, an electronic device, and a computer-readable medium.

[0004] In a first aspect, the present disclosure provides a core sharing method based on a many-core system, wherein the many-core system includes a plurality of pre-configured core clusters, each of the core clusters including at least one second processing core, the method comprising: receiving a core sharing request; according to the core sharing request, determining at least one second processing core from the second processing cores of the first core cluster to which the system is located and / or a predetermined second core cluster to serve as a shared core between the first core cluster and the second core cluster, the at least one shared core constituting a shared core array; wherein the shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, respectively, to store first task data corresponding to the tasks of the first core cluster, and to store second task data corresponding to the tasks of the second core cluster.

[0005] In some embodiments, the many-core system also includes a first processing core, and receiving a core sharing request includes: receiving a core sharing request sent by an external host or the first processing core, wherein the core sharing request is generated by the external host or the first processing core based on a common task corresponding to the first core cluster and the second core cluster.

[0006] In some embodiments, receiving the core sharing request includes: receiving a core sharing request sent by a main processing core of the second core cluster, where the main processing core of the second core cluster is a pre-designated second processing core among at least one second processing core of the second core cluster.

[0007] In some embodiments, after the shared cores are determined, the method further includes: updating a core cluster list corresponding to each of the shared cores, wherein the updated core cluster list includes identification information corresponding to the first core cluster and the second core cluster.

[0008] In some embodiments, after determining the shared core array, the core sharing method further includes:

[0009] Creating a first shared storage area corresponding to the first core cluster in a storage area corresponding to the shared core array, wherein the first shared storage area is used to store first task data of a task corresponding to the first core cluster;

[0010] A second shared storage area corresponding to the second core cluster is created in a storage area corresponding to the shared core array, and the second shared storage area is used to store second task data of the task corresponding to the second core cluster.

[0011] In some embodiments, before creating a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array, the method further includes:

[0012] Determining whether there is available storage space in the storage area corresponding to the shared core array;

[0013] In response to determining that there is available storage space in the storage area corresponding to the shared core array, a step of creating a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array is performed.

[0014] In some embodiments, after determining whether there is available storage space in the storage area corresponding to the shared core array, the method further includes:

[0015] In response to determining that there is no available storage space in the storage area corresponding to the shared core array, determining an idle processing core among the processing cores that do not belong to any core cluster in the many-core system;

[0016] At least one of the idle processing cores is determined as the shared core and added to the shared core array.

[0017] In some embodiments, the number of the shared cores is multiple, the storage area corresponding to the shared core array further includes a general shared storage area, and the first shared storage area, the second shared storage area and the general shared storage area correspond to one or more shared cores respectively;

[0018] The shared core corresponding to the first shared storage area is configured to store first task data corresponding to the task of the first core cluster;

[0019] The shared core corresponding to the second shared storage area is configured to store second task data corresponding to the tasks of the second core cluster;

[0020] The shared core corresponding to the universal shared memory area is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively.

[0021] In some embodiments, the first task data includes first input data, first output data, and first task configuration information, and the first shared storage area includes a first input data area, a first output data area, and a first task configuration area;

[0022] Among them, the shared core in the first input data area is configured to store the first input data corresponding to the task of the first core cluster; the shared core in the first output data area is configured to store the first output data corresponding to the task of the first core cluster; the shared core in the first task configuration area is configured to store the first task configuration information corresponding to the task of the first core cluster.

[0023] In some embodiments, the second task data includes second input data, second output data, and second task configuration information, and the second shared storage area includes a second input data area, a second output data area, and a second task configuration area;

[0024] Among them, the shared core in the second input data area is configured to store the second input data corresponding to the tasks of the second core cluster; the shared core in the second output data area is configured to store the second output data corresponding to the tasks of the second core cluster; and the shared core in the second task configuration area is configured to store the second task configuration information corresponding to the tasks of the second core cluster.

[0025] In a second aspect, the present disclosure provides a core sharing device, which is applied to a many-core system, which includes a plurality of pre-configured core clusters, each core cluster including at least one second processing core, and the core sharing device includes: a receiving module, used to receive a core sharing request; a sharing determination module, used to determine, according to the core sharing request, at least one second processing core from the second processing cores of the first core cluster to which it is located and / or a predetermined second core cluster, as a shared core between the first core cluster and the second core cluster, at least one shared core forming a shared core array; wherein the shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, respectively, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster.

[0026] In a third aspect, the present disclosure provides a processing core, which includes the above-mentioned core sharing device.

[0027] In a fourth aspect, the present disclosure provides an electronic device, comprising: multiple processing cores; and an on-chip network configured to exchange data between the multiple processing cores and external data; wherein one or more instructions are stored in one or more of the processing cores, and one or more of the 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 core sharing method.

[0028] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the computer program implements the above-mentioned core sharing method when executed by a processing core.

[0029] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying 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 of 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:

[0031] Figure 1 A flowchart of a core sharing method based on a many-core system provided in an embodiment of the present disclosure;

[0032] Figure 2 A block diagram of a multi-core system provided in an embodiment of the present disclosure;

[0033] Figure 3 A flowchart of another core sharing method provided by an embodiment of the present disclosure;

[0034] Figure 4 A flowchart of another core sharing method provided by an embodiment of the present disclosure;

[0035] Figure 5 is a schematic diagram of the structure of a shared core array in an embodiment of the present disclosure;

[0036] Figure 6 A block diagram of a core sharing device provided by an embodiment of the present disclosure;

[0037] Figure 7 A block diagram of a composition of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] In order to enable 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 in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as 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 the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0039] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0040] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0041] The terms used herein are only used to describe 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 plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0042] 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 commonly used 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 explicitly defined as such herein.

[0043] In the disclosed embodiment, the many-core system includes a plurality of preconfigured core clusters, each core cluster includes at least one second processing core, and each core cluster is used to perform corresponding computing tasks. In the process of each core cluster performing corresponding tasks, there may be data and parameters (such as weights) of certain processing cores that are required by multiple core clusters at the same time. As an example, in a deep learning network, for the processing cores corresponding to the backbone network and the processing cores corresponding to the branch network, the processing cores corresponding to the branch network all need to use the data of the processing cores corresponding to the backbone network for predictive processing. When the processing cores corresponding to the branch network and the processing cores corresponding to the backbone network are located in different core clusters, how to effectively implement cross-cluster services between core clusters is a technical problem that needs to be solved urgently in the core cluster scenario of the many-core system.

[0044] Figure 1 A flowchart of a core sharing method based on a many-core system provided in an embodiment of the present disclosure.

[0045] Reference Figure 1 The embodiment of the present disclosure provides a core sharing method based on a many-core system, wherein the many-core system includes a plurality of pre-configured core clusters, each core cluster includes at least one second processing core, the method can be executed by a core sharing device, and the device can be implemented by software and / or hardware. The core sharing method includes:

[0046] Step S1: receiving a core sharing request.

[0047] Step S2: According to the core sharing request, at least one second processing core is determined from the second processing cores of the first core cluster and / or the predetermined second core cluster to serve as a shared core between the first core cluster and the second core cluster, and the at least one shared core constitutes a shared core array.

[0048] The shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster. The first task data includes first input data, first output data, and first task configuration information, and the second task data includes second input data, second output data, and second task configuration data.

[0049] Among them, the input data may be, for example, the data required to execute the task, the output data may be, for example, the result of executing the task, and the task configuration information is the configuration required to execute the task, such as memory configuration, routing configuration, operation order configuration, operation time configuration, operation operator configuration and other information.

[0050] In the disclosed embodiment, the first core cluster is any core cluster among multiple core clusters of the many-core system, and the second core cluster is any core cluster other than the first core cluster in the many-core system. The number of second core clusters may be one or more.

[0051] The core sharing method based on the many-core system provided by the embodiment of the present disclosure, in a business scenario where the many-core system includes multiple core clusters, for multiple core clusters with cross-cluster business needs, by using at least one second processing core in any core cluster or multiple core clusters as a shared core between the multiple core clusters, the multiple core clusters can share the data of the shared core (such as parameters required in the deep learning network, etc.), thereby realizing cross-cluster business between the multiple core clusters of the many-core system, meeting the need for multiple core clusters to share some processing core data, improving the control capability of some processing cores in the many-core system, and improving the flexibility of the many-core system in task processing.

[0052] Figure 2 A block diagram of a multi-core system provided in an embodiment of the present disclosure. In the embodiment of the present disclosure, see Figure 2 , each core cluster has a main processing core, which is a pre-designated second processing core among at least one second processing core of the core cluster. The core sharing method of the disclosed embodiment can be applied to the main processing core of any core cluster in the many-core system, that is, the core sharing method of the disclosed embodiment is implemented based on the main processing core of any core cluster, and the main processing core can be used to process the tasks corresponding to the core cluster to which it belongs, and can also be used to allocate and manage tasks within the cluster.

[0053] In some embodiments, when at least one second core cluster in the many-core system needs to use data (such as parameters) of one or more second processing cores in the first core cluster, the main processing core of the second core cluster may send a core sharing request to the main processing core of the first core cluster, and the core sharing request may include but is not limited to: identification information and address information corresponding to the second core cluster, information about one or more second processing cores in the first core cluster that need to be shared, etc. In this case, in step S1, the main processing core of the first core cluster receives the core sharing request sent by the main processing core of the second core cluster, wherein the main processing core of the second core cluster is a pre-designated second processing core among at least one second processing core of the second core cluster.

[0054] In some embodiments, see Figure 2 The many-core system includes multiple processing cores, wherein one processing core is pre-designated as a first processing core, and the remaining processing cores are second processing cores. The first processing core is used to receive pending tasks sent from an external host, and to form a core cluster in the many-core system for processing pending tasks, and to schedule and manage pending tasks in the many-core system.

[0055] When the external host or the first processing core needs to establish or assign a common task to multiple core clusters, the external host or the first processing core can select any one of the multiple core clusters as the first core cluster, and the remaining core clusters as the second core cluster. The external host or the first processing core can first send a core sharing request to the main processing core of the first core cluster. The core sharing request may include but is not limited to the common task, identification information corresponding to the second core cluster, address information, etc., so that the main processing core of the first core cluster can form a shared core for processing the common task. In this case, in step S1, the main processing core of the first core cluster receives the core sharing request sent by the external host or the first processing core, and the core sharing request is generated by the external host or the first processing core based on the common task corresponding to the first core cluster and the second core cluster.

[0056] Among them, the common task refers to the task that both the first core cluster and the second core cluster need to perform. For example, the first core cluster needs to perform the fast Fourier transform task (FFT) and the window function filtering task, and the second core cluster needs to perform the fast Fourier transform task (FFT) and the frequency domain multiplication task. The fast Fourier transform task (FFT) is the common task corresponding to the first core cluster and the second core cluster. For example, the common task can be a complex mathematical operation (such as matrix decomposition, FFT, etc.) task in the backbone network of the neural network.

[0057] In some embodiments, in step S2, after receiving a core sharing request from the main processing core of the second core cluster, the main processing core of the first core cluster determines at least one second processing core from at least one second processing core of the first core cluster to which it is located according to the core sharing request, and the determined second processing core serves as a shared core, and at least one shared core constitutes a shared core array. Among them, the number of shared cores can be specifically determined according to the number of second processing cores requested to be shared by the main processing core of the second core cluster, and the embodiments of the present disclosure are not limited to this. Thereby, cross-cluster services between multiple core clusters are realized, the needs of multiple core clusters to share some processing cores' data are met, and the control capability of some processing cores (such as the main processing core of the core cluster) in the many-core system and the flexibility of task processing of each cluster are improved.

[0058] In some embodiments, in step S2, after receiving a core sharing request from an external host or a first processing core in a multi-core system, the main processing core of the first core cluster determines at least one second processing core from at least one second processing core of the first core cluster in which it is located according to the core sharing request, and the determined second processing core is used as a shared core, and at least one shared core constitutes a shared core array. The number of shared cores can be specifically determined according to the resource demand required by the public task, and the embodiment of the present disclosure does not limit this, as long as the total remaining resource amount of the formed shared cores can meet (greater than or equal to) the resource demand required by the public task.

[0059] The resource demand required for a public task refers to the amount of resources required to execute the public task, such as computing resources, storage resources, and bandwidth resources. For multiple core clusters that need to process public tasks, shared cores between multiple core clusters are formed to process public tasks, thereby improving task processing efficiency and flexibility, while realizing cross-cluster services between multiple core clusters of the many-core system, and meeting the need for multiple core clusters to share some processing core data.

[0060] In some embodiments, the main processing core of the first core cluster selects an idle second processing core as a shared core. In some embodiments, upon receiving a core sharing request from the main processing core of the second core cluster, if there is no idle second processing core in the first core cluster where the main processing core is located, a core sharing request failure message is returned to the main processing core of the second core cluster. In some embodiments, upon receiving a core sharing request from an external host or the first processing core, if there is no idle second processing core in the first core cluster where the main processing core is located, a core sharing request failure message is returned to the external host or the first processing core.

[0061] In some embodiments, in step S2, after receiving a core sharing request from an external host or a first processing core in a many-core system, the main processing core of the first core cluster determines at least one second processing core from at least one second processing core of the second core cluster according to the core sharing request, and the determined second processing core serves as a shared core between the first core cluster and the second core cluster. In some embodiments, in step S2, after receiving a core sharing request from an external host or a first processing core in a many-core system, the main processing core of the first core cluster determines at least one second processing core from at least one second processing core of the second core cluster according to the core sharing request, if there is no available (idle) second processing core in the first core cluster where the main processing core of the first core cluster is located, and the determined second processing core serves as a shared core between the first core cluster and the second core cluster.

[0062] Specifically, at least one second processing core is determined from at least one second processing core of the second core cluster to serve as a shared core, specifically including: sending a core sharing request to the main processing core of the second core cluster, so that the main processing core of the second core cluster responds to the core sharing request and determines at least one second processing core from at least one second processing core of the core cluster to serve as a shared core.

[0063] It should be noted that in the embodiments of the present disclosure, the "first" and "second" in the first core cluster and the second core cluster are only used to distinguish different core clusters, and do not specifically refer to a certain core cluster. In a many-core system, all core clusters have equal status and can all receive core sharing requests as the first core cluster and execute the core sharing method in response to the core sharing request. Each core cluster in all core clusters can also request core sharing from other core clusters as the second core cluster, and the embodiments of the present disclosure do not limit this.

[0064] In some embodiments, after receiving a core sharing request from an external host or a first processing core in a many-core system, the main processing core of the first core cluster determines at least one second processing core from at least one second processing core of the first core cluster to be used as a shared core, and determines at least one second processing core from at least one second processing core of the second core cluster to be used as a shared core. In other words, a portion of the second processing cores are selected from the first core cluster, and a portion of the second processing cores are selected from the second core cluster to be used as shared cores.

[0065] In some embodiments, after determining the second processing core as a shared core, the main processing core of the first core cluster or the second core cluster further marks the second processing core as shared to facilitate management of the cores in the cluster.

[0066] Figure 3 A flowchart of another core sharing method provided in an embodiment of the present disclosure.

[0067] Reference Figure 3 In order to facilitate management, in some embodiments, after determining the shared core, the core sharing method further includes:

[0068] Step S3: updating the core cluster lists corresponding to the shared cores respectively, wherein the updated core cluster lists include identification information corresponding to the first core cluster and the second core cluster respectively.

[0069] As an example, before sharing, each second processing core in each cluster pre-stores a core cluster list corresponding to the core cluster to which it belongs. The core cluster list includes but is not limited to: identification information corresponding to the core cluster to which the second processing core belongs, and information about each member in the cluster. The information about each member in the cluster includes but is not limited to: identification, address, location, etc. of each member. As an example, after determining the shared core, the main processing core of the first core cluster adds the identification information corresponding to the second core cluster to the core cluster list of each shared core, thereby updating the core cluster list corresponding to each shared core. The updated core cluster list includes identification information corresponding to the first core cluster and the second core cluster, so that the shared core can recognize that the subsequent job belongs to the first core cluster or the second core cluster, and perform corresponding processing.

[0070] In some embodiments, after determining the shared core, the main processing core of the first core cluster also feeds back information about the shared core to the second core cluster, where the information includes but is not limited to the identification and address information of the shared core, so that the processing cores in the second core cluster can access the shared core to obtain the required data, or implement the required services through the shared core.

[0071] In some embodiments, when receiving a core sharing request sent by an external host or a first processing core, if the main processing core of the first core cluster sends the core sharing request to the main processing core of the second core cluster, the main processing core of the second core cluster, after determining the shared core, also feeds back information of the shared core to the first core cluster. The information includes but is not limited to the identification and address information of the shared core, so that the processing cores in the first core cluster can access the shared core to obtain the required data, or implement the required services through the shared core.

[0072] Figure 4 A flowchart of another core sharing method provided in an embodiment of the present disclosure.

[0073] Reference Figure 4 In some embodiments, in order to effectively solve the problem of data writing and writing conflicts between shared cores and different core clusters, after determining the shared core array, the core sharing method further includes:

[0074] Step S4, determine whether there is available storage space in the storage area corresponding to the shared core array, if yes, execute step S5, otherwise execute step S7.

[0075] In some embodiments, after determining that there is available storage space in the storage area corresponding to the shared core array, it is further determined whether the memory capacity of the available storage space is greater than or equal to the preset memory capacity, if so, step S5 is executed, otherwise step S7 is executed. The storage area corresponding to the shared core array is the storage area of ​​all shared cores in the shared core array.

[0076] Step S5: Create a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array.

[0077] It can be understood that creating the first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array is to create the first shared storage area in the available storage space of the shared core array.

[0078] In step S5, in response to determining that there is available storage space in the storage area corresponding to the shared core array, a first shared storage area corresponding to the first core cluster is created in the storage area corresponding to the shared core array. In some embodiments, in response to determining that there is available storage space in the storage area corresponding to the shared core array, and determining that the memory capacity of the available storage space is greater than or equal to the preset memory capacity, a first shared storage area corresponding to the first core cluster is created in the storage area corresponding to the shared core array. The first shared storage area is used to store first task data corresponding to the tasks of the first core cluster.

[0079] Step S6: Create a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, and end the process.

[0080] It can be understood that creating a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array is to create a second shared storage area in the available storage space of the shared core array, wherein the second shared storage area is used to store the second task data of the task corresponding to the second core cluster.

[0081] In some embodiments, after creating a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, it also includes: creating a general shared storage area in the storage area corresponding to the shared core array, and the general shared storage area is used to carry the execution operation process of the tasks corresponding to the first core cluster and the second core cluster respectively.

[0082] Step S7: Determine idle processing cores among the processing cores that do not belong to any core cluster in the many-core system.

[0083] Step S8: Add at least one of the idle processing cores to the first core cluster where the core is located, determine the at least one idle processing core as a shared core, add it to the shared core array, and jump to step S5.

[0084] In step S7, in response to determining that there is no available storage space in the storage area corresponding to the shared core array, an idle processing core among the processing cores that do not belong to any core cluster in the many-core system is determined. In some embodiments, in response to determining that the memory capacity of the available storage space of the shared core array is less than a preset memory capacity, an idle processing core among the processing cores that do not belong to any core cluster in the many-core system is determined.

[0085] In some embodiments, in step S7, the main processing core of the first core cluster may monitor or obtain the status of each processing core in the many-core system, so as to determine all currently available processing cores in the many-core system, ie, idle processing cores.

[0086] In some embodiments, in step S8, adding at least one idle processing core to the first core cluster where itself is located may further include: creating an identifier of the idle processing core, and adding the identifier, address, location and other information of the idle processing core to the core cluster list corresponding to the first core cluster where itself is located, so as to update the core cluster list corresponding to the first core cluster where itself is located, and at the same time sending the core cluster list corresponding to the first core cluster where itself is located to the idle processing core for storage.

[0087] In some embodiments, after receiving the core sharing request, if there is no idle second processing core in the first core cluster where the processor is located, the process may further jump to step S7.

[0088] In some embodiments, the determined shared core array includes a shared core. In steps S5 and S6, a first shared storage area corresponding to the first core cluster is created from the storage area of ​​the shared core, and a second shared storage area corresponding to the second core cluster is created. At the same time, a general shared storage area for the computing process of the task can also be created.

[0089] In some embodiments, the determined shared core array includes multiple shared cores, wherein the first shared storage area corresponding to the first core cluster may correspond to one or more shared cores in the array, that is, the first shared storage area corresponding to the first core cluster includes the storage area of ​​one or more shared cores; similarly, the second shared storage area corresponding to the second core cluster may also correspond to one or more shared cores in the array, that is, the second shared storage area corresponding to the second core cluster includes the storage area of ​​one or more shared cores; similarly, the universal shared storage area may also correspond to one or more shared cores, that is, the universal shared storage area includes the storage area of ​​one or more shared cores. Different areas correspond to different shared cores.

[0090] In other words, when the shared core array includes multiple shared cores, the multiple shared cores can be divided into different areas, one area corresponds to the first core cluster, used to store first task data corresponding to the tasks of the first core cluster, one area corresponds to the second core cluster, used to store second task data corresponding to the tasks of the second core cluster, and another area serves as a computing path area common to the first core cluster and the second core cluster, used to carry the execution operation process of the tasks corresponding to the first core cluster and the second core cluster respectively.

[0091] Figure 5 FIG. 1 is a schematic diagram of a shared core array in an embodiment of the present disclosure, see Figure 5In some embodiments, the shared core array includes multiple shared cores, and the storage area corresponding to the shared core array includes a first shared storage area M1 corresponding to the first core cluster, a second shared storage area M2 corresponding to the second core cluster, and a general shared storage area M0. The first shared storage area, the second shared storage area, and the general shared storage area may correspond to one or more shared cores, respectively. Among them, the shared core corresponding to the first shared storage area M1 may be configured to store the first task data corresponding to the task of the first core cluster, including the first input data, the first output data, and the first task configuration information; the shared core corresponding to the second shared storage area M2 may be configured to store the second task data corresponding to the task of the second core cluster, including the second input data, the second output data, and the second task configuration information; the shared core corresponding to the general shared storage area M0 may be configured to receive and execute the tasks corresponding to the first core cluster and the second core cluster, respectively, that is, to carry the computing process of the tasks of the first core cluster and the second core cluster.

[0092] In some embodiments, reference Figure 5 The first shared storage area M1 may include a first input data area, a first output data area and a first task configuration area. The first input data area is configured to store first input data corresponding to the task of the first core cluster; the first output data area is configured to store first output data corresponding to the task of the first core cluster; the first task configuration area is configured to store first task configuration information corresponding to the task of the first core cluster.

[0093] In some embodiments, the first shared memory area M1 corresponds to multiple shared cores, the first input data area, the first output data area, and the first task configuration area may respectively correspond to one or more shared cores, the shared core corresponding to the first input data area is configured to store the first input data corresponding to the task of the first core cluster, the shared core corresponding to the first output data area is configured to store the first output data corresponding to the task of the first core cluster, and the shared core corresponding to the first task configuration area is configured to store the first task configuration information corresponding to the task of the first core cluster.

[0094] In some embodiments, reference Figure 5 The second shared memory area M2 may include a second input data area, a second output data area, and a second task configuration area. The second input data area is configured to store second input data corresponding to the tasks of the second core cluster; the second output data area is configured to store second output data corresponding to the tasks of the second core cluster; and the second task configuration area is configured to store second task configuration information corresponding to the tasks of the second core cluster.

[0095] In some embodiments, the second shared memory area M2 corresponds to multiple shared cores, the second input data area, the second output data area and the second task configuration area can respectively correspond to one or more shared cores, the shared core corresponding to the second input data area is configured to store the second input data corresponding to the task of the second core cluster, the shared core corresponding to the second output data area is configured to store the second output data corresponding to the task of the second core cluster, and the shared core corresponding to the second task configuration area is configured to store the second task configuration information corresponding to the task of the second core cluster.

[0096] In some embodiments, a task list is configured corresponding to the shared core array, which can be stored in the main processing core of the first core cluster and / or the main processing core of the second core cluster. The shared core array can process tasks according to the order of tasks in the task list. The task list may include but is not limited to: computing tasks, signaling tasks, switching tasks, etc. Among them, computing tasks are, for example, tasks for indicating operations such as calculations and calculations, signaling tasks are, for example, tasks for indicating sending required notifications and requests to the corresponding core cluster, and switching tasks are, for example, tasks for indicating operations such as buffer reset and input and output address switching when the shared core switches from serving one core cluster to serving another core cluster. After the task processing is completed, the corresponding task in the task list will be cleared.

[0097] Figure 6 A block diagram of the composition of a core sharing device provided in an embodiment of the present disclosure.

[0098] Reference Figure 6 The embodiment of the present disclosure provides a core sharing device 300, which is applied to a many-core system. The many-core system includes a plurality of pre-configured core clusters, each core cluster includes at least one second processing core, and the core sharing device 300 includes: a receiving module 301 and a sharing determination module 302.

[0099] The receiving module 301 is used to receive a core sharing request; the sharing determination module 302 is used to determine at least one second processing core from the second processing cores of the first core cluster and / or the predetermined second core cluster according to the core sharing request, as a shared core between the first core cluster and the second core cluster, and at least one shared core constitutes a shared core array. The shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, respectively, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster.

[0100] In some embodiments, the core sharing device 300 also includes an update module (not shown in the figure), which is used to update the core cluster list corresponding to each shared core after the sharing determination module 302 determines the shared core, and the updated core cluster list includes identification information corresponding to the first core cluster and the second core cluster respectively.

[0101] In some embodiments, the core sharing device 300 also includes a shared storage area creation module (not shown in the figure), which is used to: after the shared determination module 302 determines the shared core array, create a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array, and the first shared storage area is used to store the second task data of the task corresponding to the first core cluster; create a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, and the second shared storage area is used to store the second task data corresponding to the task of the second core cluster.

[0102] In some embodiments, the core sharing device 300 also includes a judgment module (not shown in the figure), which is used to judge whether there is available storage space in the storage area corresponding to the shared core array before the shared storage area creation module creates the first shared storage area; the shared storage area creation module is specifically used to execute the step of creating a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array in response to the judgment module judging that there is available storage space in the storage area corresponding to the shared core array.

[0103] In some embodiments, the core sharing device 300 also includes a core expansion module (not shown in the figure), which is used to respond to the judgment module determining that there is no available storage space in the storage area corresponding to the shared core array, and determine the idle processing cores among the processing cores that do not belong to any core cluster in the many-core system; determine at least one idle processing core as a shared core, and add it to the shared core array.

[0104] In addition, the core sharing device 300 provided in the embodiment of the present disclosure is used to implement the above-mentioned core sharing method. For other descriptions of the core sharing device 300, please refer to the description of the above-mentioned core sharing method, which will not be repeated here.

[0105] The embodiment of the present disclosure also provides a processing core, which includes the above-mentioned core sharing device.

[0106] Figure 7 A block diagram of a composition of an electronic device provided in an embodiment of the present disclosure.

[0107] Reference Figure 7An embodiment of the present disclosure provides an electronic device, which includes multiple processing cores 701 and an on-chip network 702, wherein the multiple processing cores 701 are connected to the on-chip network 702, and the on-chip network 702 is used to exchange data between the multiple processing cores and external data.

[0108] One or more instructions are stored in one or more processing cores 701 , and the one or more instructions are executed by one or more processing cores 701 , so that one or more processing cores 701 can execute the above-mentioned core sharing method.

[0109] In addition, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, wherein the computer program implements the above-mentioned core sharing method when executed by a processing core.

[0110] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description 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 performed by several physical components in cooperation. Some 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 implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic 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, it is well known to those of ordinary skill in the art that communication media typically contain 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 may include any information delivery media.

[0111] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A core sharing method based on a many-core system, wherein the many-core system comprises a first processing core and a plurality of pre-configured core clusters, each of the core clusters comprises at least one second processing core, the first processing core is a pre-designated processing core in the many-core system, and the second processing core is a processing core other than the first processing core in the many-core system, wherein the method include: receiving a core sharing request; According to the core sharing request, at least one second processing core is determined from the second processing cores of the first core cluster where the first core cluster is located and / or the second core cluster that is predetermined to serve as a shared core between the first core cluster and the second core cluster, and the at least one shared core constitutes a shared core array; The shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster.

2. The core sharing method according to claim 1, wherein the receiving core sharing request, include: A core sharing request is received from an external host or a first processing core, where the core sharing request is generated by the external host or the first processing core based on a common task corresponding to the first core cluster and the second core cluster.

3. The core sharing method according to claim 1, wherein the receiving core sharing request, include: A core sharing request is received from a main processing core of the second core cluster, where the main processing core of the second core cluster is a pre-designated second processing core among the at least one second processing core of the second core cluster.

4. The core sharing method according to claim 1, wherein after determining the shared core, include: The core cluster lists respectively corresponding to the shared cores are updated, and the updated core cluster lists include identification information respectively corresponding to the first core cluster and the second core cluster.

5. The core sharing method according to claim 1, wherein after determining the shared core array, the core sharing method further include: Creating a first shared storage area corresponding to the first core cluster in a storage area corresponding to the shared core array, wherein the first shared storage area is used to store first task data of a task corresponding to the first core cluster; A second shared storage area corresponding to the second core cluster is created in a storage area corresponding to the shared core array, and the second shared storage area is used to store second task data of the task corresponding to the second core cluster.

6. The core sharing method according to claim 5, wherein before creating a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array, include: Determining whether there is available storage space in the storage area corresponding to the shared core array; In response to determining that there is available storage space in the storage area corresponding to the shared core array, a step of creating a first shared storage area corresponding to the first core cluster in the storage area corresponding to the shared core array is performed.

7. The core sharing method according to claim 6, wherein after determining whether there is available storage space in the storage area corresponding to the shared core array, further include: In response to determining that there is no available storage space in the storage area corresponding to the shared core array, determining an idle processing core among the processing cores that do not belong to any core cluster in the many-core system; At least one of the idle processing cores is determined as the shared core and added to the shared core array.

8. The core sharing method according to any one of claims 5 to 7, wherein the number of the shared cores is multiple, the storage area corresponding to the shared core array further includes a general shared storage area, and the first shared storage area, the second shared storage area and the general shared storage area correspond to one or more shared cores respectively; in, The shared core corresponding to the first shared storage area is configured to store first task data corresponding to the task of the first core cluster; The shared core corresponding to the second shared storage area is configured to store second task data corresponding to the tasks of the second core cluster; The shared core corresponding to the universal shared memory area is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively.

9. The core sharing method according to claim 8, wherein the first task data includes first input data, first output data and first task configuration information, and the first shared storage area includes a first input data area, a first output data area and a first task configuration area; in, The shared core in the first input data area is configured to store first input data corresponding to the task of the first core cluster; The shared core in the first output data area is configured to store first output data corresponding to the task of the first core cluster; The shared core in the first task configuration area is configured to store first task configuration information corresponding to the tasks of the first core cluster.

10. The core sharing method according to claim 8, wherein the second task data includes second input data, second output data and second task configuration information, and the second shared storage area includes a second input data area, a second output data area and a second task configuration area; in, The shared core in the second input data area is configured to store second input data corresponding to the tasks of the second core cluster; The shared core in the second output data area is configured to store second output data corresponding to the tasks of the second core cluster; The shared core in the second task configuration area is configured to store second task configuration information corresponding to the tasks of the second core cluster.

11. A core sharing device, the core sharing device is applied to a many-core system, the many-core system includes a first processing core and a plurality of pre-configured core clusters, each core cluster includes at least one second processing core, the first processing core is a pre-designated processing core in the many-core system, and the second processing core is a processing core other than the first processing core in the many-core system, the core sharing device include: A receiving module, used for receiving a core sharing request; a sharing determination module, configured to determine, according to the core sharing request, at least one second processing core from the second processing cores of the first core cluster where the core is located and / or the predetermined second core cluster, to serve as a shared core between the first core cluster and the second core cluster, wherein the at least one shared core constitutes a shared core array; The shared core array is configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively, store first task data corresponding to the tasks of the first core cluster, and store second task data corresponding to the tasks of the second core cluster.

12. A processing core comprising the core sharing device according to claim 11.

13. An electronic device, include: Multiple processing cores; as well as An on-chip network configured to exchange data between the plurality of processing cores and external data; One or more instructions are stored in one or more of the processing cores, and the one or more instructions are executed by one or more of the processing cores, so that the one or more of the processing cores can execute the core sharing method according to any one of claims 1 to 10.

14. A computer readable medium having a computer program stored thereon, in, When the computer program is executed by a processing core, the computer program implements the core sharing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Cache consistency protocol-free distributed sharing on-chip storage framework

    CN105183662A

  • Processor of shared storage data, and chip

    CN105988970A