CN114546493A - Core sharing method and device, processing core, electronic device and medium - Google Patents

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

Info

Publication number
CN114546493A
CN114546493A CN202011330876.4A CN202011330876A CN114546493A CN 114546493 A CN114546493 A CN 114546493A CN 202011330876 A CN202011330876 A CN 202011330876A CN 114546493 A CN114546493 A CN 114546493A
Authority
CN
China
Prior art keywords
core
cluster
shared
processing
task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011330876.4A
Other languages
Chinese (zh)
Inventor
吴臻志
祝夭龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Lynxi Technology Co Ltd
Original Assignee
Beijing Lynxi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Lynxi Technology Co Ltd filed Critical Beijing Lynxi Technology Co Ltd
Priority to CN202011330876.4A priority Critical patent/CN114546493A/en
Priority to PCT/CN2021/132357 priority patent/WO2022111456A1/en
Publication of CN114546493A publication Critical patent/CN114546493A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3877Concurrent instruction execution, e.g. pipeline or look ahead using a slave processor, e.g. coprocessor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present disclosure provides a many-core system-based core sharing method, wherein the many-core system comprises a plurality of pre-configured core clusters, each core cluster comprises at least one second processing core, and the method comprises the following steps: receiving a core sharing request; determining at least one second processing core from a first core cluster in which the second processing core is located and/or second processing cores of a predetermined second core cluster according to the core sharing request, wherein the second processing core is used as a sharing core between the first core cluster and the second core cluster, and the at least one sharing core forms a sharing 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. The disclosure also provides a core sharing device, a processing core, an electronic device and a computer readable medium.

Description

