Data Processing Method, Apparatus, and Storage Medium

By introducing a read descriptor parsing unit and a data reading unit into the data processing device, only the part of the data except for filling the data is read, which solves the problem of inefficiency of the operator caused by the memory wall, and realizes more efficient data reading and processing.

CN114281405BActive Publication Date: 2025-07-25CAMBRICON TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011031618.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-27
Publication Date
2025-07-25
Estimated Expiration
2041-01-16

AI Technical Summary

Technical Problem

In the prior art, when the device performs calculation processing, data loading and storage consume a lot of time due to the existence of a memory wall, which makes the operator efficiency unable to be effectively improved. Especially in neural network algorithms, data filling increases memory access power consumption.

Method used

By introducing a read descriptor parsing unit and a data reading unit, the description information of the parsing data generates a read fill descriptor, only the part of the data except the fill data is read, the read fill data is generated, and it is sent to the subsequent unit, reducing the data reading amount and improving reading efficiency and speed.

Benefits of technology

During the reading of data, the amount of data is reduced, the time is shortened, the power consumption is reduced, the efficiency of computing and storage processing is improved, and the data processing performance of the device is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114281405B_ABST
    Figure CN114281405B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, apparatus, and storage medium. The board card disclosed therein includes: a storage device, an interface device, a control device, and a chip provided with a data processing device; wherein the data processing device is respectively connected to the storage device, the control device, and the interface device; the storage device is used for storing data; the interface device is used for realizing data transmission between the data processing device and an external device; the control device is used for monitoring the state of the data processing device. The data processing method, apparatus, and storage medium provided by the embodiments of the present disclosure reduce the amount of data read, shorten the data reading time, improve the efficiency and speed of data reading, reduce power consumption, and significantly improve the efficiency of subsequent units performing operations, storage, and other processes, thereby enhancing the performance of the apparatus in data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a data processing method, apparatus, and storage medium. Background Art

[0002] In related technologies, the process of a device using an arithmetic unit to perform arithmetic processing is as follows: loading data from a memory, the arithmetic unit completing calculations, and outputting results to the memory. However, algorithms usually have the characteristics of large amounts of data and large amounts of calculations. Moreover, due to the existence of the memory wall, data loading and storage often consume a large amount of time, resulting in the inability to effectively improve the efficiency of the arithmetic unit. In neural network algorithms, in order to meet the arithmetic requirements of different operators, it is necessary to fill data before performing specific arithmetic operations, which further increases the memory access power consumption. Summary of the Invention

[0003] In view of this, the present disclosure provides a data processing method, apparatus, and storage medium.

[0004] According to one aspect of the present disclosure, there is provided a data processing apparatus, the apparatus including:

[0005] A read descriptor parsing unit, configured to parse first description information received for first data, send a first read padding descriptor obtained by parsing for the first data to a data reading unit, and send read padding data generated according to the first read padding descriptor to a subsequent unit;

[0006] The data reading unit is configured to receive a read request for the first data and the first read padding descriptor, modify the read request according to the first read padding descriptor to obtain a modified read request, read a part of the first data as second data according to the modified read request, and send the second data to the subsequent unit, where the second data is data in the first data other than the read padding data.

[0007] According to another aspect of the present disclosure, there is provided a data processing method, applied to a data processing apparatus, the data processing apparatus including a read descriptor parsing unit and a data reading unit, the method including:

[0008] Controlling the read descriptor parsing unit to parse first description information received for first data, sending a first read padding descriptor obtained by parsing for the first data to the data reading unit, and sending read padding data generated according to the first read padding descriptor to a subsequent unit;

[0009] Control the data reading unit to receive a read request for the first data and the first read padding descriptor, modify the read request according to the first read padding descriptor to obtain a modified read request, read a part of the first data as the second data according to the modified read request, and send the second data to the subsequent unit, where the second data is the data in the first data except the read padding data.

[0010] According to another aspect of the present disclosure, there is provided a machine learning operation device, the device comprising:

[0011] One or more of the above data processing devices, configured to obtain data to be operated and control information from other processing devices, perform specified machine learning operations, and transfer the execution results to other processing devices through an I / O interface;

[0012] When the machine learning operation device includes a plurality of the data processing devices, the plurality of data processing devices can be connected and data can be transmitted through a specific structure;

[0013] Wherein, the plurality of data processing devices are interconnected and data is transmitted through a Peripheral Component Interconnect Express (PCIE) bus to support larger-scale machine learning operations; the plurality of data processing devices share the same control system or have their own control systems; the plurality of data processing devices share memory or have their own memories; the interconnection mode of the plurality of data processing devices is any interconnection topology.

[0014] According to another aspect of the present disclosure, there is provided a combined processing device, the combined processing device comprising:

[0015] Such as the above machine learning operation device, general interconnection interface and other processing devices;

[0016] The machine learning operation device interacts with the other processing device to jointly complete a user-specified calculation operation,

[0017] Wherein, the combined processing device further comprises: a storage device, which is respectively connected to the machine learning operation device and the other processing device, and is used to store the data of the machine learning operation device and the other processing device.

[0018] According to another aspect of the present disclosure, there is provided a chip, the chip comprising the above combined processing device.

[0019] According to another aspect of the present disclosure, there is provided a board card, the board card comprising: a storage device, an interface device, a control device, and the above chip;

[0020] Among them, the data processing device is respectively connected to the storage device, the control device, and the interface device;

[0021] The storage device is used to store data;

[0022] The interface device is used to realize data transmission between the data processing device and external devices;

[0023] The control device is used to monitor the state of the data processing device,

[0024] Among them, the storage device includes: multiple groups of storage units, each group of the storage units is connected to the data processing device through a bus, and the storage unit is: DDR SDRAM;

[0025] The data processing device includes: a DDR controller, which is used to control data transmission and data storage of each storage unit;

