A multi-core system and data processing method and processing device thereof

By reading and processing data according to predetermined data granularity in the processing task pipeline of the many-core system, and configuring the cache according to the branch output time, the problem of data processing delay and storage requirements is solved, and efficient data processing and storage savings are achieved.

CN111124626BActive Publication Date: 2024-09-03LYNXI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201811296279.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-11-01
Publication Date
2024-09-03
Estimated Expiration
2038-11-01

AI Technical Summary

Technical Problem

Existing many-core systems cannot meet the requirements of data processing speed and storage requirements, resulting in long data processing delays and high storage requirements.

Method used

In the processing task pipeline of the many-core system, each processing task is controlled to read and process the data to be processed according to the predetermined data granularity, and the cache queue depth is configured according to the output time of different branches to reduce data processing latency and storage. need. Specific methods include in the processing task pipeline, each processing task reads data blocks smaller than the unit amount of data to be processed for processing, and performs cache management before the processing results are output to the next task to achieve data processing efficiency and storage. save.

Benefits of technology

It improves the efficiency of data processing, reduces data processing delay, reduces storage requirements, and saves storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111124626B
    Figure CN111124626B
Patent Text Reader

Abstract

Disclosed are a many-core system and a data processing method and a processing device thereof. The system controls a first processing task in a processing task pipeline to read and process data to be processed according to a predetermined data granularity. The predetermined data granularity is smaller than the data volume of a unit of data to be processed and greater than or equal to the minimum data volume required to execute a processing instruction of the first processing task. Thus, the efficiency of data processing can be improved, the data processing delay can be reduced, and the storage requirement can be reduced to save storage space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more specifically, to a many-core system and a data processing method and a processing device thereof. Background Art

[0002] With the rapid development of deep learning technology, the demand for data processing speed is increasing. Therefore, various devices that use hardware (such as many-core systems) to accelerate the operation of deep learning models have emerged. Many-core systems are composed of one or more processors, and a processor usually integrates multiple complete computing engines (cores). The cores in a processor or between multiple processors can work together. These cores can run program instructions independently, and the ability of parallel computing can speed up the running speed of the program and provide multi-tasking capabilities. However, the existing many-core systems cannot meet people's requirements for storage needs and latency. Summary of the invention

[0003] In view of this, the present invention provides a data processing method, a processing device and a many-core system for a many-core system, so as to improve the efficiency of data processing, reduce the data processing delay, and reduce the storage requirement to save storage space.

[0004] In a first aspect, an embodiment of the present invention provides a data processing method for a many-core system, the method comprising:

[0005] Controlling a first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity, wherein the predetermined data granularity is smaller than the data volume of the unit data to be processed and greater than or equal to the minimum data volume required to execute the processing instruction of the first processing task;

[0006] The processing instruction of the first processing task is executed to process the read data to be processed, and the processing result is output to the next processing task in the processing task pipeline.

[0007] Therefore, the data processing method of the embodiment of the present invention can improve the efficiency of data processing, reduce data processing delay, and reduce storage requirements and save storage space.

[0008] Further, executing the processing instruction of the first processing task to process the read data to be processed specifically includes: controlling the first processing task to perform a convolution operation to process the read data to be processed;

[0009] The minimum data amount is the minimum data amount required to perform the convolution operation.

[0010] Furthermore, the processing task pipeline includes multiple branches, and the multiple branches include a first branch and a second branch; the method also includes:

[0011] The cache queue depth of the last processing task of the second branch is configured according to the output time of the first branch and the output time of the second branch, the first branch is the branch with the largest delay among the multiple branches, and the second branch is the branch other than the branch with the largest delay among the multiple branches.

[0012] Furthermore, the cache space of the processing task is configured according to the corresponding data granularity.

[0013] Furthermore, the data to be processed is an image, and the processing result is feature map data.

[0014] Furthermore, the data to be processed is a video, and the processing result is feature map data of a frame of video.

[0015] Further, the processing task pipeline includes multiple processing tasks, wherein at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks among the multiple processing tasks are mapped to one processing core of the many-core system.

[0016] In a second aspect, an embodiment of the present invention provides a data processing device for a many-core system, the device comprising:

[0017] A first processing unit is configured to control a first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity, wherein the predetermined data granularity is smaller than a data volume of a unit of data to be processed and greater than or equal to a minimum data volume required to execute a processing instruction of the first processing task; and

[0018] The second processing unit is configured to execute the processing instructions of the first processing task to process the read data to be processed, and output the processing result to the next processing task in the processing task pipeline.

[0019] Furthermore, the second processing unit includes:

[0020] a convolution processing subunit, configured to control the first processing task to perform a convolution operation to process the read data to be processed,

[0021] The minimum data amount is the minimum data amount required to perform the convolution operation.

[0022] Further, the processing task pipeline includes multiple branches; the multiple branches include a first branch and a second branch; the device also includes:

[0023] A cache configuration unit is configured to configure a cache queue depth of a last processing task of the second branch according to an output time of the first branch and an output time of the second branch, wherein the first branch is a branch with a maximum delay among the multiple branches, and the second branch is a branch other than the branch with a maximum delay among the multiple branches.

[0024] Furthermore, the cache space of the processing task is configured according to the corresponding data granularity.

[0025] Furthermore, the data to be processed is an image, and the processing result is feature map data.

[0026] Furthermore, the data to be processed is a video, and the processing result is feature map data of a frame of video.

[0027] Further, the processing task pipeline includes multiple processing tasks, wherein at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks among the multiple processing tasks are mapped to one processing core of the many-core system.

[0028] In a third aspect, an embodiment of the present invention provides a many-core system, the many-core system comprising:

[0029] multiple processing cores; and

[0030] An on-chip network configured to exchange data between the plurality of processing cores and external data;

[0031] At least one of the plurality of processing cores performs the following operations:

[0032] Controlling a first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity, wherein the predetermined data granularity is smaller than the data volume of the unit data to be processed and greater than or equal to the minimum data volume required to execute the processing instruction of the first processing task;

[0033] The processing instruction of the first processing task is executed to process the read data to be processed, and the processing result is output to the next processing task in the processing task pipeline.

[0034] Furthermore, the processing core includes:

[0035] A memory configured to store processing instructions corresponding to the processing core, and cache the to-be-processed data read according to a predetermined data granularity and the processing results of the processing core;

[0036] an operator configured to call the instruction in the instruction storage unit to process the read data to be processed according to the processing instruction; and

[0037] The controller is configured to output the processing result of the operator to the next processing core in the task pipeline through the on-chip network.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method as described above.

[0039] In a fifth aspect, an embodiment of the present invention provides a computer program product, which, when executed on a computer, enables the computer to execute the above method.

[0040] The embodiment of the present invention controls the first processing task in the processing task pipeline to read and process the data to be processed according to a predetermined data granularity. The predetermined data granularity is smaller than the data volume of the unit data to be processed and greater than or equal to the minimum data volume corresponding to the processing instruction for executing the first processing task. This can improve the efficiency of data processing, reduce data processing delay, and reduce storage requirements to save storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0042] Figure 1 is a flow chart of a data processing method of a many-core system according to an embodiment of the present invention;

[0043] Figure 2 It is a schematic diagram of the branch structure of a deep learning model in the prior art;

[0044] Figure 3 is a schematic diagram of a many-core system according to an embodiment of the present invention;

[0045] Figure 4 It is a schematic diagram of a 204*204*3 image;

[0046] Figure 5 is a schematic diagram of image data of a processing task cache in the prior art;

[0047] Figure 6 It is a timing diagram of a deep learning model running on a many-core system of the prior art;

[0048] Figure 7 is a flow chart of a data processing method in a processing task in an embodiment of the present invention;

[0049] Figure 8 and Fig. 9 is a schematic diagram of image data of a processing task cache according to an embodiment of the present invention;

[0050] Fig.10 is a timing diagram of a many-core system running a deep learning model according to an embodiment of the present invention;

[0051] Fig.11 is a timing diagram of a multi-core system running a deep learning model according to another embodiment of the present invention;

[0052] Fig.12 is a schematic diagram of a data processing device of a many-core system according to an embodiment of the present invention;

[0053] Fig.13 Schematic diagram of the structure of a many-core system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0055] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0056] Unless the context clearly requires otherwise, throughout the specification and claims, the words "include", "comprising" and similar words should be interpreted in an inclusive sense rather than an exclusive or exhaustive sense; that is, in the sense of "including but not limited to".

[0057] In the description of this application, it should be understood that the terms "first", "second", etc. are used only for descriptive purposes to represent any one of a plurality of items, and should not be understood to indicate or imply relative importance, nor to represent an order. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0058] The many-core system of the embodiment of the present invention includes one or more processors, each of which integrates multiple processing cores. The data processing method of the many-core system of the embodiment of the present invention is described below using one processing core as an example.

[0059] Figure 1 FIG. 1 is a flow chart of a data processing method for a many-core system according to an embodiment of the present invention. Figure 1 As shown, the data processing method of the many-core system according to the embodiment of the present invention includes the following steps:

[0060] Step S100, control the first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity. The predetermined data granularity is less than the data volume of the unit data to be processed, and greater than or equal to the minimum data volume required to execute the processing instruction of the first processing task. The data to be processed may be various types of images, videos or other types of data. In an optional implementation, the unit data to be processed may be an image or a frame of video image. If the data to be processed is an image, the unit data to be processed is an image; if the data to be processed is a video, the unit data to be processed is a frame of video image.

[0061] Step S200, execute the processing instruction of the first processing task to process the read data to be processed, and output the processing result to the next processing task in the processing task pipeline. It should be understood that the first processing task is any processing task in the processing task pipeline, and at least one other processing task in the processing task pipeline may be working at the same time.

[0062] Among them, the processing task may include convolution operation, pooling operation, etc. Taking the processing task as a convolution operation as an example, the minimum amount of data is the minimum amount of data required to perform the convolution operation. It is easy for those skilled in the art to understand that the minimum input data amount of the convolution operation is determined by the size of its convolution kernel. For example, an image data size is 204*204*3, and a 3*3*3 convolution kernel is used to perform a convolution operation on this image. Without zero padding, it is necessary to read the third pixel of the third row of the image to calculate the convolution of the first image data (that is, the second pixel of the second row). In other words, the minimum amount of data required to execute the processing instruction of the processing task is (204*2+3)*3.

[0063] The processing task pipeline includes multiple processing tasks, wherein at least one processing task is mapped to one or more processing cores of the many-core system, and / or at least two of the multiple processing tasks are mapped to one processing core. That is, one processing task can be mapped to one processing core or multiple processing cores, and multiple processing tasks can also be mapped to one processing core. For example, in the step of "outputting the processing result to the next processing task in the processing task pipeline" (step S200), the next processing task can be processed by the processing core that executes the first processing task, or can be processed by other processing cores.

[0064] It should be noted that the number of processing cores corresponding to the processing task can be adjusted according to the computational load and timing requirements of the processing task. For example, the computational load of processing task 1 is the sum of the computational load of processing task 2 and the computational load of processing task 3. Then processing task 1 can be mapped to two processing cores, processing task 2 can be mapped to one processing core, and processing task 3 can be mapped to one processing core. Alternatively, processing task 1 can be mapped to one processing core, and processing tasks 2 and 3 can be mapped to the same processing core, thereby reducing data processing latency.

[0065] The processing task pipeline may include multiple branches, and the multiple branches include a first branch and a second branch. The first branch is the branch with the largest delay among the multiple branches, and the second branch is the branch other than the branch with the largest delay among the multiple branches. In an optional implementation, the cache queue depth of the last processing task of the second branch can be configured according to the output time of the first branch and the output time of the second branch to reduce the data processing delay and improve the efficiency of the multi-core system. The cache queue depth is the cache size of the corresponding processing task. The maximum delay branch is the branch with the longest data processing time. For example, the processing task pipeline includes branch 1 and branch 2, wherein branch 1 is the maximum delay branch (that is, the first branch). The output time of the processing result of branch 1 is 20 seconds later than the output time of the processing result of branch 2 (that is, the second branch). If the time of the last processing task of branch 2 is 4 seconds. In an optional implementation, the cache queue depth of the last processing task of branch 2 can be made at least 6 times the corresponding data granularity. Thus, the delay can be reduced while improving the resource utilization and efficiency of the multi-core system.

[0066] That is to say, since the number of processing tasks in each branch in the processing task pipeline and / or the processing time of each processing task may be different, that is, the data processing delay of each branch may be different, it is necessary to design the cache queue depth of the last processing task of the second branch according to the output time of the first branch (that is, the branch with the largest delay) and the output time of the second branch, so that the output time of the processing result of a unit of data to be processed in each branch remains basically consistent, thereby reducing the data processing delay.

[0067] Figure 2 This is a schematic diagram of the branch structure of a deep learning model in the prior art. Figure 2As shown, deep learning model 2 includes four processing tasks, namely, Poll layer, Branch1 layer, Branch2 layer and Add layer. Among them, Branch2 layer includes three layers, namely, Branch2a layer, Branch2b layer and Branch2c layer. Deep learning model 2 includes two branches, Pool-Branch1 and Pool-Branch2. Among them, if the data processing latency of Branch1 layer is similar to that of Branch2 layer, the Pool layer, Branch1 layer, Branch2 layer and Add layer can be mapped to four processing cores respectively. At this time, the Branch2a layer, Branch2b layer and Branch2c layer are mapped to one processing core. If the data processing delay of the Branch1 layer is much smaller than the data processing delay difference of the Branch2 layer, the Branch2a layer, Branch2b layer and Branch2c layer in the Branch2 layer can be mapped to three processing cores respectively to shorten the data processing delay of the Branch1 layer and the Branch2 layer, thereby speeding up the data processing speed.

[0068] Figure 3 Schematic diagram of a multi-core system according to an embodiment of the present invention. Figure 3 As shown, the multi-core system 3 of the embodiment of the present invention corresponds to Figure 2 The deep learning model 2 in the many-core system 3 includes processing cores 1-6. Among them, the Pool layer in the deep learning model 2 is mapped to the processing core 1, the Branch1 layer is mapped to the processing core 2, the Branch2a layer, the Branch2b layer, and the Branch2c layer in the Branch2 layer are mapped to the processing cores 3-5 respectively, and the Add layer is mapped to the processing core 6. The processing core 1 reads and processes the data to be processed according to the predetermined data granularity, and outputs the processing results to the processing cores 2 and 3. The processing cores 2 and 3 read the processing results of the processing core 1 according to the corresponding predetermined data granularity, process the read data, and output the processing results to the processing cores 6 and 4 respectively. The processing cores 4 and 5 process the processing results output by the processing core 3 in turn and output the processing results to the processing core 6. The processing core 6 receives the processing results of the processing core 2 and the processing results of the processing core 5 and performs corresponding processing to obtain the final processing results of the many-core system 3. Since processing core 6 needs to perform processing based on the processing results of processing core 2 and processing core 5, it is necessary to configure the cache queue depth of processing core 2 (Branch1 layer) and processing core 5 (Branch2c layer) according to the output time of the processing results of processing core 2 and the output time of the processing results of processing core 5, so that the output time of the processing results of processing core 2 and processing core 5 for the same set of data is basically equal, thereby reducing data processing delay.

[0069] Figure 4 It is a schematic diagram of a 204*204*3 image. Figure 5 FIG. 1 is a schematic diagram of image data cached by a processing task in a multi-core system of the prior art. Figure 4 When the image in the task cache is processed, the image data diagram is as follows Figure 5 For ease of understanding and description, Figure 5 Only a part of image 4 (8*8*3) is drawn, and a flat image is used. Figure 5 As shown, when a multi-core system in the prior art processes an image, the granularity of the image data read each time is the unit data to be processed (that is, an image or a feature map). That is to say, when a processing task reads data, the entire image or the entire feature map needs to be completely read before processing begins. Therefore, in the prior art, the amount of data cached by each processing task is at least the amount of data of an image or the amount of data of a feature map and the amount of data of the processing result, and the required storage requirements are relatively high.

[0070] Figure 6 This is a timing diagram of the many-core system running the deep learning model in the prior art. Figure 6 As shown, t1 is the time axis of the processing task pipeline of the prior art. In the processing task pipeline of the prior art, after the Pool layer reads in a whole image (Pool0), it executes the corresponding processing instructions to process the image data, and after the processing is completed, the processing result (the feature map processed by the Pool layer) is output to the Branch1 layer and the Branch2a layer. That is to say, in the prior art, each processing task in the processing task pipeline needs to obtain the data volume of all units of data to be processed before it can be processed. Therefore, in the prior art, the processing delay of the deep learning model is the multi-layer whole image processing delay (that is, the processing delay tp of the Pool layer for the whole image + the processing delay tb1 of the Branch1 layer for the whole feature map + the processing delay ta of the Add layer for the whole feature map), and the data processing delay is relatively long.

[0071] Figure 7 FIG. 1 is a flow chart of a data processing method in a processing task in an embodiment of the present invention. Figure 7 As shown, the flowchart of the data processing method in the processing task of this embodiment includes the following steps:

[0072] Step S110, reading the data to be processed in a preset manner. If the data to be processed is an image, the preset manner is to read the pixels of the image line by line; if the data to be processed is a video, the preset manner is to read a frame of video image and read the pixels of the frame of video image line by line.

[0073] Step S120, determining whether the number of pixels read reaches a predetermined data granularity. The predetermined data granularity is smaller than the data volume of the unit data to be processed (such as a complete image), and greater than or equal to the minimum data volume required for the processing instruction to execute the processing task. For example, when the processing task is a convolution operation, the corresponding minimum data volume is the minimum data volume required to execute the convolution operation. At this time, the minimum data volume is determined by the corresponding convolution kernel. When the number of pixels read reaches the predetermined data granularity, execute step S130, otherwise, execute step S110.

[0074] Step S130, executing the processing instruction of the processing task to process the read data to be processed, and outputting the processing result to the next processing task in the task pipeline.

[0075] Step S140, clear the data in the cache (including cached pixels and processing results) that are not related to the next data processing when executing the processing task. That is, after one data processing is completed, it is necessary to clear the data in the cache that are not related to the next data processing to save storage space. Then, continue to execute step S110 to read the data to be processed.

[0076] The following describes the data processing method in the above processing task by taking the processing task as a convolution operation and the convolution kernel used as fh*fw*ch_in*ch_out as an example. Where ch_in is the dimension of the input channel, and ch_out is the dimension of the output channel. Assume that the data to be processed is an image, and the pixels of the image to be processed are 204*204*3, the convolution kernel used is 3*3*3*16, and the horizontal and vertical sliding window step sizes are both 1.

[0077] Figure 8 and Fig. 9 Schematic diagram of image data of a processing task cache according to an embodiment of the present invention. Figure 4 When the image in the task cache is processed, the image data diagram is as follows Figure 8 and Fig. 9 For ease of understanding and description, Figure 8 and Fig. 9 Only a part of image 4 (8*8*3) is drawn, and a plane image is used. When the convolution kernel is 3*3*3*16, and the convolution operation is not padded with zeros, the first convolution operation can only be performed when the third pixel of the third row of the image is read. Therefore, the minimum data volume corresponding to the processing task is (204*2+3)*3. The predetermined data granularity can be greater than or equal to (204*2+3)*3.

[0078] This embodiment takes the convolution operation without zero padding and the data granularity as (204*2+3)*3 as an example. Figure 8 As shown, when the third pixel of the third row of the image is read (that is, when the amount of data read reaches the predetermined data granularity), a convolution operation is performed on the pixel value of pixel a and the processing result (a feature data 1*1*16) is output to the next processing task. At this time, the storage requirement of the corresponding computing core is only (204*2+3)*3 and a processing result 1*1*16. After the data processing is completed, the useless data in the cache is cleared, that is, the data of pixel a' in the cache is deleted. It should be understood that the processing results of this time can also be deleted at the same time to save cache space. The processing task continues to read the data of the image to be processed, such as Fig. 9 As shown, when the fourth pixel of the third row is read, the amount of data in the cache reaches the predetermined data granularity again, and the pixel value of pixel b is convolved and the processing result is output to the next processing task. Therefore, the cache of this data processing is still (204*2+3)*3 and a processing result 1*1*16. Therefore, compared with the data processing method in the prior art, which requires the cache of the entire image data and its processing result, the cache requirement of this embodiment is greatly reduced.

[0079] In this embodiment, a predetermined data granularity may be set according to the minimum amount of data required for each processing task in the processing task pipeline to reduce the storage requirement of the processing core and speed up the data processing speed.

[0080] Fig.10 1 is a timing diagram of a multi-core system running a deep learning model according to an embodiment of the present invention. Fig.10As shown, t2 is the time axis of the computing task pipeline in this embodiment. This embodiment is described by the processing task pipeline of a branch Pool-Branch2a-Branch2b-Branch2c of the deep learning model 2. Among them, Pool0, Pool1 and Pool2 are the unit data to be processed of the Pool layer respectively. Branch2a0, Branch2a1 and Branch2a2 are the unit data to be processed of the Branch2a layer respectively. Branch2b0, Branch2b1 and Branch2b2 are the unit data to be processed of the Branch2b layer respectively. Branch2c0, Branch2c1 and Branch2c2 are the unit data to be processed of the Branch2c layer respectively. After the Pool layer reads the data amount of the predetermined data granularity, it starts to process according to its corresponding processing instructions, and outputs the processing results to the Branch2a layer. After that, the Pool layer continues to read the data in the unit data to be processed according to the predetermined data granularity, processes according to its corresponding processing instructions, and outputs the processing results to the Branch2a layer. After reading the data volume of the corresponding predetermined data granularity, the Branch2a layer processes it according to the corresponding processing instruction and outputs the result to the Branch2b layer. After reading the data volume of the corresponding predetermined data granularity, the Branch2b layer processes it according to the corresponding processing instruction and outputs the result to the Branch2c layer. After reading the data volume of the corresponding predetermined data granularity, the Branch2c layer processes it according to the corresponding processing instruction and outputs the result to the next processing task in the processing task pipeline.

[0081] Fig.11 FIG. 1 is a timing diagram of a multi-core system running a deep learning model according to another embodiment of the present invention. Fig.11 As shown, t3 is the time axis of the computing task pipeline of this embodiment. This embodiment is described by the pipeline (two branches) of deep learning model 2, which is similar to Fig.10 The principle is similar to that of , except that the processing result of the Pool layer is output to the Branch1 layer and the Branch2a layer. In this embodiment, the Branch2a layer, the Branch2b layer and the Branch2c layer are mapped to three processing cores to further reduce the latency.

[0082] like Fig.10 and Fig.11As shown in FIG. 1 , in this embodiment, the delay of processing a complete image is the single-layer whole image processing delay + multi-layer multi-row delay, that is, the first layer Pool layer processing delay for the entire image + the delay of each read and process of the predetermined data granularity by other layers (Branch1 layer, Branch2b layer, Branch2c layer and Add layer). Figure 6 The multi-layer whole-image processing delay in the prior art is shown as: tp+tb1+ta. The delay in the data processing process of this embodiment is greatly shortened, thereby improving the efficiency of data processing in the many-core system.

[0083] Therefore, this embodiment can reduce the storage requirements and data processing delay while also reducing hardware devices and improving data processing efficiency.

[0084] In another optional implementation, the Branch2a layer, the Branch2b layer, and the Branch2c layer may also be mapped to one processing core to reduce costs.

[0085] The embodiment of the present invention controls each processing task in the processing task pipeline to read and process the data to be processed according to a predetermined data granularity, thereby improving the efficiency of data processing, reducing data processing latency, and reducing storage requirements to save storage space.

[0086] Fig.12 Schematic diagram of a data processing device of a many-core system according to an embodiment of the present invention. Fig.12 As shown, the data processing device 10 of this embodiment includes a first processing unit 101 and a second processing unit 102. The first processing unit 101 is configured to control the first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity. The predetermined data granularity is less than the data volume of the unit data to be processed, and is greater than or equal to the minimum data volume required to execute the processing instruction of the first processing task. The second control unit 102 is configured to execute the processing instruction of the first processing task to process the read data to be processed, and output the processing result to the next processing task in the processing task pipeline. The cache space of the first processing task is configured according to the corresponding predetermined data granularity. In an optional implementation, the data to be processed is an image or a video, and the processing result is the feature map data of the image or the feature map data of a frame of video.

[0087] Preferably, the second control unit 102 includes a convolution processing unit 102a. The convolution processing unit 102a is configured to control the first processing task to perform a convolution operation to process the read data to be processed, and the minimum data amount is the minimum data amount required to perform the convolution operation.

[0088] Preferably, the processing task pipeline includes multiple branches. The multiple branches include a first branch and a second branch. The first branch is the branch with the largest delay among the multiple branches, and the second branch is the branch other than the branch with the largest delay among the multiple branches. The data processing device 10 also includes a cache configuration unit, which is configured to configure the cache queue depth of the last processing task of the second branch according to the output time of the first branch and the output time of the second branch, so that the output time of the processing tasks at the end of each branch is approximately equal, thereby reducing the data processing delay.