Core sharing method and device, processing core, electronic device and medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a core sharing method and apparatus, a processing core, an electronic device, and a computer-readable medium based on a many-core system.
Background
With the development of artificial intelligence technology, the demand for data processing speed is increasing, so that the application of many-core systems is wider and wider. Many-core systems usually have many cores (also called processing cores), the core is the smallest computing unit that can be independently scheduled and has complete computing power in many-core systems, and the core has certain resources such as storage, computation, and the like. The cores of the many-core system can respectively and independently run program instructions, and the running speed of the program can be increased and the multitask capability can be provided by utilizing the parallel computing capability.
Disclosure of Invention
The disclosure provides a many-core system-based core sharing method and device, a processing core, electronic equipment and a computer readable medium.
In a first aspect, the present disclosure provides a core sharing method based on a many-core system, where the many-core system includes a plurality of pre-configured core clusters, each of the core clusters includes at least one second processing core, and the method includes: receiving a core sharing request; determining at least one second processing core from a first core cluster in which the second processing core is located and/or second processing cores of a predetermined second core cluster according to the core sharing request, wherein the second processing core is used as a sharing core between the first core cluster and the second core cluster, and the at least one sharing core forms a sharing 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.
In some embodiments, the many-core system further comprises a first processing core, the receiving a core sharing request comprising: receiving a core sharing request sent by 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.
In some embodiments, the receiving a core sharing request includes: and receiving a core sharing request sent by a main processing core of the second core cluster, wherein the main processing core of the second core cluster is a second processing core pre-designated in at least one second processing core of the second core cluster.
In some embodiments, after determining the shared core, the method further comprises: and updating a core cluster list corresponding to each shared core, wherein the updated core cluster list comprises identification information corresponding to the first core cluster and the second core cluster respectively.
In some embodiments, after determining the shared core array, the core sharing method further comprises:
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 for storing first task data of a task corresponding to the first core cluster;
and creating a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, wherein the second shared storage area is used for storing second task data of a task corresponding to the second core cluster.
In some embodiments, before creating the first shared memory region corresponding to the first core cluster in the memory region corresponding to the shared core array, the method further includes:
judging whether an available storage space exists in a storage area corresponding to the shared core array;
and in response to determining that an available storage space exists in the storage area corresponding to the shared core array, performing 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.
In some embodiments, after determining whether there is an available storage space in the storage area corresponding to the shared core array, the method further includes:
determining idle processing cores in the processing cores which do not belong to any core cluster in the many-core system in response to judging that no available storage space exists in the storage area corresponding to the shared core array;
and determining at least one idle processing core as the shared core, and adding the idle processing core into the shared core array.
In some embodiments, the number of the shared cores is multiple, the storage areas corresponding to the shared core array further include a common shared storage area, and the first shared storage area, the second shared storage area, and the common shared storage area respectively correspond to one or more shared cores;
wherein the shared core corresponding to the first shared storage area is configured to be used for storing 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 task of the second core cluster;
the shared cores corresponding to the common shared storage area are configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively.
In some embodiments, the first task data includes first input data, first output data, and first task configuration information, the first shared storage area includes a first input data area, a first output data area, and a first task configuration area;
wherein the shared core in the first input data area is configured to store first input data corresponding to a task of the first core cluster; the shared core in the first output data area is configured to store first output data corresponding to a 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 a task of the first core cluster.
In some embodiments, the second task data includes second input data, second output data, and second task configuration information, the second shared storage area includes a second input data area, a second output data area, and a second task configuration area;
wherein the shared core in the second input data area is configured to store second input data corresponding to a task of the second core cluster; the shared core in the second output data area is configured to store second output data corresponding to the task 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 task of the second core cluster.
In a second aspect, the present disclosure provides a core sharing apparatus applied to a many-core system including a plurality of pre-configured core clusters, each core cluster including at least one second processing core, the core sharing apparatus including: a receiving module, configured to receive a core sharing request; the sharing determining module is used for determining at least one second processing core from a first core cluster in which the sharing determining module is located and/or a second processing core of a predetermined second core cluster according to the core sharing request, wherein the second processing core is used as a sharing core between the first core cluster and the second core cluster, and the sharing core array is formed by the at least one sharing core; 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.
In a third aspect, the present disclosure provides a processing core comprising the above core sharing apparatus.
In a fourth aspect, the present disclosure provides an electronic device comprising: a plurality of processing cores; and a network on chip configured to interact data among 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 the one or more processing cores to enable the one or more processing cores to execute the core sharing method.
In a fifth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processing core, implements the core sharing method described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the principles of the disclosure and not to limit the disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing in detail exemplary embodiments thereof with reference to the attached drawings, in which:
fig. 1 is a flowchart of a core sharing method based on a many-core system according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a many-core system according to an embodiment of the present disclosure;
fig. 3 is a flowchart of another core sharing method provided by the embodiment of the present disclosure;
fig. 4 is a flowchart of another core sharing method provided by the embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a shared core array according to an embodiment of the present disclosure;
fig. 6 is a block diagram illustrating a core sharing apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
To facilitate a better understanding of the technical aspects of the present disclosure, exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, wherein various details of the embodiments of the present disclosure are included to facilitate an understanding, and they should be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising … …, when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In an embodiment of the disclosure, 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 for executing a corresponding computing task. During the execution of the corresponding tasks by the core clusters, there may be data, parameters (e.g., weights) of some processing cores that are needed by multiple core clusters at the same time. For example, in a deep learning network, for a processing core corresponding to a backbone network and a processing core corresponding to a branch network, the processing cores corresponding to the branch network need to perform prediction processing using data of the processing cores corresponding to the backbone network. When the processing cores corresponding to the branch network and the backbone network are respectively located in different core clusters, how to effectively implement the inter-cluster service between the core clusters is a technical problem that needs to be solved urgently in a core cluster scene of a many-core system.
Fig. 1 is a flowchart of a core sharing method based on a many-core system according to an embodiment of the present disclosure.
Referring to fig. 1, an embodiment of the present disclosure provides a core sharing method based on a many-core system, where the many-core system includes a plurality of pre-configured core clusters, each core cluster includes at least one second processing core, the method may be performed by a core sharing apparatus, the apparatus may be implemented by software and/or hardware, and the core sharing method includes:
and step S1, receiving a core sharing request.
Step S2, according to the core sharing request, determining at least one second processing core from the first core cluster in which the second processing core is located and/or second processing cores of a predetermined second core cluster, where the at least one second processing core is used as a shared core between the first core cluster and the second core cluster, and the at least one shared core forms 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. The first task data comprises first input data, first output data and first task configuration information, and the second task data comprises second input data, second output data and second task configuration data.
The input data may be, for example, data required for executing the task, the output data may be, for example, a result of executing the task, and the task configuration information is configuration required for executing the task, and may be, for example, information such as memory configuration, routing configuration, operation sequence configuration, operation time configuration, and operation operator configuration.
In this embodiment, the first core cluster is any one of a plurality of core clusters of the many-core system, the second core cluster is any one of the core clusters except the first core cluster in the many-core system, and the number of the second core clusters may be one or more.
In the core sharing method based on the many-core system provided by the embodiment of the disclosure, in a service scenario where the many-core system includes multiple core clusters, for multiple core clusters with a cross-cluster service requirement, by using any one core cluster or at least one second processing core in the multiple core clusters as a shared core among the multiple core clusters, the multiple core clusters can share data of the shared core (for example, parameters required in a deep learning network, and the like), so that the cross-cluster service among the multiple core clusters of the many-core system is realized, the requirement that the multiple core clusters need to share data of some processing cores is met, the control capability of the processing cores of the many-core system is improved, and the flexibility of the many-core system in task processing is improved.
Fig. 2 is a block diagram of a many-core system according to an embodiment of the disclosure, and in the embodiment of the disclosure, referring to fig. 2, each core cluster has a main processing core, and the main processing core is a second processing core pre-designated in at least one second processing core of the core cluster. The core sharing method of the embodiment of the disclosure may be applied to a main processing core of any core cluster in a many-core system, that is, the core sharing method of the embodiment of the disclosure is implemented based on the main processing core of any core cluster, and the main processing core may be used to process a task corresponding to the core cluster where the main processing core is located, and may also be used to perform task allocation and management in the cluster.
In some embodiments, when at least one second core cluster in the many-core system needs to use data (e.g., parameters) of one or more second processing cores in the first core cluster, then 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, where the core sharing request may include, but is not limited to: identification information and address information corresponding to the second core cluster, information of one or more second processing cores in the first core cluster to be shared, and the like. In this case, in step S1, the primary processing core of the first core cluster receives the core sharing request sent by the primary processing core of the second core cluster, where the primary processing core of the second core cluster is a second processing core pre-designated in at least one second processing core of the second core cluster.
In some embodiments, referring to fig. 2, the many-core system includes a plurality of processing cores, where one processing core is designated as a first processing core in advance, and the other processing cores are second processing cores, the first processing core is configured to receive a to-be-processed task sent from an external host, and build a core cluster for processing the to-be-processed task in the many-core system, and the to-be-processed task is scheduled and managed in the many-core system.
When an external host or a first processing core needs to establish or allocate a common task to a plurality of core clusters, the external host or the first processing core may select any one of the plurality of core clusters as a first core cluster, and the remaining core clusters as second core clusters, the external host or the first processing core may first send a core sharing request to a main processing core of the first core cluster, where the core sharing request may include, but is not limited to, the common task, identification information and address information corresponding to the second core cluster, so that the main processing core of the first core cluster establishes a shared core for processing the common task. In this case, in step S1, the main processing core of the first core cluster receives a core sharing request sent by the external host or the first processing core, where 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.
The common task refers to a task that both the first core cluster and the second core cluster need to execute, for example, the first core cluster needs to execute a fast fourier transform task (FFT) and a window function filtering task, and the second core cluster needs to execute a fast fourier transform task (FFT) and a frequency domain multiplication task, so that 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 may be a complex mathematical operation (such as matrix decomposition, FFT, etc.) task in a backbone network of a neural network.
In some embodiments, in step S2, after receiving the core sharing request from the primary processing core of the second core cluster, the primary 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 the primary processing core of the first core cluster is located according to the core sharing request, where the determined second processing core serves as a sharing core, and the at least one sharing core constitutes a sharing core array. The number of shared cores may 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, which is not limited in this disclosure. Therefore, the cluster-crossing service among a plurality of core clusters is realized, the requirement that a plurality of core clusters need to share data of some processing cores is met, and the control capability of part of 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.
In some embodiments, in step S2, after receiving the core sharing request from the external host or the first processing core in the many-core system, the main processing core of the first core cluster determines at least one second processing core from among at least one second processing core of the first core cluster in which the main processing core is located according to the core sharing request, where the determined second processing core serves as a shared core, and the at least one shared core constitutes a shared core array. The number of the shared cores may be specifically determined according to the resource demand required by the common task, which is not limited in this embodiment of the disclosure as long as the total remaining resource amount of the constructed shared cores can meet (is greater than or equal to) the resource demand required by the common task.
The resource demand required by the common task refers to the amount of resources required when the common task is executed, and the resources may be, for example, computing resources, storage resources, and bandwidth resources. For a plurality of core clusters needing to process common tasks, shared cores among the plurality of core clusters are established for processing the common tasks, so that the processing efficiency and flexibility of the tasks are improved, cross-cluster services among the plurality of core clusters of a many-core system are realized, and the requirement that the plurality of core clusters need to share data of some processing cores is met.
In some embodiments, the primary processing core of the first core cluster selects the idle second processing core as the shared core. In some embodiments, in a case where a core sharing request of a primary processing core of a second core cluster is received, if there is no idle second processing core in a first core cluster in which the second core cluster is located, a core sharing request failure message is returned to the primary processing core of the second core cluster. In some embodiments, in a case where a core sharing request of an external host or a first processing core is received, if there is no idle second processing core in a first core cluster in which the core sharing request of the external host or the first processing core is located, a core sharing request failure message is returned to the external host or the first processing core.
In some embodiments, in step S2, after receiving the core sharing request from the first processing core in the external host or the many-core system, the main processing core of the first core cluster determines at least one second processing core from among 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 the core sharing request from the first processing core in the external host or the many-core system, according to the core sharing request, if there is no available (idle) second processing core in the first core cluster in which the main processing core of the first core cluster is located, the main processing core of the first core cluster determines at least one second processing core from among at least one second processing core of the second core cluster, and the determined second processing core serves as a shared core between the first core cluster and the second core cluster.
Specifically, determining at least one second processing core from among at least one second processing core of the second core cluster to serve as the shared core specifically includes: and 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 determines at least one second processing core from at least one second processing core of the core cluster where the main processing core of the second core cluster is located in response to the core sharing request, and the at least one second processing core is used as a sharing core.
It should be noted that, in the embodiment of the present disclosure, the "first" and the "second" in the first core cluster and the second core cluster are only used to distinguish different core clusters, and do not refer to a certain core cluster in particular, in a many-core system, all the core clusters have equal positions, and can be used as the first core cluster to receive a core sharing request, and execute a core sharing method in response to the core sharing request, and each core cluster in all the core clusters can also be used as the second core cluster to request core sharing from other core clusters.
In some embodiments, after receiving a core sharing request from a first processing core in an external host or a many-core system, a main processing core of a first core cluster determines at least one second processing core from at least one second processing core of the first core cluster where the main processing core is located as a shared core according to the core sharing request, and determines at least one second processing core from the at least one second processing core of the second core cluster as a shared core. In other words, a portion of the second processing cores from the first core cluster is screened, and a portion of the second processing cores from the second core cluster is screened, collectively as a shared core.
In some embodiments, after determining the second processing core as the shared core, the primary processing core of the first core cluster or the second core cluster further marks the second processing core to mark the second processing core as shared for managing cores in the cluster.
Fig. 3 is a flowchart of another core sharing method according to an embodiment of the present disclosure.
Referring to fig. 3, for convenience of management, in some embodiments, after determining the shared core, the core sharing method further includes:
step S3, updating core cluster lists corresponding to the shared cores, where the updated core cluster lists include identification information corresponding to the first core cluster and the second core cluster, respectively.
As an example, before sharing, each second processing core in each cluster pre-stores a core cluster list corresponding to the core cluster in which each second processing core is located, where the core cluster list includes, but is not limited to: identification information corresponding to a core cluster where the second processing core is located, and information of each member in the cluster, where the information of each member in the cluster includes but is not limited to: identification, address, location, etc. of each member. As an example, after the shared core is determined by the main processing core of the first core cluster, the identification information corresponding to the second core cluster is added to the core cluster list of each shared core, so as to update the core cluster list corresponding to each shared core, where the updated core cluster list includes the identification information corresponding to each of the first core cluster and the second core cluster, so that the shared core can identify that the subsequent job belongs to the first core cluster or the second core cluster, and perform corresponding processing.
In some embodiments, after determining the shared core, the primary processing core of the first core cluster further feeds back information of the shared core, including but not limited to an identifier of the shared core, address information, and the like, to the second core cluster, so that the processing cores in the second core cluster can access the shared core to obtain required data, or to perform required services through the shared core, and the like.
In some embodiments, in a case of receiving a core sharing request sent by an external host or a first processing core, if a main processing core of a first core cluster sends the core sharing request to a main processing core of a second core cluster, after determining a shared core, the main processing core of the second core cluster further feeds back information of the shared core to the first core cluster, where the information includes, but is not limited to, an identifier of the shared core, address information, and the like, so that processing cores in the first core cluster can access the shared core to obtain required data, or find required traffic through the shared core, and the like.
Fig. 4 is a flowchart of another core sharing method according to an embodiment of the present disclosure.
Referring to fig. 4, in some embodiments, to effectively solve the problem that a shared core conflicts in writing data to different core clusters, after determining the shared core array, the core sharing method further includes:
and step S4, judging whether an available storage space exists in the storage area corresponding to the shared core array, if so, executing step S5, otherwise, executing step S7.
In some embodiments, after determining that the available storage space exists in the storage area corresponding to the shared core array, it may further determine whether the memory capacity of the available storage space is greater than or equal to a preset memory capacity, if so, perform step S5, otherwise, perform step S7. The storage area corresponding to the shared core array is the storage area of all shared cores in the shared core array.
Step S5, a first shared memory area corresponding to the first core cluster is created in the memory area corresponding to the shared core array.
It is to be understood that the first shared memory area corresponding to the first core cluster is created in the memory area corresponding to the shared core array, that is, the first shared memory area is created in the available memory space of the shared core array.
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 an available storage space exists 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 a 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 for storing first task data corresponding to tasks of the first core cluster.
Step S6, a second shared memory area corresponding to the second core cluster is created in the memory area corresponding to the shared core array, and the flow ends.
It is understood that a second shared memory region corresponding to the second core cluster is created in the memory region corresponding to the shared core array, i.e., a second shared memory region is created in the available memory space of the shared core array. The second shared storage area is used for storing second task data of a task corresponding to the second core cluster.
In some embodiments, after creating the second shared memory region corresponding to the second core cluster in the memory region corresponding to the shared core array, the method further comprises: and creating a general shared storage area in the storage area corresponding to the shared core array, wherein the general shared storage area is used for bearing the execution operation process of the tasks corresponding to the first core cluster and the second core cluster respectively.
And step S7, determining idle processing cores in the processing cores which do not belong to any core cluster in the many-core system.
Step S8, adding at least one idle processing core to the first core cluster where the idle processing core is located, determining the at least one idle processing core as a shared core, adding the shared core array, and going to step S5.
In step S7, in response to determining that there is no available storage space in the storage area corresponding to the shared core array, a spare processing core among the processing cores in the many-core system that do not belong to any core cluster 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 the predetermined memory capacity, a spare processing core of the processing cores of the many-core system that is not owned by any core cluster is determined.
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 that all processing cores currently available in the many-core system, i.e., idle processing cores, may be determined.
In some embodiments, in step S8, adding at least one idle processing core to the first core cluster in which the processing core is located may further include: and creating an identifier of the idle processing core, adding information such as the identifier, address and position of the idle processing core to a core cluster list corresponding to the first core cluster in which the idle processing core is located so as to update the core cluster list corresponding to the first core cluster in which the idle processing core is located, and sending the core cluster list corresponding to the first core cluster in which the idle processing core is located to the idle processing core for storage.
In some embodiments, after receiving the core sharing request, if there is no idle second processing core in the first core cluster where the core sharing request is located, the process may further jump to step S7.
In some embodiments, if 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 a storage area of the shared core, a second shared storage area corresponding to the second core cluster is created, and a common shared storage area for carrying an operation process of a task may be created.
In some embodiments, the determined shared core array includes a plurality of shared cores, where a first shared storage area corresponding to a 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 storage areas of the 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 storage areas of one or more shared cores; similarly, the common shared memory area may also correspond to one or more shared cores, that is, the common shared memory area includes memory areas of one or more shared cores. Wherein, the sharing cores corresponding to different areas are different.
In other words, in a case that the shared core array includes a plurality of shared cores, the plurality of shared cores may be divided into different areas, where one area corresponds to the first core cluster and is used to store first task data corresponding to a task of the first core cluster, one area corresponds to the second core cluster and is used to store second task data corresponding to a task of the second core cluster, and another area serves as a calculation path area commonly used by the first core cluster and the second core cluster and is used to carry execution operation processes of tasks corresponding to the first core cluster and the second core cluster, respectively.
Fig. 5 is a schematic structural diagram of a shared core array in an embodiment of the present disclosure, referring to fig. 5, in some embodiments, the shared core array includes a plurality of shared cores, the shared core array corresponding storage area includes a first shared storage area M1 corresponding to a first core cluster, a second shared storage area M2 corresponding to a second core cluster, and a common shared storage area M0, and the first shared storage area, the second shared storage area, and the common shared storage area may respectively correspond to one or more shared cores. The shared core corresponding to the first shared storage area M1 may be configured to store first task data corresponding to a task of the first core cluster, including first input data, first output data, and first task configuration information; the shared core corresponding to the second shared storage area M2 may be configured to store second task data corresponding to a task of the second core cluster, including second input data, second output data, and second task configuration information; the shared core corresponding to the common shared memory area M0 may be configured to receive and execute tasks corresponding to the first core cluster and the second core cluster, that is, to carry an operation procedure of the tasks of the first core cluster and the second core cluster.
In some embodiments, referring to fig. 5, the first shared storage area M1 may include a first input data area configured to store first input data corresponding to a task of the first core cluster, a first output data area, and a first task configuration area; the first output data area is configured to be used for storing first output data corresponding to tasks of the first core cluster; the first task configuration area is configured to store first task configuration information corresponding to tasks of the first core cluster.
In some embodiments, the first shared storage area M1 corresponds to a plurality of shared cores, the first input data area, the first output data area, and the first task configuration area may correspond to one or more shared cores, respectively, the shared core corresponding to the first input data area is configured to store first input data corresponding to a task of the first core cluster, the shared core corresponding to the first output data area is configured to store first output data corresponding to a task of the first core cluster, and the shared core corresponding to the first task configuration area is configured to store first task configuration information corresponding to a task of the first core cluster.
In some embodiments, referring to fig. 5, the second shared memory area M2 may include a second input data area configured to store second input data corresponding to a task of the second core cluster, a second output data area, and a second task configuration area; the second output data area is configured to be used for storing second output data corresponding to the task of the second core cluster; the second task configuration area is configured to store second task configuration information corresponding to tasks of the second core cluster.
In some embodiments, the second shared storage area M2 corresponds to a plurality of shared cores, and the second input data area, the second output data area, and the second task configuration area may correspond to one or more shared cores, respectively, the shared core corresponding to the second input data area is configured to store second input data corresponding to a task of the second core cluster, the shared core corresponding to the second output data area is configured to store second output data corresponding to a task of the second core cluster, and the shared core corresponding to the second task configuration area is configured to store second task configuration information corresponding to a task of the second core cluster.
In some embodiments, the shared core array is correspondingly configured with a task list, the task list may 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 may perform processing of tasks according to a task order in the task list, and the task list may include but is not limited to: a computational task, a signaling task, a switching task, etc. The computation task is, for example, a task for instructing operations such as computation and computation, the signaling task is, for example, a task for instructing to send a required notification, a request, and the like to a corresponding core cluster, and the switching task is, for example, a task for instructing operations such as buffer reset and input/output address switching to be performed when the shared core is switched from serving one core cluster to serving another core cluster. After the task processing is completed, the corresponding task in the task list is cleared.
Fig. 6 is a block diagram illustrating a core sharing apparatus according to an embodiment of the present disclosure.
Referring to fig. 6, an embodiment of the present disclosure provides a core sharing apparatus 300, where the core sharing apparatus 300 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 apparatus 300 includes: a receiving module 301 and a sharing determination module 302.
The receiving module 301 is configured to receive a core sharing request; the sharing determining module 302 is configured to determine, according to the core sharing request, at least one second processing core from second processing cores of a first core cluster and/or a predetermined second core cluster in which the sharing determining module is located, where the at least one second processing core is used as a sharing core between the first core cluster and the second core cluster, and the at least one sharing core forms a sharing 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.
In some embodiments, the core sharing apparatus 300 further includes an updating module (not shown in the figure), and the updating module is configured to update a core cluster list corresponding to each shared core after the shared core is determined by the shared determining module 302, where the updated core cluster list includes identification information corresponding to each of the first core cluster and the second core cluster.
In some embodiments, the core sharing apparatus 300 further includes a shared memory creation module (not shown in the figure) configured to: after the shared core array is determined by the shared determining module 302, a first shared storage area corresponding to the first core cluster is created in a storage area corresponding to the shared core array, where the first shared storage area is used to store second task data of a task corresponding to the first core cluster; and creating a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, wherein the second shared storage area is used for storing second task data corresponding to the task of the second core cluster.
In some embodiments, the core sharing apparatus 300 further includes a determining module (not shown in the figure), configured to determine whether there is an available storage space in the storage area corresponding to the shared core array before the shared storage area creating module creates the first shared storage area; the shared storage area creating module is specifically configured to execute 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 in response to the determining module determining that the available storage space exists in the storage area corresponding to the shared core array.
In some embodiments, the core sharing apparatus 300 further includes a core expansion module (not shown in the figure), which is configured to determine, in response to the determination module determining that there is no available storage space in the storage area corresponding to the shared core array, a processing core that is idle in a processing core that is not in any core cluster in the many-core system; and determining at least one idle processing core as a shared core, and adding the processing core into the shared core array.
In addition, the core sharing device 300 provided in the embodiment of the present disclosure is configured to implement the above-mentioned core sharing method, and other descriptions of the core sharing device 300 may refer to the descriptions in the above-mentioned core sharing method, which are not described herein again.
The embodiment of the disclosure also provides a processing core, which includes the above core sharing device.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Referring to fig. 7, an electronic device according to an embodiment of the present disclosure includes a plurality of processing cores 701 and a network on chip 702, where the plurality of processing cores 701 are all connected to the network on chip 702, and the network on chip 702 is configured to interact data between the plurality of processing cores and external data.
One or more instructions are stored in the one or more processing cores 701, and the one or more instructions are executed by the one or more processing cores 701, so that the one or more processing cores 701 can execute the core sharing method.
Furthermore, the embodiment of the disclosure also provides a computer readable medium, on which a computer program is stored, wherein the computer program realizes the above core sharing method when being executed by the processing core.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is 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 tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, 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, unless expressly stated otherwise, as would be apparent to one skilled in the art. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the disclosure as set forth in the appended claims.