[0026] The interface device is: a standard PCIE interface.

[0027] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, and characterized in that when the computer program instructions are executed by a processor, the above-mentioned data processing method is realized.

[0028] The data processing method, device, and storage medium provided by the embodiments of the present disclosure, the device includes: a read descriptor parsing unit, which is used to parse the received first description information for the first data, send the parsed first read fill descriptor for the first data to the data reading unit, and send the read fill data generated according to the first read fill descriptor to the subsequent unit; the data reading unit is used to receive a read request for the first data and the first read fill descriptor, modify the read request according to the first read fill descriptor to obtain a modified read request, read a part of the first data as the second data according to the modified read request, and send the second data to the subsequent unit, and the second data is the data in the first data except the read fill data. During the process of reading the first data, only the second data in the first data can be read and sent to the subsequent unit, reducing the amount of data read, shortening the data reading time, improving the efficiency and speed of data reading, reducing power consumption, and significantly improving the efficiency of subsequent units to perform operations, storage, etc., and enhancing the performance of the device for data processing.

[0029] According to the following detailed description of the exemplary embodiments with reference to the accompanying drawings, other features and aspects of the present disclosure will become clear. Description of the Drawings

[0030] The accompanying drawings, which are included in and form a part of this specification, illustrate exemplary embodiments, features, and aspects of the present disclosure and are used to explain the principles of the present disclosure together with the specification.

[0031] Figure 1 A block diagram showing a data processing apparatus according to an embodiment of the present disclosure.

[0032] Figure 2 A block diagram showing a data processing apparatus according to an embodiment of the present disclosure.

[0033] Figure 3 A block diagram showing a data processing apparatus according to an embodiment of the present disclosure.

[0034] Figure 4 A block diagram showing a data processing apparatus according to an embodiment of the present disclosure.

[0035] Figure 5 A flowchart showing a data processing method according to an embodiment of the present disclosure.

[0036] Figure 6 It is a structural diagram showing a combined processing apparatus 1200 according to an embodiment of the present disclosure.

[0037] Figure 7 It is a schematic structural diagram showing a board card 1300 according to an embodiment of the present disclosure. Detailed implementation manners

[0038] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the drawings denote elements having the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0039] The term "exemplary" used herein means "serving as an example, embodiment, or illustration". Any embodiment described herein as "exemplary" is not necessarily to be construed as superior to or better than other embodiments.

[0040] In addition, for a better description of the present disclosure, numerous specific details are given in the following detailed implementation manners. Those skilled in the art should understand that the present disclosure can be implemented without some specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art are not described in detail so as to highlight the gist of the present disclosure.

[0041] Figure 1 A block diagram showing a data processing apparatus according to an embodiment of the present disclosure. As Figure 1 shown, the apparatus includes: a read descriptor parsing unit 41 and a data reading unit 42.

[0042] A read descriptor parsing unit 41 is configured to parse the received first description information for the first data, send the parsed first read padding descriptor for the first data to a data reading unit 42, and send the read padding data generated according to the first read padding descriptor to a subsequent unit 43. The data processing device may include the subsequent unit 43, or the subsequent unit 43 may also be another device (which may also be a component unit of another device).

[0043] The data reading unit 42 is configured to receive a read request for the first data and the first read padding descriptor, modify the read request according to the first read padding descriptor to obtain a modified read request, read a part of the first data as the second data according to the modified read request, and send the second data to the subsequent unit 43, where the second data is the data in the first data other than the read padding data.

[0044] Among them, the second data is the data in the first data that has no regularity and can only be read from the memory. The read padding data is any one or more data in the first data that has regularity and can be determined without reading from the memory. For example, assume that the first data is [1, 0, 4, 1, 0, 0, 0, 0], the last four bits are all zero, and the first four bits have no definite regularity, then the last four bits can be implemented by padding. Then, in the process of reading the first data by using the above device, the data reading unit of the device that can describe that "the last four bits of the first data do not need to be read" by using the first description information finally only reads "the second data [1, 0, 4, 1]" from "the first data [1, 0, 4, 1, 0, 0, 0, 0]", and the read descriptor parsing unit generates "the read padding data [0, 0, 0, 0]". The subsequent unit can generate the complete first data [1, 0, 4, 1, 0, 0, 0, 0] according to "the second data [1, 0, 4, 1]" and "the read padding data [0, 0, 0, 0]". In this way, the reading of the first data is completed, and at the same time, the amount of data read can be reduced, the reading time of the first data can be shortened, the efficiency and speed of reading the first data can be improved, the power consumption can be reduced, and thus the processing efficiency of the subsequent unit can be improved.

[0045] In this embodiment, the first data can be data participating in neural network operations, such as input neurons, output neurons, input weights, biases, constant neurons, etc. The first description information can be user input or determined based on other information input by the user. The first description information records information describing the characteristics of the read padding data in the first data, such as the position, size, padding value, data volume, data format, etc. of the read padding data in the first data. The read descriptor parsing unit can parse the first description information and then generate a first read padding descriptor that can be directly recognized by the device in combination with the information of the first data (such as data volume, data dimension order, etc., which are information used to characterize the characteristics of the first data).

[0046] In a possible implementation manner, the first read padding descriptor includes at least one of the following: the padding position of the read padding data in the first data, the data volume of the read padding data, and the data format of the read padding data. The data format can include data dimension order, dimension, data type, and padding number.