[0089] Preferably, the processing task pipeline includes multiple processing tasks, wherein at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks among the multiple processing tasks are mapped to one processing core of the many-core system. Furthermore, the number of processing cores corresponding to the processing task can be adjusted according to the computational load and timing requirements of the processing task. Thus, the efficiency of the many-core system can be improved and the latency of data processing can be reduced.

[0090] Fig.13 Schematic diagram of the structure of the many-core system of the embodiment of the present invention. Fig.13 As shown, the multi-core system of this embodiment includes processing cores 11-1N and an on-chip network 14. The processing cores 11-1N are all connected to the on-chip network 14. The on-chip network 14 is used to exchange data between the N processing cores and external data. At least one of the N processing cores performs the following operations: controls the first processing task in the processing task pipeline to read the data to be processed according to a predetermined data granularity, the predetermined data granularity is less than the data amount of the unit data to be processed, and is greater than or equal to the minimum data amount required to execute the processing instruction of the processing task, and executes the processing instruction of the first processing task to process the read data to be processed, and then outputs the processing result to the next processing core through the on-chip network.

[0091] like Fig.13 As shown, the processing core 11 includes a memory 111, an operator 113 and a controller 114. Among them, the memory 111 is used to store the processing instructions corresponding to the processing core 11 and the data to be processed read according to the predetermined data granularity. In another optional implementation, the memory 111 may include a first memory and a second memory, the first memory is used to store the processing instructions corresponding to the processing core 11, and the second memory is used to store the data to be processed read according to the predetermined data granularity. The operator 113 is configured to call the instructions in the instruction storage unit 111 to process the read data to be processed according to the corresponding processing instructions. The controller 114 is configured to output the processing result of the operator 113 to the next processing core in the task pipeline through the on-chip network 14.

[0092] The embodiment of the present invention controls the processing tasks in the processing task pipeline to read and process the data to be processed according to a predetermined data granularity, thereby improving the efficiency of data processing, reducing data processing delay, and reducing storage requirements to save storage space.