Claims (14)

1. A method of core sharing based on a many-core system, the many-core system comprising a plurality of pre-configured core clusters, each of the core clusters comprising at least one second processing core, the method comprising:
receiving a core sharing request;
determining at least one second processing core from a first core cluster in which the second processing core is located and/or second processing cores of a predetermined second core cluster according to the core sharing request, wherein the second processing core is used as a sharing core between the first core cluster and the second core cluster, and the at least one sharing core forms a sharing 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 of claim 1, wherein the many-core system further comprises a first processing core, the receiving a core sharing request comprising:
receiving a core sharing request sent by 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 of claim 1, wherein the receiving a core sharing request comprises: and receiving a core sharing request sent by a main processing core of the second core cluster, wherein the main processing core of the second core cluster is a second processing core pre-designated in 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, further comprising:
and updating a core cluster list corresponding to each shared core, wherein the updated core cluster list comprises identification information corresponding to the first core cluster and the second core cluster respectively.
5. The core sharing method of claim 1, wherein after determining a shared core array, the core sharing method further comprises:
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 for storing first task data of a task corresponding to the first core cluster;
and creating a second shared storage area corresponding to the second core cluster in the storage area corresponding to the shared core array, wherein the second shared storage area is used for storing second task data of a task corresponding to the second core cluster.
6. The core sharing method according to claim 5, wherein before creating the first shared memory area corresponding to the first core cluster in the memory area corresponding to the shared core array, further comprising:
judging whether an available storage space exists in a storage area corresponding to the shared core array;
and in response to determining that an available storage space exists in the storage area corresponding to the shared core array, performing 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.
7. The core sharing method according to claim 6, wherein after determining whether there is an available storage space in the storage area corresponding to the shared core array, the method further comprises:
determining idle processing cores in the processing cores which do not belong to any core cluster in the many-core system in response to judging that no available storage space exists in the storage area corresponding to the shared core array;
and determining at least one idle processing core as the shared core, and adding the idle processing core into 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 areas corresponding to the shared core array further include a common shared storage area, and the first shared storage area, the second shared storage area, and the common shared storage area respectively correspond to one or more shared cores;
wherein the shared core corresponding to the first shared storage area is configured to be used for storing 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 task of the second core cluster;
the shared cores corresponding to the common shared storage area are configured to receive and execute tasks corresponding to the first core cluster and the second core cluster respectively.
9. The core sharing method of claim 8, wherein the first task data includes first input data, first output data, and first task configuration information, the first shared storage area includes a first input data area, a first output data area, and a first task configuration area;
wherein the shared core in the first input data area is configured to store first input data corresponding to a task of the first core cluster; the shared core in the first output data area is configured to store first output data corresponding to a 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 a task of the first core cluster.
10. The core sharing method of claim 8, wherein the second task data includes second input data, second output data, and second task configuration information, the second shared storage area includes a second input data area, a second output data area, and a second task configuration area;
wherein the shared core in the second input data area is configured to store second input data corresponding to a task of the second core cluster; the shared core in the second output data area is configured to store second output data corresponding to the task of the second core cluster; and the shared core in the second task configuration area is configured to store second task configuration information corresponding to the task of the second core cluster.
11. A core sharing apparatus applied to a many-core system including a plurality of pre-configured core clusters, each core cluster including at least one second processing core, the core sharing apparatus comprising:
a receiving module, configured to receive a core sharing request;
the sharing determining module is used for determining at least one second processing core from a first core cluster in which the sharing determining module is located and/or a second processing core of a predetermined second core cluster according to the core sharing request, wherein the second processing core is used as a sharing core between the first core cluster and the second core cluster, and the sharing core array is formed by the at least one sharing core;
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 apparatus of claim 11.
13. An electronic device, comprising:
a plurality of processing cores; and
a network on chip configured to interact data among the plurality of processing cores and external data;
one or more of the processing cores have stored therein one or more instructions that are executed by the one or more processing cores to enable the one or more processing cores to perform the core sharing method of any of claims 1-10.
14. A computer-readable medium, on which a computer program is stored, wherein the computer program, when executed by a processing core, implements the core sharing method of any of claims 1-10.
CN202011330876.4A 2020-11-24 2020-11-24 Core sharing method and device, processing core, electronic device and medium Pending CN114546493A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011330876.4A CN114546493A (en) 2020-11-24 2020-11-24 Core sharing method and device, processing core, electronic device and medium
PCT/CN2021/132357 WO2022111456A1 (en) 2020-11-24 2021-11-23 Core sharing method and apparatus based on many-core system, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011330876.4A CN114546493A (en) 2020-11-24 2020-11-24 Core sharing method and device, processing core, electronic device and medium