[0047] Among them, the padding position can indicate the specific position of the read padding data in the first data. The padding position can be described by the start position and end position of the read padding data in the first data, or can be represented by means of the offset of the read padding data relative to the first data, etc. The data volume of the read padding data can indicate the data size of the read padding data, such as 2 bytes. The data format can characterize the format of the read padding data. The dimension can represent the dimensions included in the read padding data, such as channel dimension, height dimension, width dimension, quantity dimension, depth dimension, and time dimension, etc. The data dimension order can indicate the dimension order for reading and / or writing the read padding data, that is, the reading and / or writing order of the above dimensions. For example, if the read padding data includes a width dimension and a height dimension, the data dimension order for reading and / or writing it can be that the width dimension precedes the height dimension. The data type can represent the type and number of bits of the read padding data. For example, the data type of a certain read padding data is 16-bit floating point number. The padding number can be a specific value such as 0 or 1.

[0048] In this embodiment, the read request can be a conventional request for data reading. According to the read request, data can be read from a specified storage location. For example, the first data can be directly read from the storage location of the first data according to the read request for the first data. The data reading unit is also used to read the data to be read from the corresponding storage location according to the received read request for the data to be read.

[0049] In this embodiment, the modified read request includes information required to read the second data, such as the position of the second data in the first data, the data volume of the second data, and the data format of the second data. Among them, the data format may include the data dimension order, dimension, and data type.

[0050] In a possible implementation, the data reading unit may include: a request receiving subunit, a reading subunit, and a first data transmission subunit.

[0051] The request receiving subunit is configured to receive a read request for the first data and a first read padding descriptor, modify the read request according to the first read padding descriptor to obtain a modified read request, and send the modified read request to the reading subunit. The request receiving subunit can receive the read request through the set read request interface and receive the first read padding descriptor through the set read descriptor interface.

[0052] The reading subunit is configured to read a part of the first data from the memory as the second data according to the modified read request, and send the second data to the first data transmission subunit.

[0053] The first data transmission subunit is configured to send the received second data to the subsequent unit. The data transmission subunit can send the second data to the subsequent unit through the set interface.

[0054] The data processing device provided by the embodiments of the present disclosure can only read the second data in the first data and send it to the subsequent unit during the process of obtaining the first data, reducing the data volume of data reading, shortening the data reading time, improving the efficiency and speed of data reading, reducing power consumption, and significantly improving the efficiency of subsequent units performing operations, storage, and other processing, thereby enhancing the performance of the device for data processing.

[0055] Figure 2 The block diagram of a data processing device according to an embodiment of the present disclosure is shown. In a possible implementation, as Figure 2 shown, the subsequent unit 43 may include an arithmetic unit 431.

[0056] The arithmetic unit 431 is configured to generate the first data according to the received second data and the read padding data, and perform arithmetic processing on the first data to obtain an arithmetic result corresponding to the first data.

[0057] In this implementation, the arithmetic unit may include an arithmetic unit required to implement the arithmetic processing for the first data. The arithmetic processing may include arithmetic operations and / or logical operations. For example, the arithmetic unit may include an adder, a multiplier, a comparator, a selector, etc. The arithmetic processing performed on the first data may be an operation involved in neural network operations.

[0058] In this implementation, the arithmetic unit receives the second data and the read padding data. Compared with directly receiving the first data, the data input efficiency is significantly improved. Moreover, the first data can be generated based on the read padding data and the second data, without affecting the normal subsequent arithmetic processing of the first data.

[0059] In a possible implementation, as Figure 2 shown, the subsequent unit 43 may include an arithmetic unit 431, and the read descriptor parsing unit may include a read controller. The read controller is configured to generate read control information according to the first read padding descriptor and send the read control information to the arithmetic unit.

[0060] Wherein, the arithmetic unit 431 performs arithmetic operations on the second data and / or the read padding data under the control of the read control information. The arithmetic unit 431 may use a selector to select the second data and the read padding data under the control of the read control information, and then perform corresponding arithmetic operations, so as to obtain an intermediate result corresponding to the read padding data and an intermediate result corresponding to the second data, and finally obtain an arithmetic result corresponding to the first data according to the intermediate result corresponding to the read padding data and the intermediate result corresponding to the second data. Or the arithmetic unit 431 may use a selector to select the second data and the read padding data under the control of the read control information, and then perform corresponding arithmetic operations to directly obtain an arithmetic result corresponding to the first data.

[0061] Alternatively, the arithmetic unit 431 generates the first data according to the second data and the read padding data under the control of the read control information and then performs arithmetic operations. The arithmetic unit 431 may use a selector to perform selection processing on the read padding data and the second data under the control of the read control information to obtain the first data, and then perform arithmetic operations on the obtained first data to obtain an arithmetic result.

[0062] For example, assume that the first data is What is read by using the device of the present disclosure according to the modified read request is the second data and read padding data [1 1 1] is generated. The arithmetic unit may generate according to and [1 1 1] under the control of the read control information, and then perform arithmetic operations to obtain an arithmetic result.

[0063] In a possible implementation, the read descriptor parsing unit may further include a read padding data generation subunit. The read controller is further configured to parse the first description information to obtain a first read padding descriptor, and send read control information to the read padding data generation subunit. The read padding data generation subunit is configured to receive the read control information and generate read padding data according to the read control information.

[0064] In a possible implementation, the read controller may receive the first description information through a description information receiving interface set in the read descriptor parsing unit, and send the first padding descriptor to the data reading unit through a descriptor sending interface set in the read descriptor parsing unit. The read descriptor parsing unit may further include a second data transmission subunit, and the second data transmission subunit is configured to send the read padding data and the read control information to the arithmetic unit.

[0065] In a possible implementation, the subsequent unit 43 may include a subsequent read descriptor parsing unit and a subsequent data reading unit. The read descriptor parsing unit is further configured to send the first read padding descriptor to the subsequent read descriptor parsing unit; the subsequent read descriptor parsing unit is configured to send the first read padding descriptor to the subsequent data reading unit.