[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data processing method for a many-core system, characterized in that: The many-core system includes a plurality of processing cores and an on-chip network for exchanging data between the plurality of processing cores and external data, and the method includes: Controlling a first processing task in a processing task pipeline to read the data to be processed in a preset manner, and determining whether the number of pixels read reaches a predetermined data granularity, wherein if the data to be processed is an image, the preset manner refers to reading the pixels of the image row by row, and if the data to be processed is a video, the preset manner refers to reading a frame of a video image, and reading the pixels of the video image row by row, the predetermined data granularity is smaller than the data amount of a unit of data to be processed, and is greater than or equal to the minimum data amount required to execute a processing instruction of the first processing task, and the data amount of the unit of data to be processed includes the entire image or the entire video image; When the number of pixels read reaches a predetermined data granularity, the processing instruction of the first processing task is executed to process the read data to be processed, and the processing result is output to the next processing task in the processing task pipeline, and the data irrelevant to the next data processing in the cache when the first processing task is executed is cleared; The number of processing cores corresponding to the first processing task is determined according to the computational load of the first processing task and the timing requirement of the first processing task in the processing task pipeline; The processing task pipeline includes a plurality of processing tasks, at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks of the plurality of processing tasks are mapped to one processing core of the many-core system; The processing task pipeline includes a plurality of branches, wherein the plurality of branches include a first branch and a second branch; the method further includes: The cache queue depth of the last processing task of the second branch is configured according to the output time of the first branch and the output time of the second branch, the first branch is the branch with the largest delay among the multiple branches, and the second branch is the branch other than the branch with the largest delay among the multiple branches.

2. The data processing method according to claim 1, characterized in that: Executing the processing instruction of the first processing task to process the read data to be processed, specifically: controlling the first processing task to perform a convolution operation to process the read data to be processed; The minimum data amount is the minimum data amount required to perform the convolution operation.

3. The data processing method according to claim 1 or 2, characterized in that: The cache space of the processing task is configured according to the corresponding data granularity.

4. The data processing method according to claim 1 or 2, characterized in that: The data to be processed is an image, and the processing result is feature map data.

5. The data processing method according to claim 1 or 2, characterized in that: The data to be processed is a video, and the processing result is feature map data of a frame of video.

6. A data processing device for a many-core system, characterized in that: The many-core system includes a plurality of processing cores and an on-chip network for exchanging data between the plurality of processing cores and external data, and the device includes: A first processing unit is configured to control a first processing task in the processing task pipeline to read the data to be processed in a preset manner, and determine whether the number of pixels read reaches a predetermined data granularity, wherein if the data to be processed is an image, the preset manner refers to reading the pixels of the image row by row, and if the data to be processed is a video, the preset manner refers to reading a frame of a video image and reading the pixels of the video image row by row, the predetermined data granularity is smaller than the data amount of a unit of data to be processed and greater than or equal to the minimum data amount required to execute the processing instruction of the first processing task, and the data amount of the unit of data to be processed includes the entire image or the entire video image; and A second processing unit is configured to execute the processing instructions of the first processing task to process the read data to be processed when the number of the read pixels reaches a predetermined data granularity, output the processing result to the next processing task in the processing task pipeline, and clear the data in the cache that is not related to the next data processing when the first processing task is executed; The number of processing cores corresponding to the first processing task is determined according to the computational load of the first processing task and the timing requirement of the first processing task in the processing task pipeline; The processing task pipeline includes a plurality of processing tasks, at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks of the plurality of processing tasks are mapped to one processing core of the many-core system; The processing task pipeline includes multiple branches, the multiple branches include a first branch and a second branch, and the device further includes: A cache configuration unit is configured to configure a cache queue depth of a last processing task of the second branch according to an output time of the first branch and an output time of the second branch, wherein the first branch is a branch with a maximum delay among the multiple branches, and the second branch is a branch other than the branch with a maximum delay among the multiple branches.

7. The data processing device according to claim 6, characterized in that: The second processing unit comprises: a convolution processing subunit, configured to control the first processing task to perform a convolution operation to process the read data to be processed, The minimum data amount is the minimum data amount required to perform the convolution operation.

8. The data processing device according to claim 6 or 7, characterized in that: The cache space of the processing task is configured according to the corresponding data granularity.

9. The data processing device according to claim 6 or 7, characterized in that: The data to be processed is an image, and the processing result is feature map data.

10. The data processing device according to claim 6 or 7, characterized in that: The data to be processed is a video, and the processing result is feature map data of a frame of video.

11. A many-core system, characterized in that: The many-core system comprises: multiple processing cores; and An on-chip network configured to exchange data between the plurality of processing cores and external data; At least one of the plurality of processing cores performs the following operations: Controlling a first processing task in a processing task pipeline to read the data to be processed in a preset manner, and determining whether the number of pixels read reaches a predetermined data granularity, wherein if the data to be processed is an image, the preset manner refers to reading the pixels of the image row by row, and if the data to be processed is a video, the preset manner refers to reading a frame of a video image, and reading the pixels of the video image row by row, the predetermined data granularity is smaller than the data amount of a unit of data to be processed, and is greater than or equal to the minimum data amount required to execute a processing instruction of the first processing task, and the data amount of the unit of data to be processed includes the entire image or the entire video image; Execute the processing instruction of the first processing task to process the read data to be processed, and output the processing result to the next processing task in the processing task pipeline, and clear the data in the cache when executing the first processing task that is not related to the next data processing; The number of processing cores corresponding to the first processing task is determined according to the computational load of the first processing task and the timing requirement of the first processing task in the processing task pipeline; The processing task pipeline includes a plurality of processing tasks, at least one processing task is mapped to one processing core or multiple processing cores of the many-core system; and / or at least two processing tasks of the plurality of processing tasks are mapped to one processing core of the many-core system; The processing task pipeline includes a plurality of branches, wherein the plurality of branches include a first branch and a second branch; at least one processing core among the plurality of processing cores is further configured to perform the following operations: The cache queue depth of the last processing task of the second branch is configured according to the output time of the first branch and the output time of the second branch, the first branch is the branch with the largest delay among the multiple branches, and the second branch is the branch other than the branch with the largest delay among the multiple branches.

12. The many-core system according to claim 11, characterized in that: The processing core comprises: A memory configured to store processing instructions corresponding to the processing core, and cache the to-be-processed data read according to a predetermined data granularity and the processing results of the processing core; an operator configured to call the instruction in the instruction storage unit to process the read data to be processed according to the processing instruction; and The controller is configured to output the processing result of the operator to the next processing core in the task pipeline through the on-chip network.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 5.

14. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the data processing method according to any one of claims 1 to 5.