Publications (1)

Publication Number Publication Date
CN114546493A true CN114546493A (en) 2022-05-27

Family

ID=81660579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011330876.4A Pending CN114546493A (en) 2020-11-24 2020-11-24 Core sharing method and device, processing core, electronic device and medium

Country Status (2)

Country Link
CN (1) CN114546493A (en)
WO (1) WO2022111456A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472448B (en) * 2023-12-28 2024-03-26 山东省计算中心(国家超级计算济南中心) Parallel acceleration method, device and medium for secondary core cluster of Shenwei many-core processor
CN118642984A (en) * 2024-08-14 2024-09-13 山东浪潮科学研究院有限公司 Data sharing method, device, equipment and medium
CN118642984B (en) * 2024-08-14 2024-10-22 山东浪潮科学研究院有限公司 Data sharing method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319610B (en) * 2023-05-23 2023-08-29 南京芯驰半导体科技有限公司 Data transmission method, device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622208B (en) * 2011-01-27 2015-06-10 中兴通讯股份有限公司 Multi-core reconfigurable processor cluster and reconfiguration method thereof
US9424191B2 (en) * 2012-06-29 2016-08-23 Intel Corporation Scalable coherence for multi-core processors
CN105988970B (en) * 2015-02-12 2019-10-01 华为技术有限公司 The processor and chip of shared storing data
US10860487B2 (en) * 2019-04-17 2020-12-08 Chengdu Haiguang Integrated Circuit Design Co. Ltd. Multi-core processing device and method of transferring data between cores thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472448B (en) * 2023-12-28 2024-03-26 山东省计算中心(国家超级计算济南中心) Parallel acceleration method, device and medium for secondary core cluster of Shenwei many-core processor
CN118642984A (en) * 2024-08-14 2024-09-13 山东浪潮科学研究院有限公司 Data sharing method, device, equipment and medium
CN118642984B (en) * 2024-08-14 2024-10-22 山东浪潮科学研究院有限公司 Data sharing method, device, equipment and medium