[0066] The subsequent read descriptor parsing unit further generates read padding data according to the first read padding descriptor and sends it to other subsequent units (such as an arithmetic unit, excluding the subsequent data reading unit). The subsequent data reading unit receives a read request for the first data and the first read padding descriptor, modifies the read request according to the first read padding descriptor to obtain a modified read request, reads a part of the first data as the second data according to the modified read request, and sends the second data to the other subsequent units (such as an arithmetic unit, excluding the subsequent data reading unit), and the second data is the data in the first data other than the read padding data.

[0067] The data reading unit may also directly forward the read request to the subsequent data reading unit.

[0068] In this implementation, the subsequent units may include multiple subsequent read descriptor parsing units and multiple subsequent data reading units. Through the above method, by only inputting the first description information to the read descriptor parsing unit and inputting a read request to the data reading unit, the data reading unit and the subsequent data reading units can respectively read the second data. The read descriptor parsing unit and the subsequent read descriptor parsing units can also generate read padding data. Each pair of data reading unit and read descriptor parsing unit (or subsequent data reading unit and subsequent read descriptor parsing unit) can send the second data and the read padding data to different arithmetic units to implement different arithmetic processes and obtain arithmetic results.

[0069] Figure 3 FIG. shows a block diagram of a data processing apparatus according to an embodiment of the present disclosure. In one possible implementation, as Figure 3 shown, the subsequent unit 43 may further include a write descriptor parsing unit 432 and a first data writing unit 433.

[0070] The arithmetic unit 431 is further configured to send the arithmetic result to the first data writing unit 433.

[0071] The write descriptor parsing unit 432 is configured to parse the received second description information for the arithmetic result to obtain a first write padding descriptor, generate write padding data according to the first write padding descriptor, and send the first write padding descriptor and the write padding data to the first data writing unit 433.

[0072] The first data writing unit 433 is configured to receive a first write request for the arithmetic result, the first write padding descriptor, and the write padding data, modify the first write request according to the first write padding descriptor to obtain a modified first write request, and store the data to be written in the arithmetic result and the write padding data according to the modified first write request. The data to be written is the data in the arithmetic result other than the write padding data.

[0073] In this implementation, since the state of the first data (information such as the position of the read padding data in the first data) is known in advance, the arithmetic method, operator, etc. used in the arithmetic result corresponding to the first data obtained by the arithmetic unit are also known in advance. Therefore, the write padding data in the arithmetic result can be determined based on this. In this way, for the arithmetic result, the first data writing unit only stores the data to be written therein (part of the data of the arithmetic result), which can improve the storage efficiency, speed of the arithmetic result, and reduce the power consumption of storing the arithmetic result. The setting of the write padding data ensures that the stored data to be written and the write padding data can finally generate the arithmetic result. Ensure the integrity of the data.

[0074] For example, assume that the operation result is The part to be written in the operation result is written according to the first write request after modification. And write the write padding data [0 0 0] generated according to the first write padding descriptor.

[0075] In another possible implementation, the write descriptor parsing unit 432 is configured to parse the received second description information for the operation result to obtain a first write padding descriptor, and send the first write padding descriptor to the first data writing unit 433. The first data writing unit 433 is configured to receive a first write request for the operation result, the first write padding descriptor, and the write padding data, modify the first write request according to the first write padding descriptor to obtain a modified first write request, and store the data to be written and the first write padding descriptor in the operation result according to the modified first write request, that is, store the data to be written and the first write padding descriptor as the "operation result". In the process of reading the "operation result" later, the data to be written and the first write padding descriptor can be read, and then the write padding data is generated according to the first write padding descriptor, so as to generate an operation result including all data according to the data to be written and the write padding data. Then, the data to be written is the data in the operation result other than the write padding data. In this way, the data storage process for the operation result can be further simplified, and the storage efficiency, speed can be further improved, and the power consumption of storing the operation result can be reduced.

[0076] In a possible implementation, the first write padding descriptor may include at least one of the following: the padding position of the write padding data in the operation result, the data amount of the write padding data, and the data format of the write padding data. The data format further includes at least one of the following: data dimension order, dimension, data type, filled number. The definition of the information included in the first write padding descriptor is the same as that of the first read padding descriptor. For the relevant description of the first read padding descriptor, refer to the above text and will not be elaborated here.

[0077] In a possible implementation, the first data writing unit is further configured to receive a third write request for the operation result, and store the operation result according to the third write request. That is, the first data writing unit can directly store the operation result.

[0078] In a possible implementation, the write descriptor parsing unit is further configured to optimize the first write padding descriptor to obtain an optimized write padding descriptor when it is determined that the first write padding descriptor meets the optimization condition, generate the write padding data according to the optimized write padding descriptor, and send the optimized write padding descriptor to the first data writing unit as the first write padding descriptor.

[0079] In this implementation, after the write descriptor parsing unit parses the first write padding descriptor, it first determines whether it is possible to optimize it. If optimization is not possible, it executes the processing procedure of "first write padding descriptor → write padding data → send the first write padding descriptor and write padding data". If optimization is possible, it executes the processing procedure of "first write padding descriptor → optimized write padding descriptor → write padding data → send the first write padding descriptor (i.e., the optimized write padding descriptor) and write padding data". Among them, whether there is a possibility of optimization may refer to whether there is a possibility of modifying the filling position, the filled number, and the data volume to be filled. In this way, it can be ensured that the determined data to be written is more accurate, and the data volume of the data to be written can be further reduced, further improving the storage efficiency, speed, and reducing the power consumption of the stored operation results.

[0080] In this embodiment, the difference between the second write padding descriptor and the first write padding descriptor can be described based on the difference in the write padding data generated by the two and / or based on the difference in the data to be written written by the two. Taking the difference in the write padding data as an example, the influence of the difference between the second write padding descriptor and the first write padding descriptor on the write padding data includes at least one of the following: the data volume of the write padding data becomes larger, the filling position of the write padding data increases (expands), the filled number changes, etc. In this way, it can be ensured that the determined data to be written is more accurate, and the data volume of the data to be written can be further reduced, further improving the storage efficiency, speed, and reducing the power consumption.

[0081] Figure 4 The block diagram of a data processing device according to an embodiment of the present disclosure is shown. In a possible implementation, as Figure 4 shown, the subsequent unit 43 includes a second data writing unit 434.

[0082] The read descriptor parsing unit is further configured to send the first read padding descriptor to the second data writing unit 434 as the second write padding descriptor.

[0083] The second data writing unit 434 is further configured to receive the second data, the read padding data, a second write request for the second data, and the second write padding descriptor, modify the second write request according to the second write padding descriptor to obtain a modified second write request, and store the second data and the read padding data according to the modified second write request, or store the first data generated according to the second data and the read padding data according to the modified second write request.

[0084] In the above manner, the process of transferring the first data is actually realized. Since only a part of the first data (i.e., the second data) is read during the reading process, and the storage of the first data in the storage also executes the storage process of storing a part of the first data (i.e., the second data), the access amount during the data transfer process is greatly reduced, the efficiency and speed of the transfer are improved, and the power consumption of the transfer is reduced.

[0085] Alternatively, the second data writing unit 434 may also only store the second data and the second write padding descriptor, store them as the "first data", and during the subsequent process of reading the "first data", the second data and the second write padding descriptor can be read, and then the read padding data can be generated according to the second write padding descriptor, so as to generate the first data including all data according to the second data and the read padding data. In this way, the process of transferring the first data can be further simplified, the transfer efficiency and speed can be further improved, and the transfer power consumption can be reduced.

[0086] In a possible implementation manner, the device includes a data processing module, and the data processing module includes at least one of the data reading unit, the read descriptor parsing unit, and the subsequent unit. One or more of the data reading unit, the read descriptor parsing unit, and the subsequent unit can be integrated in the same data processing module according to needs, so as to simplify the structure of the device.

[0087] In a possible implementation manner, the first read padding descriptor, the first write padding descriptor, and the second write padding descriptor can be distinguished as a read padding descriptor or a write padding descriptor by setting the same padding descriptor format and using write / read identifiers. For example, the padding descriptor format can be:

[0088]

[0089] Among them, pattern represents the data format, order represents the data dimension order, dims represents the dimension, Data type represents the data type, data represents the filled number, reserved represents the reserved field or redundant field, Addr represents the filling position, Size represents the data volume, and Attribute represents whether the filling descriptor is the first read filling descriptor for a read request or the first write filling descriptor or the second write filling descriptor for a write request. Different codes can be set for Attribute. For example, 01 represents the first read filling descriptor, and 00 represents the first write filling descriptor or the second write filling descriptor.

[0090] Figure 5 The flowchart showing the data processing method according to an embodiment of the present disclosure is as follows Figure 5 As shown, this method is applied to the above data processing device, and the method includes step S11 and step S12.

[0091] Control the read descriptor parsing unit to parse the first description information received for the first data, send the parsed first read filling descriptor for the first data to the data reading unit, and send the read filling data generated according to the first read filling descriptor to the subsequent unit;

[0092] Control the data reading unit to receive the read request for the first data and the first read filling descriptor, modify the read request according to the first read filling descriptor to obtain a modified read request, read a part of the first data as the second data according to the modified read request, and send the second data to the subsequent unit. The second data is the data in the first data other than the read filling data.

[0093] In a possible implementation manner, the subsequent unit may include an arithmetic unit. The method includes: controlling the arithmetic unit to generate the first data according to the received second data and the read filling data, and performing arithmetic processing on the first data to obtain an arithmetic result corresponding to the first data.

[0094] In a possible implementation manner, the subsequent unit may include an arithmetic unit, and the read descriptor parsing unit may include a read controller. The method further includes: controlling the read controller to generate read control information according to the first read filling descriptor, and sending the read control information to the arithmetic unit;

[0095] Among them, the method further includes: controlling the arithmetic unit to perform arithmetic operations on the second data and / or the read filling data under the control of the read control information; or

[0096] Control the arithmetic unit to perform an operation after generating the first data according to the second data and the read padding data under the control of the read control information.

[0097] In a possible implementation, the subsequent unit may include a subsequent read descriptor parsing unit and a subsequent data reading unit, and the method further includes:

[0098] Control the read descriptor parsing unit to further send the first read padding descriptor to the subsequent read descriptor parsing unit;

[0099] Control the subsequent read descriptor parsing unit to send the first read padding descriptor to the subsequent data reading unit.

[0100] In a possible implementation, the subsequent unit may further include a write descriptor parsing unit and a first data writing unit, and the method further includes:

[0101] Control the arithmetic unit to send the operation result to the first data writing unit;

[0102] Control the write descriptor parsing unit to parse the second description information received for the operation result to obtain a first write padding descriptor, generate write padding data according to the first write padding descriptor, and send the first write padding descriptor and the write padding data to the first data writing unit;

[0103] Control the first data writing unit to receive a first write request for the operation result, the first write padding descriptor, and the write padding data, modify the first write request according to the first write padding descriptor to obtain a modified first write request, and store the data to be written in the operation result and the write padding data according to the modified first write request,

[0104] The data to be written is the data in the operation result other than the write padding data.

[0105] In a possible implementation, the subsequent unit may include a second data writing unit, and the method may further include:

[0106] Control the read descriptor parsing unit to send the first read padding descriptor as a second write padding descriptor to the second data writing unit;

[0107] Control the second data writing unit to receive the second data, the read padding data, a second write request for the second data, and the second write padding descriptor, modify the second write request according to the second write padding descriptor to obtain a modified second write request, and store the second data and the read padding data according to the modified second write request, or store the first data generated according to the second data and the read padding data according to the modified second write request.

[0108] In a possible implementation manner, the method may further include: controlling the first data writing unit to receive a third write request for the operation result, and storing the operation result according to the third write request.

[0109] In a possible implementation manner, the method may further include: controlling the write descriptor parsing unit to optimize the first write padding descriptor to obtain an optimized write padding descriptor when determining that the first write padding descriptor meets the optimization condition, generating the write padding data according to the optimized write padding descriptor, and sending the optimized write padding descriptor to the first data writing unit as the first write padding descriptor.

[0110] In a possible implementation manner, the first read padding descriptor includes at least one of the following: the padding position of the read padding data in the first data, the data volume of the read padding data, and the data format of the read padding data.

[0111] The first write padding descriptor includes at least one of the following: the padding position of the write padding data in the operation result, the data volume of the write padding data, and the data format of the write padding data.

[0112] The data format further includes at least one of the following: data dimension order, dimension, data type, and filled numbers.

[0113] In the data processing method provided by the embodiments of the present disclosure, during the process of reading the first data, only the second data in the first data can be read and sent to the subsequent unit, reducing the data volume of data reading, shortening the data reading time, improving the efficiency and speed of data reading, reducing power consumption, and significantly improving the efficiency of subsequent units performing operations, storage, and other processes, and enhancing the performance of the device for data processing.

[0114] It should be noted that although the above embodiments are used as examples to introduce the data processing method and device as above, those skilled in the art can understand that the present disclosure should not be limited thereto. In fact, users can flexibly set each step and unit according to personal preferences and / or actual application scenarios as long as they conform to the technical solution of the present disclosure.

[0115] The present disclosure provides a machine learning computing device, which may include one or more of the above data processing devices, and is configured to obtain data to be computed and control information from other processing devices and execute specified machine learning computations. The machine learning computing device may obtain neural network computing macro instructions or neural network computing instructions to be executed from other machine learning computing devices or non-machine learning computing devices, and transmit the execution results to peripheral devices (also referred to as other processing devices) through an I / O interface. Peripheral devices such as cameras, displays, mice, keyboards, network cards, Wi-Fi interfaces, and servers. When more than one data processing device is included, the data processing devices may be linked and data may be transmitted through a specific structure. For example, they may be interconnected and data may be transmitted through a PCIE bus to support the computation of larger-scale neural networks. At this time, the same control system may be shared, or each may have an independent control system; the memory may be shared, or each accelerator may have its own memory. In addition, the interconnection method may be any interconnection topology.

[0116] The machine learning computing device has high compatibility and can be connected to various types of servers through a PCIE interface.

[0117] Figure 6 FIG. is a structural diagram showing a combined processing device 1200 according to an embodiment of the present disclosure. As Figure 6 shown in FIG., the combined processing device 1200 includes a computing processing device 1202, an interface device 1204, other processing devices 1206, and a storage device 1208. According to different application scenarios, the computing processing device may include one or more computing devices 1210. The computing processing device 1202 may be the above-mentioned machine learning computing device or the above-mentioned data processing device.

[0118] In different embodiments, the computing processing device of the present disclosure may be configured to execute operations specified by a user. In an exemplary application, the computing processing device may be implemented as a multi-core artificial intelligence processor. Similarly, one or more computing devices included in the computing processing device may be implemented as artificial intelligence processor cores (i.e., the computing cores described above) or partial hardware structures of artificial intelligence processor cores.

[0119] In an exemplary operation, the computing processing device of the present disclosure may interact with other processing devices through an interface device to jointly complete an operation specified by a user. Depending on the implementation, other processing devices of the present disclosure may include one or more types of processors such as a central processing unit (CPU), a graphics processing unit (GPU), an artificial intelligence processor, etc., which are general-purpose and / or special-purpose processors. These processors may include, but are not limited to, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., and the number thereof may be determined according to actual needs. As described above, only with respect to the computing processing device of the present disclosure, it may be regarded as having a single-core structure or a homogeneous multi-core structure. However, when the computing processing device and other processing devices are considered together, the two may be regarded as forming a heterogeneous multi-core structure.

[0120] In one or more embodiments, the other processing device may serve as an interface between the computing processing device of the present disclosure (which may be specifically implemented as a related computing device for artificial intelligence such as neural network operations) and external data and control, and perform basic controls including but not limited to data transfer, startup and / or shutdown of the computing device. In other embodiments, the other processing device may also cooperate with the computing processing device to jointly complete an operation task.

[0121] In one or more embodiments, the interface device may be used to transfer data and control instructions between the computing processing device and other processing devices. For example, the computing processing device may obtain input data from other processing devices via the interface device and write it into the storage device (or memory) on the chip of the computing processing device. Further, the computing processing device may obtain control instructions from other processing devices via the interface device and write them into the control cache on the chip of the computing processing device. Alternatively or optionally, the interface device may also read the data in the storage device of the computing processing device and transfer it to other processing devices.

[0122] Additionally or optionally, the combined processing device of the present disclosure may further include a storage device. As shown in the figure, the storage device is respectively connected to the computing processing device and the other processing device. In one or more embodiments, the storage device may be used to store data of the computing processing device and / or the other processing device. For example, this data may be data that cannot be fully stored in the internal or on-chip storage device of the computing processing device or other processing device.

[0123] In some embodiments, the present disclosure also discloses a chip (such as Figure 7 the chip 1302 shown in). In one implementation, the chip is a system-on-chip (SoC) and integrates one or more combined processing devices as shown in Figure 6 . The chip can be connected to other related components through an external interface device (such as the external interface device 1306 shown in Figure 7 ). The related components can be, for example, a camera, a display, a mouse, a keyboard, a network card, or a wifi interface. In some application scenarios, other processing units (such as a video codec) and / or interface modules (such as a DRAM interface) etc. can be integrated on the chip. In some embodiments, the present disclosure also discloses a chip package structure that includes the above chip. In some embodiments, the present disclosure also discloses a board card that includes the above chip package structure. The following will be combined with Figure 7 to describe the board card in detail.

[0124] Figure 7 is a schematic structural diagram of a board card 1300 according to an embodiment of the present disclosure. As shown in Figure 7 , the board card includes a storage device 1304 for storing data, which includes one or more storage units 1310. The storage device can be connected and data-transferred to the control device 1308 and the above-mentioned chip 1302 through, for example, a bus. Further, the board card also includes an external interface device 1306, which is configured to perform data relaying or transfer functions between the chip (or the chip in the chip package structure) and an external device 1312 (such as a server or a computer, etc.). For example, the data to be processed can be transferred from the external device to the chip through the external interface device. Again, for example, the calculation result of the chip can be transmitted back to the external device via the external interface device. According to different application scenarios, the external interface device can have different interface forms. For example, it can adopt a standard PCIE interface, etc.

[0125] In one or more embodiments, the control device in the disclosed board can be configured to regulate the state of the chip. For this purpose, in one application scenario, the control device can include a microcontroller unit (MCU) for regulating the operating state of the chip.

[0126] According to the above combination Figure 6 and Figure 7 the description, those skilled in the art can understand that the present disclosure also discloses an electronic device or apparatus, which can include one or more of the above boards, one or more of the above chips, and / or one or more of the above combined processing devices.

[0127] According to different application scenarios, the electronic device or apparatus of the present disclosure can include servers, cloud servers, server clusters, data processing devices, robots, computers, printers, scanners, tablets, smart terminals, PC devices, Internet of Things terminals, mobile terminals, mobile phones, dash cams, navigators, sensors, cameras, cameras, video cameras, projectors, watches, headphones, mobile storage, wearable devices, vision terminals, autonomous driving terminals, transportation tools, household appliances, and / or medical devices. The transportation tools include airplanes, ships, and / or vehicles; the household appliances include TVs, air conditioners, microwave ovens, refrigerators, rice cookers, humidifiers, washing machines, electric lights, gas stoves, range hoods; the medical devices include nuclear magnetic resonance imagers, B - ultrasound devices, and / or electrocardiographs. The electronic device or apparatus of the present disclosure can also be applied to fields such as the Internet, Internet of Things, data centers, energy, transportation, public management, manufacturing, education, power grids, telecommunications, finance, retail, construction sites, and medical. Further, the electronic device or apparatus of the present disclosure can also be used in application scenarios related to artificial intelligence, big data, and / or cloud computing such as the cloud, edge, and terminal. In one or more embodiments, the high - computing - power electronic device or apparatus according to the present disclosure can be applied to cloud devices (such as cloud servers), while the low - power - consumption electronic device or apparatus can be applied to terminal devices and / or edge devices (such as smartphones or cameras). In one or more embodiments, the hardware information of cloud devices is compatible with the hardware information of terminal devices and / or edge devices, so that appropriate hardware resources can be matched from the hardware resources of cloud devices according to the hardware information of terminal devices and / or edge devices to simulate the hardware resources of terminal devices and / or edge devices, so as to complete unified management, scheduling, and collaborative work of end - cloud integration or cloud - edge - end integration.

[0128] It should be noted that, for the purpose of simplicity, some methods and their embodiments in the present disclosure are expressed as a series of actions and their combinations. However, those skilled in the art can understand that the solutions of the present disclosure are not limited by the order of the described actions. Therefore, according to the disclosure or teachings of the present disclosure, those skilled in the art can understand that some of the steps can be executed in other orders or simultaneously. Further, those skilled in the art can understand that the embodiments described in the present disclosure can be regarded as optional embodiments, that is, the actions or modules involved are not necessarily required for the implementation of certain solutions of the present disclosure. In addition, according to different solutions, the present disclosure focuses on different aspects of some embodiments. In view of this, those skilled in the art can understand that the parts not detailed in a certain embodiment of the present disclosure can also refer to the relevant descriptions of other embodiments.

[0129] In terms of specific implementation, based on the disclosure and teachings of the present disclosure, those skilled in the art can understand that several embodiments disclosed in the present disclosure can also be implemented by other means not disclosed herein. For example, for each unit in the foregoing embodiments of the electronic device or apparatus, a division is made herein based on the consideration of logical functions, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features or functions of the units or components can be selectively disabled. In terms of the connection relationship between different units or components, the connections discussed in conjunction with the accompanying drawings herein can be direct or indirect couplings between the units or components. In some scenarios, the foregoing direct or indirect couplings involve communication connections using interfaces, where the communication interfaces can support signal transmission in electrical, optical, acoustic, magnetic, or other forms.

[0130] In the present disclosure, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units. The foregoing components or units may be located at the same position or distributed over multiple network units. In addition, according to actual needs, some or all of the units can be selected to achieve the purpose of the solutions described in the embodiments of the present disclosure. In addition, in some scenarios, multiple units in the embodiments of the present disclosure can be integrated into one unit or each unit physically exists separately.

[0131] In some implementation scenarios, the above integrated units may be implemented in the form of software program modules. When implemented in the form of software program modules and sold or used as an independent product, the integrated units may be stored in a computer-readable memory. Based on this, when the solution of the present disclosure is embodied in the form of a software product (such as a computer-readable storage medium), the software product may be stored in a memory, which may include several instructions for causing a computer device (such as a personal computer, a server, or a network device, etc.) to execute some or all of the steps of the method described in the embodiments of the present disclosure. The aforementioned memory may include, but is not limited to, various media that can store program codes, such as USB flash drives, flash memory drives, read-only memory (ROM), random access memory (RAM), external hard drives, magnetic disks, or optical discs.

[0132] In some other implementation scenarios, the above integrated units may also be implemented in the form of hardware, that is, a specific hardware circuit, which may include digital circuits and / or analog circuits, etc. The physical implementation of the hardware structure of the circuit may include, but is not limited to, physical devices, and the physical devices may include, but are not limited to, devices such as transistors or memristors. In view of this, various devices described herein (such as computing devices or other processing devices) may be implemented by appropriate hardware processors, such as CPUs, GPUs, FPGAs, DSPs, and ASICs, etc. Further, the aforementioned storage unit or storage device may be any appropriate storage medium (including magnetic storage media or magneto-optical storage media, etc.), which may be, for example, resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high bandwidth memory (HBM), hybrid memory cube (HMC), ROM, and RAM, etc.

[0133] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or the technical improvements in the technology in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A data processing device, characterized in that, The device includes: A read descriptor parsing unit, configured to parse first description information received for first data, send a first read fill descriptor for the first data obtained by parsing to a data reading unit, and send read fill data generated according to the first read fill descriptor to a subsequent unit; The data reading unit is configured to receive a read request for the first data and the first read fill descriptor, modify the read request according to the first read fill descriptor to obtain a modified read request, read a part of the first data as second data according to the modified read request, and send the second data to the subsequent unit, where the second data is data in the first data other than the read fill data; Wherein, the read fill data is any one or more regular data in the first data that can be determined without reading from a memory.

2. The device according to claim 1, characterized in that The subsequent unit includes an arithmetic unit, The arithmetic unit is configured to generate the first data according to the received second data and the read fill data, and perform arithmetic processing on the first data to obtain an arithmetic result corresponding to the first data.

3. The device according to claim 1 or 2, characterized in that, The subsequent unit includes an arithmetic unit, and the read descriptor parsing unit includes a read controller, The read controller is configured to generate read control information according to the first read fill descriptor, and send the read control information to the arithmetic unit; Wherein, the arithmetic unit performs arithmetic on the second data and / or the read fill data under the control of the read control information; or The arithmetic unit generates the first data according to the second data and the read fill data under the control of the read control information and then performs arithmetic.

4. The device according to claim 1, characterized in that, The subsequent unit includes a subsequent read descriptor parsing unit and a subsequent data reading unit, Wherein, the read descriptor parsing unit is further configured to send the first read fill descriptor to the subsequent read descriptor parsing unit; The subsequent read descriptor parsing unit is configured to send the first read fill descriptor to the subsequent data reading unit.

5. The device according to claim 2, characterized in that, The subsequent unit further includes a write descriptor parsing unit and a first data writing unit, The arithmetic unit is further configured to send the arithmetic result to the first data writing unit; The write descriptor parsing unit is configured to parse second description information received for the arithmetic result to obtain a first write fill descriptor, generate write fill data according to the first write fill descriptor, and send the first write fill descriptor and the write fill data to the first data writing unit; The first data writing unit is configured to receive a first write request for the arithmetic result, the first write fill descriptor, and the write fill data, modify the first write request according to the first write fill descriptor to obtain a modified first write request, and store the data to be written in the arithmetic result and the write fill data according to the modified first write request, The data to be written is data in the arithmetic result other than the write fill data.

6. The device according to claim 1, characterized in that The subsequent unit includes a second data writing unit, The read descriptor parsing unit is further configured to send the first read padding descriptor to the second data writing unit as a second write padding descriptor; The second data writing unit is further configured to receive the second data, the read padding data, a second write request for the second data, and the second write padding descriptor, modify the second write request according to the second write padding descriptor to obtain a modified second write request, and store the second data and the read padding data according to the modified second write request, or store the first data generated according to the second data and the read padding data according to the modified second write request.

7. The apparatus according to claim 5, wherein The first data writing unit is further configured to receive a third write request for the operation result and store the operation result according to the third write request.

8. The apparatus according to claim 5, wherein The write descriptor parsing unit is further configured to, when determining that the first write padding descriptor meets the optimization condition, optimize the first write padding descriptor to obtain an optimized write padding descriptor, generate the write padding data according to the optimized write padding descriptor, and send the optimized write padding descriptor to the first data writing unit as the first write padding descriptor.

9. The device according to claim 1, characterized in that, The apparatus includes a data processing module, and the data processing module includes at least one of the data reading unit, the read descriptor parsing unit, and the subsequent unit.

10. The device according to claim 5, characterized in that, The first read padding descriptor includes at least one of the following: the padding position of the read padding data in the first data, the data amount of the read padding data, and the data format of the read padding data. The first write padding descriptor includes at least one of the following: the padding position of the write padding data in the operation result, the data amount of the write padding data, and the data format of the write padding data. The data format further includes at least one of the following: data dimension order, dimension, data type, and filled number.

11. A data processing method, characterized in that, Applied to a data processing apparatus, the data processing apparatus includes a read descriptor parsing unit and a data reading unit, and the method includes: Controlling the read descriptor parsing unit to parse the received first description information for the first data, sending the parsed first read padding descriptor for the first data to the data reading unit, and sending the read padding data generated according to the first read padding descriptor to the subsequent unit; Controlling the data reading unit to receive a read request for the first data and the first read padding descriptor, modifying the read request according to the first read padding descriptor to obtain a modified read request, reading a part of the first data as the second data according to the modified read request, and sending the second data to the subsequent unit, where the second data is the data in the first data other than the read padding data; Wherein the read padding data is any one or more regular data in the first data that can be determined without reading from the memory.

12. A non-volatile computer-readable storage medium, characterized in that, A computer program instruction is stored thereon. It is characterized in that when the computer program instruction is executed by a processor, the data processing method described in claim 11 is implemented.

13. A data processing device, characterized in that, The device includes a processor and a memory. A computer program is stored in the memory. When the processor executes the computer program, the data processing method described in claim 11 is implemented.

Citation Information

Patent Citations

  • Data processing method and device and storage medium

    CN114282679A