Data processing methods, many-core systems, and storage media

By grouping the processing cores of the many-core system and using sub-weight information to process data, the problem of high on-chip network transmission bandwidth requirements is solved, and more efficient data processing is achieved.

CN116560867BActive Publication Date: 2026-05-26LYNXI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
LYNXI TECH CO LTD
Filing Date
2022-01-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

How to reduce the transmission bandwidth requirements of on-chip networks in many-core systems, especially in the process of handling data interaction between cores.

Method used

The many-core system divides multiple processing cores into core groups. Each processing core acquires a portion of the data and processes it using sub-weight information to generate intermediate results. Then, the intermediate results from the same output channel are sent to the same processing core to finally generate the sub-task results, reducing the need for each processing core to acquire all the data.

Benefits of technology

This reduces the amount of data transmission before processing tasks and the bandwidth requirements of the on-chip network, thereby improving data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116560867B_ABST
    Figure CN116560867B_ABST
Patent Text Reader

Abstract

This disclosure provides a data processing method, a many-core system, and a storage medium. In this data processing method, since each processing core that jointly processes a task only processes a portion of the required data (i.e., each processing core does not need to acquire all the data), the amount of data transferred before starting task processing (or the amount of data transferred between processing cores processing adjacent tasks) is reduced, thereby reducing the on-chip network's transmission bandwidth requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method, a many-core system, and a storage medium. Background Technology

[0002] Many-core systems consist of multiple processing cores that can collaborate to complete tasks. This collaboration inevitably involves data exchange between the different processing cores. Therefore, reducing the bandwidth requirements of on-chip networks has long been a technical challenge in this field. Summary of the Invention

[0003] This disclosure provides a data processing method, a many-core system, and a storage medium.

[0004] In a first aspect, embodiments of this disclosure provide a data processing method applied to a many-core system, wherein multiple processing cores of the many-core system are divided into at least one core group, and the core group includes multiple processing cores; the method includes:

[0005] The core group processes at least one task; wherein, the task corresponds to multiple output channels, all the data required to process the task is divided into multiple sub-data, and each output channel has a sub-weight information corresponding to each sub-data;

[0006] The core group processes at least one task, including:

[0007] Each processing core acquires a sub-data; wherein, different processing cores acquire different sub-data, and each processing core has all the sub-weight information corresponding to the sub-data;

[0008] Each processing core processes the sub-data using each of the sub-weight information, and obtains multiple single processing results for multiple output channels corresponding to the sub-data.

[0009] At least some of the processing cores send intermediate results corresponding to the same output channel to the same processing core; wherein the intermediate results are obtained at least based on a single processing result obtained by that processing core;

[0010] At least some of the processing cores obtain subtask results based on intermediate results; wherein the subtask results are obtained based on intermediate results corresponding to the same output channel.

[0011] In some embodiments, each of the processing cores processes the sub-data using each of the sub-weight information to obtain multiple single-processing results of the sub-data corresponding to multiple output channels, including:

[0012] Each processing core processes the sub-data using each of the sub-weight information to obtain all single processing results;

[0013] The at least some of the processing cores send intermediate results with the same output channel to the same processing core, including:

[0014] After each processing core obtains all single processing results, at least some of the processing cores will send the single processing results with the same output channel to the same processing core.

[0015] The at least part of the processing cores obtains subtask results based on intermediate results, including:

[0016] After at least some of the processing cores send the single processing results with the same output channel to the same processing core, at least some of the processing cores obtain the subtask result based on all the single processing results.

[0017] In some embodiments, each processing core corresponds to one output channel; at least some of the processing cores send a single processing result having the same output channel to the same processing core, including:

[0018] Each processing core sends all single processing results, except for the single processing result corresponding to its own output channel, to the processing core with the same output channel.

[0019] In some embodiments, each core group processes at least one task, including:

[0020] Each of the processing cores acquires one sub-data;

[0021] Each processing core processes the sub-data using a corresponding sub-weight information to obtain a single processing result, and uses the single processing result as an intermediate result;

[0022] Each of the processing cores sends the intermediate result to the processing core of the output channel corresponding to the intermediate result;

[0023] Each processing core processes the sub-data using a corresponding sub-weight information to obtain a single processing result; wherein, the sub-weight information is the sub-weight information of the sub-data that the processing core has not processed;

[0024] Each processing core obtains the current intermediate result based on the single processing result and the received intermediate result;

[0025] If each of the processing cores has sub-weight information that has not been processed by the sub-data, then each of the processing cores returns to the processing core that sends the intermediate result to the output channel corresponding to the intermediate result.

[0026] If each processing core does not have sub-weight information for the unprocessed sub-data, then each processing core will use the current intermediate result as the sub-task result.

[0027] In some embodiments, each processing core obtains the current subtask intermediate result based on the single processing result and the received subtask intermediate result, including:

[0028] Each processing core superimposes the single processing result and the received intermediate result of the subtask to obtain the current subtask intermediate result.

[0029] In some embodiments, during the process of each core group processing at least one task, each processing core processes a different output channel, and in the step where each processing core sends the intermediate result to the processing core of the output channel currently corresponding to the intermediate result.

[0030] In some embodiments, the many-core system includes at least one shared storage, and each of the processing cores in the core group can directly access the shared storage;

[0031] The at least some of the processing cores sending intermediate results with the same output channel to the same processing core includes: at least some of the processing cores sending intermediate results with the same output channel to the same processing core through the shared storage.

[0032] In some embodiments, the data processing method is used to process a neural network, where each task is a layer of the neural network.

[0033] In some embodiments, each kernel group processing a task includes processing a reverse task, which includes a deconvolution task or a reverse fully connected task.

[0034] Before each of the said core groups processes the reverse task, the following is also included:

[0035] The kernel group processes forward tasks, which include convolutional tasks or fully connected tasks; wherein, the sub-weight information of the kernel group for processing forward tasks is the same set of sub-weight information as the sub-weight information of the kernel group for processing reverse tasks.

[0036] In some embodiments, the method includes: at least one core group processing multiple tasks, the multiple tasks including a first task and a second task, wherein the first task is an adjacent prior task of the second task;

[0037] When the core group processes the second task, each of the processing cores acquires a sub-data, including:

[0038] Each processing core obtains at least the subtask result obtained by the processing core when processing the first task, and obtains a sub-data for processing the second task based on the subtask result.

[0039] Secondly, embodiments of this disclosure provide a many-core system, which includes:

[0040] Multiple processing cores;

[0041] The plurality of processing cores are used to execute the data processing method provided in the embodiments of this disclosure.

[0042] Thirdly, embodiments of this disclosure provide a storage medium storing a computer program, which is executed by a processor to implement the data processing method provided in embodiments of this disclosure.

[0043] In the data processing method provided in this disclosure, since each processing core that jointly processes a task only processes a portion of the required data (i.e., each processing core does not need to acquire all the data), the amount of data transferred before starting task processing (or the amount of data transferred between processing cores processing adjacent tasks) is reduced, thereby reducing the transmission bandwidth requirements of the on-chip network. This disclosure also provides a many-core system and a storage medium. Attached Figure Description

[0044] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the detailed embodiments to explain the present disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of the detailed embodiments with reference to the accompanying drawings, in which:

[0045] Figure 1 A flowchart of a data processing method provided in an embodiment of this disclosure;

[0046] Figure 2 for Figure 1 Detailed flowchart of step S100;

[0047] Figure 3 A detailed flowchart of another data processing method provided in this embodiment of the disclosure;

[0048] Figure 4 For a type of many-core system application Figure 3 A diagram illustrating how the data processing methods provided in the document handle a task;

[0049] Figure 5 A detailed flowchart of yet another data processing method provided in this disclosure embodiment;

[0050] Figure 6 For a type of many-core system application Figure 5 A diagram illustrating how the data processing methods provided in the document handle a task;

[0051] Figure 7 A schematic diagram of a many-core system that applies the data processing method provided in the embodiments of this disclosure;

[0052] Figure 8 A schematic diagram illustrating the application of another data processing method provided in this disclosure embodiment to process two tasks in another many-core system;

[0053] Figure 9 A schematic diagram of a many-core system provided for embodiments of this disclosure; and

[0054] Figure 10 A schematic diagram of a storage medium provided in an embodiment of this disclosure. Detailed Implementation

[0055] To enable those skilled in the art to better understand the technical solutions of this disclosure, the data processing method, many-core system, and storage medium provided in this disclosure will be described in detail below with reference to the accompanying drawings.

[0056] The present disclosure will be described more fully below with reference to the accompanying drawings; however, the embodiments shown may be embodied in different forms and should not be construed as being limited to the embodiments set forth in this disclosure. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.

[0057] This disclosure may be described with reference to plan and / or cross-sectional views using the ideal schematic diagrams of this disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances.

[0058] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0059] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The term "and / or" as used in this disclosure includes any and all combinations of one or more of the associated enumerated entries. The singular forms "a" and "the" as used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. The terms "comprising," "made of," etc., as used in this disclosure specify the presence of the stated feature, integral, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof.

[0060] Unless otherwise specified, all terms used in this disclosure (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined in this disclosure.

[0061] This disclosure is not limited to the embodiments shown in the accompanying drawings, but includes modifications to the configuration based on the manufacturing process. Therefore, the areas illustrated in the drawings are schematic, and the shapes of the areas shown illustrate specific shapes of areas of an element, but are not intended to be limiting.

[0062] This disclosure provides a data processing method, a many-core system, and a storage medium.

[0063] Firstly, please refer to Figures 1 to 2 This disclosure provides a data processing method applied to a many-core system. The many-core system has multiple processing cores divided into at least one core group, and each core group includes multiple processing cores. The data processing method includes:

[0064] S100, the core group processes a task.

[0065] The task corresponds to multiple output channels, and all the data required to process the task is divided into multiple sub-data. Each output channel has a sub-weight information for each sub-data.

[0066] In other words, processing a task actually involves processing the input data of that task using preset weight information. The input data of each task is divided into multiple sub-data, and each task corresponds to multiple output channels. Each output channel has a sub-weight information corresponding to each sub-data. Therefore, each output channel processes each sub-data using its respective sub-weight information to obtain a partial result of the task (i.e., each output channel should have the output result of all sub-data on that output channel).

[0067] Each core group processes one task (S100), including:

[0068] S101, Each processing core acquires one sub-data.

[0069] Different processing cores acquire different sub-data, and each processing core has all the sub-weight information of the corresponding sub-data.

[0070] In this context, "processing core" refers to the processing core within the core group. Part of this embodiment describes a scenario where a core group processes a single task; therefore, the "processing core" mentioned in this description refers to the processing core within the core group that processes that task.

[0071] Different processing cores correspond to different output channels.

[0072] In some embodiments, each processing core corresponds to at least one output channel. When each processing core corresponds to one output channel, the number of processing cores, the number of output channels, and the number of sub-data are the same. When each processing core corresponds to multiple output channels, the number of output channels corresponding to different processing cores in a core group is the same, so as to balance the computational load of different processing cores in a core group.

[0073] Sub-data refers to the data on which the task is based, i.e., the input data of the task. Therefore, it comes from outside the task, such as input from the outside world, or obtained from the previous task (e.g., from the processing core that processed the previous task).

[0074] S102. Each processing core processes the sub-data using each sub-weight information, and obtains multiple single processing results for multiple output channels corresponding to the sub-data.

[0075] Among them, the single processing result refers to the result obtained by the processing kernel using a sub-weight information to process the sub-data it acquires.

[0076] A processing core corresponds to all the sub-weight information of a sub-data on different output channels. Therefore, by using the processing core to process the sub-data it acquires with each of its corresponding sub-weight information, multiple single processing results of the sub-data on multiple output channels can be obtained.

[0077] S103. At least some processing cores send intermediate results corresponding to the same output channel to the same processing core.

[0078] The intermediate results are obtained at least based on the single processing result obtained by the processing core.

[0079] In this context, "same processing core" in "sent to the same processing core" refers to the processing core that processes the output channel.

[0080] Since each processing core processes a subset of data and obtains multiple single processing results for that subset of data across multiple output channels, the processing core needs to send the single processing results corresponding to different output channels to the processing cores corresponding to different output channels, so that the processing cores corresponding to the output channels can obtain all the single processing results on that output channel.

[0081] In some embodiments, "the intermediate result is obtained at least based on the single processing result obtained by the processing core" means that during the data processing method, the intermediate result is obtained only based on the single processing result obtained by the processing core (or the intermediate result is the single processing result).

[0082] In some embodiments, "the intermediate result is obtained at least based on a single processing result obtained by the processing core" means that the intermediate result is obtained based on multiple single processing results obtained by different processing cores. For example, it can be obtained by processing multiple single processing results; that is, the intermediate result can be the result obtained by processing multiple single processing results. Alternatively, the intermediate result may not process multiple single processing results, but simply treat the multiple single processing results as a set; that is, the intermediate result can also be a set including multiple single processing results.

[0083] In some embodiments, "the intermediate result is obtained at least based on the single processing result obtained by the processing core" means that the intermediate result is obtained based on the single processing result obtained by the processing core and the previously obtained intermediate results.

[0084] S104. At least some of the processing kernels obtain the subtask results based on the intermediate results.

[0085] The results of subtasks are obtained from the intermediate results of the same output channel.

[0086] This means that each processing core in the core group can have one output channel, or some processing cores in the core group can have output channels while others cannot. Therefore, as long as the processing core with an output channel can obtain the subtask result provided by that output, it is acceptable.

[0087] It should be understood that the above steps may occur in a different order than those indicated. As long as the above steps are completed during the processing of a task, they fall within the protection scope of this disclosure.

[0088] In the data processing method provided in this disclosure, since each processing core that processes a task together only processes a portion of the required data (i.e., each processing core does not need to acquire all the data), the amount of data transmitted before starting to process the task (or the amount of data transmitted between processing cores that process adjacent tasks) is reduced, thereby reducing the transmission bandwidth requirements of the on-chip network.

[0089] In some embodiments, the data processing method is used to process a neural network, where each task is a layer of the neural network (each layer includes multiple nodes, and each subtask may be one or more of these nodes).

[0090] Neural networks are a type of machine learning model. Due to their strong expressive power, they are used in fields such as speech recognition, image classification, face recognition, and natural language processing. Neural networks are used to perform any of the following tasks: image processing, speech processing, text processing, and video processing, or for data including any of the following sub-data: image data, speech data, text data, and video data.

[0091] In some embodiments, prior to step S102, the method further includes:

[0092] Each processing core obtains the sub-weight information corresponding to its sub-data.

[0093] In this neural network, there are connections between nodes in different layers, and each connection has weight information to characterize the connection strength. In this embodiment, the "sub-weight information" of a sub-data point refers to the weight information of the connection between the input channel corresponding to that sub-data point and different output channels.

[0094] Obtaining sub-weight information is a necessary condition for processing sub-data using sub-weight information. This disclosure does not impose special restrictions on the timing of obtaining the sub-weight information corresponding to the sub-data. As long as the sub-weight information corresponding to the sub-data is obtained before step S102, it is within the protection scope of this disclosure.

[0095] In some embodiments, before step S101, before the processing core acquires sub-data, each processing core of the core group loads all the required sub-weight information into each processing core at once.

[0096] In some embodiments, before step S102, that is, before the processing core processes the sub-data, each processing core of the core group loads all the required sub-weight information into each processing core at once.

[0097] In some embodiments, each time step S102 is executed, before each processing core processes the sub-data, multiple sub-weight information corresponding to the sub-data is sequentially loaded into the processing core.

[0098] Therefore, as long as the sub-weight information corresponding to the sub-data is obtained before step S102 to ensure that the processing kernel can process the sub-data normally, it falls within the protection scope of this disclosure.

[0099] This disclosure does not specifically limit when to send and process the result of a single processing step. As long as each processing core can obtain intermediate results with the same output channel after processing is completed, and obtain its subtask results based on the intermediate results, it falls within the protection scope of this disclosure.

[0100] As one implementation of this disclosure, after each processing core obtains all single processing results, multiple single processing results can be processed uniformly to obtain subtask results.

[0101] This embodiment will now be described in detail with reference to the accompanying drawings. Figure 3 A detailed flowchart of another data processing method provided in this embodiment of the disclosure.

[0102] Step S102 includes:

[0103] S102a. Each processing core processes the sub-data using each sub-weight information to obtain all single processing results.

[0104] Step S103 includes:

[0105] S103a After each processing core obtains all single processing results, at least some processing cores send the single processing results with the same output channel to the same processing core.

[0106] As can be seen from the above, the processing core does not process the multiple single processing results obtained before sending the single processing result. That is to say, in this case, each intermediate result sent by each processing core is a single processing result, or a set of multiple single processing results.

[0107] Step S104 includes:

[0108] S104a After at least some processing cores send the single processing results with the same output channel to the same processing core, at least some processing cores obtain the subtask results based on all the single processing results.

[0109] In this embodiment of the disclosure, after each processing core obtains all the single processing results (including those obtained from the received intermediate results), it sends the single processing results with the same output channel to the same processing core, and finally obtains the subtask results.

[0110] In some embodiments, step S103a includes:

[0111] Each processing core sends all single processing results, except for the single processing result corresponding to its own output channel, to processing cores with the same output channel.

[0112] In this scenario, where a processing core corresponds to at least one output channel, the processing core obtains a single processing result that includes the single processing result corresponding to its own output channel and the single processing results corresponding to other output channels. Therefore, the processing core retains the single processing result corresponding to its own output channel within its own processing core, and sends all other single processing results to the processing cores of the output channels corresponding to the single processing results, thereby aggregating single processing results with the same output channel into the same processing core.

[0113] The following describes in detail, with reference to the accompanying drawings, the process of a many-core system processing a task using the data processing method provided in the embodiments of this disclosure.

[0114] In this embodiment, the following naming rules are adopted: Ya represents sub-data, w represents sub-weight, Xab represents single processing result, n represents the nth task (Layer n) processed, a represents the ath sub-data, and b represents the bth output channel.

[0115] Specifically, the sub-weight information wnab, named according to the above naming rules, refers to the weight of sub-data Ya on the b-th output channel when processing the n-th task (Layer n). Taking the sub-weight information wn13 as an example, it represents the weight of sub-data Y1 on the 3rd output channel when processing the n-th task (Layer n).

[0116] Specifically, a single processing result Xab named according to the above naming rules refers to the processing result obtained by sub-data Ya on the b-th output channel. Taking a single processing result X13 as an example, it represents the processing result obtained by sub-data Y1 on the third output channel.

[0117] Please see Figure 4 In this many-core system, the processing cores (C1 to C4) are divided into a core group. The core group processes a task, which is a layer n in the neural network. Each processing core (C1, C2, C3, C4) processes one output channel. All the data required to process this task is Y1+Y2+Y3+Y4.

[0118] At time T=1, each processing core (C1, C2, C3, C4) obtains a subset of data (Y1, Y2, Y3, Y4), and each processing core (C1, C2, C3, C4) obtains the sub-weight information (wn14, wn21, wn32, wn43) corresponding to the subset of data (Y1, Y2, Y3, Y4). Each processing core (C1, C2, C3, C4) processes the subset of data (Y1, Y2, Y3, Y4) using its corresponding sub-weight information (wn14, wn21, wn32, wn43) to obtain its single processing result (X14, X21, X32, X43).

[0119] At time T=2, each processing core (C1, C2, C3, C4) acquires the sub-weight information (wn13, wn24, wn31, wn42) corresponding to the sub-data (Y1, Y2, Y3, Y4). Each processing core (C1, C2, C3, C4) processes the sub-data (Y1, Y2, Y3, Y4) respectively using its corresponding sub-weight information (wn13, wn24, wn31, wn42) to obtain its single processing result (X13, X24, X31, X42).

[0120] At this point, the intermediate result of each processing core (C1, C2, C3, C4) is the result of two single processing results corresponding to each processing core. That is, the intermediate result of processing core C1 is the set of single processing results (X14, X13), the intermediate result of processing core C2 is the set of single processing results (X21, X22), the intermediate result of processing core C3 is the set of single processing results (X31, X31), and the intermediate result of processing core C4 is the set of single processing results (X42, X43).

[0121] The processing procedures at times T=3 and T=4 are similar to those at time T=2, and will not be described in detail here.

[0122] From T=1 to T=4, see [link / reference] Figure 4 The part outlined in the dashed box shows the intermediate results (X11~X14, X21~X24, X31~X34, X41~X44) of each processing core (C1, C2, C3, C4) obtained from the sub-data (Y1, Y2, Y3, Y4).

[0123] Then, each processing core (C1, C2, C3, C4) sends the intermediate results with the same output channel to the same processing core. That is, processing core C1 obtains all the intermediate results (X11, X21, X31, X41) corresponding to the first output channel, processing core C2 obtains all the intermediate results (X12, X22, X32, X42) corresponding to the second output channel, processing core C3 obtains all the intermediate results (X13, X23, X33, X43) corresponding to the third output channel, and processing core C4 obtains all the intermediate results (X14, X24, X34, X44) corresponding to the fourth output channel.

[0124] Each processing core (C1, C2, C3, C4) processes all the single processing results of its corresponding output channel to obtain the subtask results (X1, X2, X3, X4).

[0125] It should be noted that for a single processing core, at different times, it needs to process the same sub-data with different sub-weight information, so that after four time steps, it can obtain all the single processing results of a sub-data on different output channels. As for which sub-weight of which output channel is used by different processing cores to process their corresponding sub-data at the same time, this disclosure does not specify which one.

[0126] In some embodiments, such as Figure 4 As shown, at any given time, different processing cores use the sub-weight information corresponding to different output channels to process their respective sub-data.

[0127] In some embodiments, at any given time, different processing cores process data using the sub-weight information corresponding to the same output channel. For example, at time T=1, all processing cores (C1, C2, C3, C4) process sub-data (Y1, Y2, Y3, Y4) using the sub-weight information (wn11, wn21, wn31, wn41) corresponding to the same output channel, thereby obtaining all single processing results (X11, X21, X31, X41) of different data on the same output channel (i.e., the first output channel).

[0128] In this scenario, since all the single-processing results (X11, X21, X31, X41) required for an output channel have been obtained at a given time, at least some processing cores (C2, C3, C4) can also send their obtained single-processing results (X21, X31, X41) to the processing core C1 corresponding to that output channel. Processing core C1 then processes all the single-processing results (X11, X21, X31, X41) required for that output channel to obtain the subtask result X1 for that output channel. That is, a subtask result corresponding to one output channel is obtained at each time step.

[0129] As described above, by compiling, the timing for each output channel to obtain subtask results can be configured based on the subweight information applied by different processing cores at different times. A processing core can either immediately send all the single processing results required for an output channel to the corresponding processing core at the moment it obtains them, or it can send them to the corresponding processing core at any time after obtaining all the single processing results required for an output channel. As long as each processing core can obtain all the single processing results of the same output channel, thereby obtaining the subtask results of each output channel, all such results fall within the scope of this disclosure.

[0130] As another embodiment of this disclosure, after each processing core obtains a single processing result, it can transmit the single processing result once and obtain intermediate results based on the single processing result until the last transmission to the processing core corresponding to the output channel, from which the processing core obtains the subtask result.

[0131] This embodiment will now be described in detail with reference to the accompanying drawings. Figure 5 A detailed flowchart of another data processing method provided in this embodiment of the disclosure.

[0132] Step S100 includes:

[0133] S101, Each processing core acquires one sub-data.

[0134] S102b: Each processing core processes the sub-data using a corresponding sub-weight information to obtain a single processing result, and uses the single processing result as an intermediate result.

[0135] Since step S102b is the first time the sub-data is processed, and none of the sub-weight information has been processed before, any sub-weight information can be arbitrarily selected from all the sub-weight information to process the sub-data.

[0136] In some embodiments, after obtaining intermediate results, the method further includes: each processing core changing its current corresponding output channel.

[0137] After each processing core obtains an intermediate result, it means that the single processing result of the sub-data on the output channel corresponding to the sub-weight information has been obtained. That is, the output channel corresponding to the current processing core has been processed. Then, when starting the next round of processing, each processing core should change the current corresponding output channel.

[0138] S103b: Each processing core sends the intermediate result to the processing core of the output channel corresponding to the intermediate result.

[0139] Here, "the output channel corresponding to the intermediate result" refers to the output channel corresponding to the sub-weight information used when obtaining the intermediate result before step S103b.

[0140] The phrase "the processing core corresponding to the current output channel of the intermediate result" refers to the processing core that, after obtaining each intermediate result, changes its current output channel. Therefore, the intermediate result needs to be sent to the new processing core after the output channel change. In other words, "the processing core corresponding to the current output channel of the intermediate result" refers to the processing core corresponding to the output channel of the intermediate result after the current output channel has been changed.

[0141] In some embodiments, "the output channel corresponding to the intermediate result" refers to the output channel corresponding to the sub-weight information used in step S102b.

[0142] In some embodiments, "the output channel corresponding to the intermediate result" refers to the output channel corresponding to the sub-weight information used in step S105b.

[0143] S104b: Each processing core uses a corresponding sub-weight information to process sub-data and obtain a single processing result.

[0144] Among them, the sub-weight information is the sub-weight information of the sub-data that has not been processed by the processing kernel.

[0145] Since step S104b is not the first time the sub-data is processed, there is at least some sub-weight information that has been processed. Therefore, it is necessary to determine a sub-weight information from all the sub-weight information that has not been processed to process the sub-data, so as to avoid repeated processing of the sub-data.

[0146] S105b: Each processing core obtains the current intermediate result based on the single processing result and the received intermediate result.

[0147] One way to obtain the current intermediate result is to superimpose the result of a single processing step with the received intermediate result.

[0148] The term "overlay" refers to adding the data at each position of the single processing result and the received intermediate result.

[0149] The data size of the current intermediate result obtained after superposition is the same as the data size of the single processing result and the data size of the received intermediate result.

[0150] For example, if the data size of a single processing result is 4*4 and the output size of the received intermediate result is 4*4, then when processing by superposition, the data value at each data point of the single processing result is processed in correspondence with the data value at each data point of the received intermediate result, and the data size of the processed result is still 4*4.

[0151] Therefore, step S105b can effectively reduce the storage space occupied.

[0152] S106b: Determine whether each processing core still contains sub-weight information of unprocessed sub-data.

[0153] If each processing core contains sub-weight information of unprocessed sub-data, then return to step S103b.

[0154] If each processing core does not have sub-weight information for unprocessed sub-data, then proceed to step S107b.

[0155] Each processing core should process one sub-data set and output the results on different output channels, that is, process one sub-data set one by one using all sub-weight information. When all sub-weight information has processed one sub-data set, it indicates that the processing of that sub-data set is complete; if there is still sub-weight information that has not been processed for that sub-data set, it indicates that the processing of that sub-data set is not yet complete, and the sub-weight information needs to be replaced to continue processing that sub-data set.

[0156] S107b, Each processing core uses the current intermediate result as the result of the subtask.

[0157] The task is completed when all sub-weight information corresponding to each processing core has been processed for the sub-data. At this point, each processing core will take the current intermediate result as the result of the sub-task.

[0158] In this implementation, after each single processing result is obtained, the single processing result is added to the intermediate result, so there is no need to store each single processing result separately. Only the intermediate result with a smaller data size needs to be stored, thereby reducing the storage requirements of the processing core.

[0159] The following describes in detail, with reference to the accompanying drawings, the process of a many-core system processing a task using the data processing method provided in the embodiments of this disclosure.

[0160] Please see Figure 6 At time T=1, each processing core (C1, C2, C3, C4) obtains a subset of data (Y1, Y2, Y3, Y4) and acquires the corresponding sub-weight information (wn14, wn21, wn32, wn43) for each subset of data (Y1, Y2, Y3, Y4). Each processing core (C1, C2, C3, C4) processes the subset of data (Y1, Y2, Y3, Y4) using its corresponding sub-weight information (wn14, wn21, wn32, wn43) to obtain its single processing result (X14, X21, X32, X43). The single processing result (X14, X21, X32, X43) is then used as an intermediate result (X14, X21, X32, X43).

[0161] At time T=2, each processing core (C1, C2, C3, C4) changes its current corresponding output channel and obtains the current corresponding sub-weight information (wn13, wn24, wn31, wn42). Each processing core (C1, C2, C3, C4) sends the intermediate results (X14, X21, X32, X43) to the processing core (C2, C3, C4, C1) of the current output channel of the intermediate result.

[0162] Each processing core (C1, C2, C3, C4) uses its corresponding sub-weight information (wn13, wn24, wn31, wn42) to process the sub-data (Y1, Y2, Y3, Y4) respectively, and obtains its single processing result (X13, X24, X31, X42).

[0163] Each processing core (C1, C2, C3, C4) combines the single processing result (X13, X24, X31, X42) and the received intermediate result (X43, X14, X21, X32) to obtain the current intermediate result (X13+X43, X24+X14, X31+X21, X42+X32).

[0164] At this point, since each processing core (C1, C2, C3, C4) still contains sub-weight information of unprocessed sub-data, the next round of processing continues.

[0165] The processing procedures at times T=3 and T=4 are similar to those at time T=2, and will not be described in detail here.

[0166] From T=1 to T=4, see [link / reference] Figure 6 The part outlined in the dashed box shows that each processing core (C1, C2, C3, C4) obtains all the single processing results (X11~X14, X21~X24, X31~X34, X41~X44) of the sub-data (Y1, Y2, Y3, Y4).

[0167] From time T=2 to T=4, each round includes: each processing core sending intermediate results to the processing core of its current output channel; each processing core processing the sub-data with the sub-weight information of the unprocessed sub-data to obtain a single processing result; each processing core obtaining the current intermediate result based on the single processing result and the received intermediate result; determining whether there is sub-weight information of the unprocessed sub-data; if there is sub-weight information of the unprocessed sub-data, then a round is restarted until all sub-weight information has processed the sub-data.

[0168] In some embodiments, during the process of each core group processing a task, each processing core processes a different output channel, and each time step S103b is executed, the processing core of the current corresponding output channel is the same processing core.

[0169] In other words, during the processing of a task, each processing core sends the intermediate results it obtains to a fixed processing core, for example, to form a reference. Figure 6 A fixed circular relay.

[0170] For information on the transfer order between processing cores, see [link / reference]. Figure 6 Processing core C1 sends intermediate result X14 to processing core C2, processing core C2 sends intermediate result X21 to processing core C3, processing core C3 sends intermediate result X32 to processing core C4, and processing core C4 sends intermediate result X43 to processing core C1. Furthermore, a fixed transmission order is formed, where processing core C1 transmits to processing core C2, processing core C2 transmits to processing core C3, processing core C3 transmits to processing core C4, and processing core C4 transmits to processing core C1. Therefore, during the processing of this task, data transmission between multiple processing cores (C1 to C4) is directly performed using this fixed transmission order.

[0171] It should be noted that T=1 to T=4 are only used to indicate which sub-weight information each processing core (C1, C2, C3, C4) uses to process the sub-data, and do not represent the actual time, nor do they indicate whether the time required for each processing core (C1 to C4) to process the sub-data with different sub-weight information is the same or different.

[0172] It should also be noted that the relay data in this embodiment is an intermediate result. Therefore, this embodiment is suitable for layers with a large output data volume and where each processing core needs to process the intermediate results of different output channels, such as deconvolution layers, inverse fully connected layers, etc.

[0173] In some embodiments, the number of processing cores in the core group is the same as the number of sub-data, and / or the number of sub-weight information corresponding to each processing core is the same as the number of output channels.

[0174] In this configuration, the number of processing cores in a core group can be set to be the same as the number of input channels. This means that each processing core in the core group has its own input channel, and the data to be processed on each input channel constitutes a sub-data set. Therefore, each processing core receives a corresponding sub-data set. In other words, the number of processing cores in the core group is the same as the number of sub-data sets.

[0175] Since each processing core corresponds to all the sub-weight information of a sub-data on different output channels, the number of weight information corresponding to each processing core is the same as the number of output channels.

[0176] When the number of input channels is the same as the number of output channels, the number of processing cores, the number of sub-data, the amount of weight information corresponding to each processing core, the number of input channels, and the number of output channels in the core group are all the same. For example Figure 4 and Figure 6 There are four of them.

[0177] In some embodiments, see Figure 7 The many-core system includes at least one shared memory 600, and each processing core (C1, C2, C3, C4) in the core group can directly access the shared memory 600.

[0178] Accordingly, in the data processing method, step 103 includes:

[0179] At least some processing cores will send intermediate results with the same output channel to the same processing core via shared storage.

[0180] "Sending via shared storage" means that the processing core stores the data to be transmitted into shared storage 600, and then the processing core that needs to receive the data accesses shared storage 600 to obtain the corresponding data.

[0181] Each processing core (C1, C2, C3, C4) sends intermediate results with the same output channel to the same processing core via shared memory 600 (as shown by the arrow in the diagram).

[0182] In this embodiment of the disclosure, since the data interaction between different processing cores within the core group is achieved by accessing the shared memory 600, it does not occupy the on-chip network transmission bandwidth, thereby reducing the on-chip network transmission bandwidth requirements between multiple processing cores processing a task.

[0183] In some embodiments, processing one task per kernel group means processing a reverse task, wherein the reverse task includes a deconvolution task or a reverse fully connected task.

[0184] Before step S100, the method further includes:

[0185] S001. This kernel group handles forward tasks, which include convolutional tasks or fully connected tasks.

[0186] The sub-weight information for processing forward tasks in this core group is the same set of sub-weight information as the sub-weight information for processing reverse tasks in this core group.

[0187] In this context, the reverse task refers to the task opposite to the forward task. When the forward task is a convolutional task, the corresponding reverse task is a deconvolutional task; when the forward task is a fully connected task, the corresponding reverse task is a reverse fully connected task.

[0188] In this embodiment, since the sub-weight information used by the forward task and the sub-weight information of its corresponding reverse task are the same set of sub-weight information, when both the forward task and its corresponding reverse task are processed by the same core group, it is sufficient to store a set of sub-weight information on the chip, thereby reducing the on-chip storage requirements.

[0189] In some embodiments, the data processing method further includes: at least one core group processing multiple tasks, the multiple tasks including a first task and a second task, wherein the first task is an adjacent prior task of the second task.

[0190] When the core group processes the second task, step S101 includes:

[0191] Each processing core obtains at least the subtask result obtained by the processing core when processing the first task, and obtains a sub-data for processing the second task based on at least one subtask result.

[0192] In this context, the subtask results received by each processing core in the second core group are the same as the subtask results sent by each processing core in the first core group.

[0193] Furthermore, in some embodiments, reference is made to Figure 8The many-core system includes at least one shared memory MEM, and each processing core (C1, C2, C3, C4) in the first core group and each processing core (C5, C6, C7, C8) in the second core group can directly access the same shared memory MEM.

[0194] When the first core group processes the first task, step S104 includes:

[0195] Each processing core (C1, C2, C3, C4) in the first core group obtains its subtask results (Y1, Y2, Y3, Y4) and stores the obtained subtask results (Y1, Y2, Y3, Y4) in the shared memory.

[0196] Furthermore, when the second core group processes the second task, each processing core (C5, C6, C7, C8) performs step S101, which includes:

[0197] Each processing core (C5, C6, C7, C8) in the second core group obtains a subtask result (Y1, Y2, Y3, Y4) as a sub-data by accessing the shared storage.

[0198] In other words, when different core groups process different tasks, data interaction between processing cores of different core groups can be achieved through shared memory, without data transmission through the on-chip network. This reduces the amount of data transmission between adjacent layers (Layer 1, Layer 2), thereby eliminating the data transmission requirement between adjacent layers (Layer 1, Layer 2) and reducing the transmission bandwidth requirement of the on-chip network.

[0199] In some embodiments, Figure 8 The shared memory MEM in the middle can have Figure 7 The shared memory 600 in the chip is used for data exchange between processing cores in different core groups, as well as between different processing cores within the same core group. This reduces the on-chip network bandwidth requirements between multiple processing cores processing a single task, and eliminates the data transfer requirements between different processing cores in two core groups processing adjacent tasks, thereby reducing the on-chip network bandwidth requirements.

[0200] In some embodiments, the method further includes:

[0201] S200, at least one core group processes multiple tasks.

[0202] Among them, multiple tasks include a first task and a second task, and the first task is the adjacent prior task of the second task.

[0203] In this process, the core group processes the first task first, and then processes the second task. In other words, the first and second tasks are processed sequentially.

[0204] For any task (the first task or the second task), the method described in step S100 above is used for processing.

[0205] Specifically, when the core group processes the second task, step S101 includes:

[0206] Each processing core obtains the subtask result it acquired while processing the first task, and uses it as a sub-data for processing the second task.

[0207] It should be noted that "first task" and "second task" do not mean that the kernel group only processes two tasks, nor do they mean that they are necessarily the first and second tasks in the neural network. They are only used to represent any two adjacent tasks.

[0208] Secondly, see Figure 9 This disclosure provides a many-core system, including:

[0209] Multiple processing cores 1001;

[0210] Multiple processing cores 1001 are used to execute any of the data processing methods provided in the embodiments of this disclosure.

[0211] Thirdly, see Figure 10 This disclosure provides a storage medium 110 storing a computer program, which is executed by a processor to implement any of the data processing methods provided in the embodiments of this disclosure.

[0212] Those skilled in the art will understand that all or some of the steps, systems, and devices disclosed above, as functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0213] In hardware implementations, the division between 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 executed by several physical components working together.

[0214] Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include both computer-readable media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable media includes volatile and non-volatile, removable and non-removable media implemented in any method or technique for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only optical disc (CD-ROM), digital versatile disc (DVD) or other optical disc storage; magnetic cartridges, magnetic tapes, disk storage or other magnetic storage; and any other media that can be used to store desired information and can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0215] This disclosure has disclosed exemplary embodiments, and although specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A data processing method applied to a many-core system, characterized in that, The many-core system's multiple processing cores are divided into at least one core group, and the core group includes multiple processing cores; the method includes: The core group processes at least one task; wherein, the task corresponds to multiple output channels, all the data required to process the task is divided into multiple sub-data, and each output channel has a sub-weight information corresponding to each sub-data; The core group processes at least one task, including: Each processing core acquires a sub-data; wherein, different processing cores acquire different sub-data, and each processing core has all the sub-weight information corresponding to the sub-data; Each processing core processes the sub-data using each of the sub-weight information, and obtains multiple single processing results for multiple output channels corresponding to the sub-data. At least some of the processing cores send intermediate results corresponding to the same output channel to the same processing core; wherein the intermediate results are obtained at least based on a single processing result obtained by that processing core; At least some of the processing cores obtain subtask results based on intermediate results; wherein the subtask results are obtained based on intermediate results corresponding to the same output channel.

2. The data processing method according to claim 1, characterized in that, Each of the processing cores processes the sub-data using each of the sub-weight information, obtaining multiple single-processing results of the sub-data in multiple output channels, including: Each processing core processes the sub-data using each of the sub-weight information to obtain all single processing results; The at least some of the processing cores send intermediate results with the same output channel to the same processing core, including: After each processing core obtains all single processing results, at least some of the processing cores will send the single processing results with the same output channel to the same processing core. The at least part of the processing cores obtains subtask results based on intermediate results, including: After at least some of the processing cores send the single processing results with the same output channel to the same processing core, at least some of the processing cores obtain the subtask result based on all the single processing results.

3. The data processing method according to claim 2, characterized in that, Each of the processing cores corresponds to one output channel; The at least some of the processing cores sending single processing results with the same output channel to the same processing core includes: Each processing core sends all single processing results, except for the single processing result corresponding to its own output channel, to the processing core with the same output channel.

4. The data processing method of claim 1, wherein, Each core group processes at least one task, including: Each of the processing cores acquires one sub-data; Each processing core processes the sub-data using a corresponding sub-weight information to obtain a single processing result, and uses the single processing result as an intermediate result; Each of the processing cores sends the intermediate result to the processing core of the output channel corresponding to the intermediate result; Each processing core processes the sub-data using a corresponding sub-weight information to obtain a single processing result; wherein, the sub-weight information is the sub-weight information of the sub-data that the processing core has not processed; Each processing core obtains the current intermediate result based on the single processing result and the received intermediate result; If each of the processing cores has sub-weight information that has not been processed by the sub-data, then each of the processing cores returns to the processing core that sends the intermediate result to the output channel corresponding to the intermediate result. If each processing core does not have sub-weight information for the unprocessed sub-data, then each processing core will use the current intermediate result as the sub-task result.

5. The data processing method according to claim 4, characterized in that, Each of the processing cores obtains the current subtask intermediate result based on the single processing result and the received subtask intermediate result, including: Each processing core superimposes the single processing result and the received intermediate result of the subtask to obtain the current subtask intermediate result.

6. The data processing method according to claim 4, characterized in that, During the process of each core group processing at least one task, each processing core processes a different output channel, and in the step where each processing core sends the intermediate result to the processing core of the output channel currently corresponding to the intermediate result.

7. The data processing method according to any one of claims 1 to 6, characterized in that, The many-core system includes at least one shared storage, and each of the processing cores in the core group can directly access the shared storage; The at least some of the processing cores sending intermediate results with the same output channel to the same processing core includes: at least some of the processing cores sending intermediate results with the same output channel to the same processing core through the shared storage.

8. The data processing method of claim 1, wherein, The data processing method is used to process neural networks, where each task is a layer of the neural network.

9. The data processing method according to claim 8, characterized in that, Each kernel group processes a task including processing a reverse task, which includes a deconvolution task or a reverse fully connected task. Before each of the said core groups processes the reverse task, the following is also included: The kernel group processes forward tasks, which include convolutional tasks or fully connected tasks; wherein, the sub-weight information of the kernel group for processing forward tasks is the same set of sub-weight information as the sub-weight information of the kernel group for processing reverse tasks.

10. The data processing method of claim 1, wherein, The method includes: at least one core group processing multiple tasks, the multiple tasks including a first task and a second task, wherein the first task is an adjacent prior task of the second task; When the core group processes the second task, each of the processing cores acquires a sub-data, including: Each processing core obtains at least the subtask result obtained when processing the first task, and obtains a sub-data for processing the second task based on the subtask result.

11. A many-core system, comprising: include: Multiple processing cores; The plurality of processing cores are used to execute the data processing method according to any one of claims 1 to 10.

12. A storage medium, characterized by The storage medium stores a computer program, which is executed by a processor to implement the data processing method as described in any one of claims 1 to 10.