Also Published As

Publication number Publication date
WO2022111456A1 (en) 2022-06-02

Similar Documents

Publication Publication Date Title
JP5625998B2 (en) Information processing system
US20160203024A1 (en) Apparatus and method for allocating resources of distributed data processing system in consideration of virtualization platform
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
US11526276B2 (en) Upgrade management method and scheduling node, and storage system
CN109802986B (en) Equipment management method, system, device and server
CN111831232A (en) Data storage method and device, storage medium and electronic device
CN113382077B (en) Micro-service scheduling method, micro-service scheduling device, computer equipment and storage medium
CN111338779B (en) Resource allocation method, device, computer equipment and storage medium
CN109508912B (en) Service scheduling method, device, equipment and storage medium
CN114546493A (en) Core sharing method and device, processing core, electronic device and medium
CN111857951A (en) Containerized deployment platform and deployment method
CN112905342A (en) Resource scheduling method, device, equipment and computer readable storage medium
CN111542809A (en) Managing virtual network functions
CN112099728A (en) Method and device for executing write operation and read operation
CN112269661A (en) Partition migration method and device based on Kafka cluster
CN112527490B (en) Node resource management and control method and device, electronic equipment and storage medium
EP4006725A1 (en) Virtual machine migration processing and strategy generation method, apparatus and device, and storage medium
CN117499490A (en) Multi-cluster-based network scheduling method and device
CN108737144B (en) Method and device for resource management
CN115878309A (en) Resource allocation method, device, processing core, equipment and computer readable medium
CN115629853A (en) Task scheduling method and device
CN116361203A (en) Memory allocation method and device, electronic equipment and computer readable medium
CN114020408A (en) Task fragment configuration method and device, equipment and storage medium
CN113190347A (en) Edge cloud system and task management method
US20240061698A1 (en) Managing the assignment of virtual machines to non-uniform memory access nodes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination