A data processing system supporting pause operation
By designing a data processing system that supports pause operation, the coordinated work of the comparison module, recording module and discarding module is used to solve the problems of poor pause response capabilities and resource waste caused by the difference in computing unit efficiency in GPU data calculation processing, and achieve fast and accurate pause and recovery operations.
Patent Information
- Application Number
- CN202510163026.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-14
AI Technical Summary
When using GPU for data calculation processing, the difference in computing efficiency of the calculation unit results in different amounts of sub-data remaining in the FIFO memory, resulting in poor system ability to respond to pause instructions, and the prior art uses a sub-data count counter to occupy more memory bit widths, resulting in serious waste of resources.
A data processing system that supports pause operation is designed, including data preparation module, selection module, M storage module, M serial module, M computing module, pause module and discard module. The comparison module obtains the minimum index value of each sub-data as a pause value, and the recording module records the index value of the sent sub-data. The discarding module determines the reference value based on the counting value of the counting module, controls the sending instructions of the serial module to ensure that all storage modules are cleared before pausing.
It realizes rapid response to pause instructions without occupying a large amount of storage bit width, ensuring the accuracy and efficiency of the system during pause and recovery, and reducing resource consumption.
Smart Images

Figure CN119621620B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data processing system supporting pause operation. Background Art
[0002] In the scenario of using GPU for data calculation and processing, it is usually necessary to use multiple computing units to calculate the large amount of data to be processed. Therefore, the data to be processed needs to be split into multiple sub-data, and the sub-data is transmitted to the computing unit through the FIFO memory and serializer corresponding to each computing unit. The split sub-data is usually sent to each FIFO memory in a polling manner, but due to the difference in computing efficiency of the computing units, the number of remaining sub-data in different FIFO memories will be different. In this case, if it is necessary to pause the entire data processing system, in order to ensure that the sub-data that has been sent cannot be sent a second time, and no unsent sub-data can be lost, there is no need to worry about which computing unit the first sub-data after recovery is sent to. When recovering, the sub-data is still sent to any computing unit in the order of sub-data splitting. It is necessary to wait until all FIFO memories are transmitted before pausing, and the system has poor ability to respond to pause instructions.
[0003] In view of the above problems, the prior art proposes a method of counting the number of sub-data received by each computing unit, and by ensuring that the number of sub-data received by each computing unit is consistent, each FIFO memory can send the sub-data to the corresponding computing unit in the sub-data splitting order when resuming. However, since the sub-data number counter needs to occupy a large storage bit width, storage resources are wasted. Therefore, how to achieve faster pause response with less resource consumption has become an urgent problem to be solved. Summary of the invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is:
[0005] A data processing system supporting pause operation, the system comprising: a data preparation module, a selection module, M storage modules, M serial modules, M calculation modules, a pause module and a discard module, wherein the data preparation module comprises a data splitting module and a recording module, the pause module comprises a comparison module, the discard module comprises M counting modules, one storage module has a corresponding serial module and a counting module, one serial module has a corresponding calculation module, and M is an integer greater than 1.
[0006] The pause module is used to send a pause instruction to the data preparation module, the M serial modules and the discard module, and the comparison module is used to compare the M sub-data obtained from the M serial modules, obtain the minimum value of the index value corresponding to each sub-data as the pause value, and send the pause value and the record pause value instruction to the recording module.
[0007] The data splitting module is used to receive the data to be processed when the pause instruction is not received or after receiving an external resume instruction, split the data to be processed into sub-data according to the record value in the recording module, record the index value corresponding to the sub-data that has been sent, and send the split sub-data to the recording module, send the sub-data to the selection module, and pause the splitting of the data to be processed after receiving the pause instruction.
[0008] The selection module is used for, when receiving sub-data, determining one storage module from the M storage modules in a polling manner as a target module corresponding to the sub-data, and sending the sub-data to the target module.
[0009] The storage module is used to store the received sub-data, and the storage depth of the storage module is K. When the storage module receives a sub-data, the count value in the counting module corresponding to the storage module is self-incremented. When the storage module sends out a sub-data, the count value in the counting module corresponding to the storage module is self-decremented. K is an integer greater than 1.
[0010] The discarding module is used to determine a reference value according to the count values of the M counting modules after receiving the pause instruction, send a maintain sending instruction to the serial module corresponding to the counting module whose count value does not meet the reference value, and send a stop sending instruction to the serial module corresponding to the counting module whose count value meets the reference value, until all the M serial modules receive the stop sending instruction.
[0011] The serial module is used to receive sub-data from the corresponding storage module when the pause instruction is not received, and send the received sub-data to the computing module corresponding to the serial module; after receiving the pause instruction, if the maintain sending instruction is received, the sub-data sent by the corresponding storage module will continue to be received, and the sub-data will continue to be sent to the corresponding computing module; if the stop sending instruction is received, the sub-data sent by the corresponding storage module will stop being received, and the sub-data will stop being sent to the corresponding computing module; when the M serial modules all receive the stop sending instruction, no data will be sent to the computing module, and the M serial modules will execute the operation of sending sub-data to the pause module, and send the first sub-data of the storage module sending port corresponding to the M serial modules to the pause module, and then the corresponding storage module is cleared.
[0012] The recording module is used to update the record value according to the index value of the sub-data split from the data splitting module when the pause instruction is not received, and to update the record value according to the pause value sent by the comparison module in the pause module after receiving the record pause value instruction.
[0013] The calculation module is used to perform calculation processing on the received sub-data.
[0014] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, a data processing system supporting pause operation provided by the present invention can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:
[0015] The present invention provides a data processing system supporting pause operation, the system comprising: a data preparation module, a selection module, M storage modules, M serial modules, M calculation modules, a pause module and a discard module, wherein the data preparation module comprises a data splitting module and a recording module, the pause module comprises a comparison module, the discard module comprises M counting modules, one storage module has a corresponding serial module and a counting module, one serial module has a corresponding calculation module, and M is an integer greater than 1. The pause module is used to send a pause instruction to the data preparation module, the M serial modules and the discard module, the comparison module is used to compare the M sub-data obtained from the M serial modules, obtain the minimum value of the index value corresponding to each sub-data as the pause value, and send the pause value and the instruction to record the pause value to the recording module. The data splitting module is used to receive the data to be processed when the pause instruction is not received or after receiving the external resume instruction, split the data to be processed to obtain sub-data according to the record value in the recording module, send the split sub-data to the recording module, record the index value corresponding to the sub-data that has been sent, and send the sub-data to the selection module at the same time. After receiving the pause instruction, the splitting of the data to be processed is suspended. The selection module is used to determine a storage module from the M storage modules as the target module corresponding to the sub-data in a polling manner when receiving the sub-data, and send the sub-data to the target module. The storage module is used to store the received sub-data, and the storage depth of the storage module is K. When the storage module receives a sub-data, the count value in the counting module corresponding to the storage module is incremented, and when the storage module sends a sub-data, the count value in the counting module corresponding to the storage module is decremented, and K is an integer greater than 1. The discarding module is used to determine a reference value according to the count values of the M counting modules after receiving the pause instruction, send a maintain sending instruction to the serial module corresponding to the counting module whose count value does not meet the reference value, and send a stop sending instruction to the serial module corresponding to the counting module whose count value meets the reference value, until all the M serial modules receive the stop sending instruction.The serial module is used to receive sub-data from the corresponding storage module when the pause instruction is not received, and send the received sub-data to the calculation module corresponding to the serial module. After receiving the pause instruction, if the maintain sending instruction is received, the sub-data sent by the corresponding storage module will continue to be received, and the sub-data will continue to be sent to the corresponding calculation module. If the stop sending instruction is received, the sub-data sent by the corresponding storage module will stop being received, and the sub-data will stop being sent to the corresponding calculation module. When the M serial modules all receive the stop sending instruction, they will no longer send any data to the calculation module. The M serial modules perform the operation of sending sub-data to the pause module, send the first sub-data of the storage module sending port corresponding to the M serial modules to the pause module, and then clear the corresponding storage module. The recording module is used to update the record value according to the index value of the sub-data split from the data splitting module when the pause instruction is not received, and update the record value according to the pause value sent by the comparison module in the pause module after receiving the record pause value instruction. The calculation module is used to perform calculation processing on the received sub-data.
[0016] It can be seen that when a pause occurs, the counting module corresponding to the storage module is used to align the number of sub-data in each storage module, then the data to be sent in the storage module is cleared, and the starting value of the next transmission is recorded, thereby achieving a quick response to the pause situation. In addition, the bit width of the counting module is determined by the depth of the storage module, occupying a very small storage bit width, reducing resource consumption, and the recording module is used to quickly and accurately continue to execute sub-data splitting and transmission processing when pausing and resuming, thereby improving the response efficiency of pausing and resuming. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A schematic diagram of the structure of a data processing system supporting pause operation provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] This embodiment provides a data processing system that supports pause operation. Figure 1 , is a structural diagram of a data processing system supporting a pause operation provided by an embodiment of the present invention, the system comprising: a data preparation module, a selection module, M storage modules, M serial modules, M calculation modules, a pause module and a discard module, wherein the data preparation module comprises a data splitting module and a recording module, the pause module comprises a comparison module, the discard module comprises M counting modules, one storage module has a corresponding serial module and a counting module, one serial module has a corresponding calculation module, and M is an integer greater than 1;
[0021] The pause module is used to send a pause instruction to the data preparation module, the M serial modules and the discard module, and the comparison module is used to compare the M sub-data obtained from the M serial modules, obtain the minimum value of the index value corresponding to each sub-data as the pause value, and send the pause value and the instruction to record the pause value to the recording module;
[0022] The data splitting module is used to receive the data to be processed when the pause instruction is not received or after receiving the external resume instruction, split the data to be processed to obtain sub-data according to the record value in the recording module, send the split sub-data to the recording module, record the index value corresponding to the sub-data that has been sent, and send the sub-data to the selection module at the same time, and suspend the splitting of the data to be processed after receiving the pause instruction;
[0023] The selection module is used for, upon receiving the sub-data, determining one storage module from the M storage modules in a polling manner as a target module corresponding to the sub-data, and sending the sub-data to the target module;
[0024] The storage module is used to store the received sub-data, the storage depth of the storage module is K, when the storage module receives a sub-data, the count value in the counting module corresponding to the storage module is incremented, when the storage module sends a sub-data, the count value in the counting module corresponding to the storage module is decremented, K is an integer greater than 1;
[0025] The discarding module is used to, after receiving the pause instruction, determine a reference value according to the count values of the M counting modules, send a maintain-send instruction to the serial module corresponding to the counting module whose count value does not meet the reference value, and send a stop-send instruction to the serial module corresponding to the counting module whose count value meets the reference value, until all the M serial modules receive the stop-send instruction;
[0026] The serial module is used for receiving sub-data from the corresponding storage module when the pause instruction is not received, and sending the received sub-data to the calculation module corresponding to the serial module; after receiving the pause instruction, if the maintain sending instruction is received, the sub-data sent by the corresponding storage module continues to be received, and the sub-data continues to be sent to the corresponding calculation module; if the stop sending instruction is received, the sub-data sent by the corresponding storage module is stopped, and the sub-data is stopped to be sent to the corresponding calculation module; when the M serial modules all receive the stop sending instruction, the M serial modules execute the sub-data sending operation to the pause module, send the first sub-data of the storage module sending port corresponding to the M serial modules respectively to the pause module, and then clear the corresponding storage module;
[0027] The recording module is used to update the recording value according to the index value of the sub-data split from the data splitting module when the pause instruction is not received, and to update the recording value according to the pause value sent by the comparison module in the pause module after receiving the record pause value instruction;
[0028] The calculation module is used to perform calculation processing on the received sub-data.
[0029] Among them, when a system error occurs, M computing units are shared by multiple users and the time slice allocated to one of the users is used up, the system needs to be paused for system maintenance or user switching. Accordingly, the pause operation corresponds to a recovery operation.
[0030] Specifically, when no pause instruction is received or after receiving an external resume instruction, the data splitting module continues to split sub-data from the data to be processed. Every time a sub-data is obtained, the index value corresponding to the sub-data is sent to the recording module to update the recording value, and the sub-data is sent to the selection module. The selection module sends the sub-data to one of the M storage modules in a polling manner. It can be seen that M consecutive sub-data must be sent to different storage modules. The serial module can send the received sub-data to the calculation module for calculation in a multi-cycle sending manner. In this embodiment, one sub-data corresponds to four cycles of the serial module.
[0031] After receiving the pause instruction, the data splitting module pauses the splitting of the data to be processed, so no new sub-data will be generated, and no new sub-data will enter the selection module and the storage module accordingly. However, the number of remaining sub-data in each storage module may be different at this time, and the storage module needs to be cleared after the pause. If the clearing operation is performed directly, the cleared sub-data may not be sent to the calculation module when the system is restored. Therefore, the discarding module determines the reference value according to the count values of the M counting modules, and sends a maintain sending instruction to the serial module corresponding to the counting module whose count value does not meet the reference value, so that the serial module continues to read the sub-data from the corresponding storage module, and sends a stop sending instruction to the serial module corresponding to the counting module whose count value meets the reference value. When the M serial modules all receive the stop sending instruction, the M serial modules execute the sub-data sending operation , send the first sub-data of the storage module sending port corresponding to the M serial modules to the pause module, the comparison module in the pause module compares the M sub-data of the M storage module sending ports, obtains the minimum value as the pause value, sends the pause value and the record pause value instruction to the recording module, when there are still sub-data in the storage module, the corresponding serial module continues to clear the corresponding storage module through reading and discarding operations, because the serial module is connected to the corresponding storage module, the serial module can read the sub-data to be sent by the corresponding storage module, if the storage module does not contain any sub-data, the serial module reading result is empty, when the index values corresponding to the sub-data of the storage module sending ports corresponding to the M serial modules are all empty, it means that all storage modules are cleared at this time, there is no need to use the pause value to update the record value, and the record value can be directly used for continued splitting when recovering.
[0032] Since the depth of a single storage module is K, the number of sub-data that can be stored in a single storage module is in the range of [0, K], and the counting module corresponding to the storage module only needs h[log2(K+1)] bits, where h[] is a rounding-up function.
[0033] In one embodiment, the discarding module can determine a reference value based on the count values of M counting modules. If the count value is not equal to the reference value, a maintain sending instruction corresponding to the difference is sent to the serial module corresponding to the counting module, so that the serial module continues to read a number of sub-data from the corresponding storage module. If the count value is equal to the reference value, a stop sending instruction is sent to the serial module corresponding to the counting module. After all the maintain sending instructions are executed, a discard instruction is uniformly sent to each serial module. The discard instruction can instruct the serial module to clear the corresponding storage module through reading and discarding operations.
[0034] In a specific implementation manner, the data to be processed is grid data, the grid data includes Z×Y×X work group data, and the index value corresponding to the i-th work group data split by the data splitting module is (z i ,y i , x i ), x i is an integer in the range [0, X-1], y i is an integer in the range [0, Y-1], z i is an integer in the range [0, Z-1];
[0035] Correspondingly, the step of splitting the to-be-processed data into sub-data according to the record value in the record module includes:
[0036] When the data splitting module receives the pause instruction and the resume instruction, it uses the record value in the record module as the initial value, and splits the work group data corresponding to the initial value from the grid data to be processed as the first sub-data.
[0037] Among them, assuming that the size of the grid data, that is, the grid data, is 3×3×3, the index value sequence of the workgroup data, that is, the workgroup data, can be expressed as (0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 2, 0), (0, 2, 1), (0, 2, 2), (1, 0, 0), (1, 0, 1), (1, 0, 2)…, and so on.
[0038] In a specific embodiment, M=4.
[0039] Among them, in this embodiment, the system can include 4 storage modules, each storage module has a corresponding serial module and a counting module, and each serial module has a corresponding computing module. Then the system includes 4 storage modules, 4 serial modules, 4 computing modules and 4 counting modules.
[0040] In a specific implementation, when the sub-data is received, determining one storage module from the M storage modules in a polling manner as a target module corresponding to the sub-data includes:
[0041] According to the index value (z i ,y i , x i ), converted to a decimal reference value f i =x i +(y i -1)×X+(z i -1)×X×Y;
[0042] The target identifier g is determined in a polling arbitration manner, and the storage module with the module identifier g is determined as the target module.
[0043] Each storage module has a corresponding module identifier, and the range of the module identifier is an integer in the range of [1, M].
[0044] In a specific embodiment, K=4;
[0045] Correspondingly, the bit width of the counter corresponding to the counting module is 3 bits.
[0046] In this embodiment, K is 4, so a single storage module can store sub-data in the range of [0, 4], and the counting module corresponding to the storage module only needs h[log2(4+1)]=3 bits, that is, the bit width of the counter corresponding to the counting module is 3 bits.
[0047] In a specific implementation, updating the record value according to the sub-data received from the data splitting module includes:
[0048] The index value corresponding to the sub-data received from the data splitting module is increased by one to obtain a first update value, and the record value is updated with the first update value.
[0049] In a specific implementation, updating the record value according to the pause value includes:
[0050] The pause value is used as a second update value, and the record value is updated with the second update value.
[0051] Among them, since the record value is updated as the sub-data is split, the split sub-data may be located in the storage module after the pause operation, so the pause value is less than or equal to the record value, so the record value can be directly updated using the pause value as the second update value.
[0052] In this embodiment, when a pause occurs, the counting module corresponding to the storage module is used to align the number of sub-data in each storage module, thereby achieving a quick response to the pause situation. The bit width of the counting module is determined by the depth of the storage module, occupying an extremely small storage bit width, thereby reducing resource consumption. The recording module is used to quickly and accurately continue to execute sub-data splitting and transmission processing when pausing and resuming, thereby improving the response efficiency of pausing and resuming.
[0053] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A data processing system supporting a pause operation, characterized in that: The system comprises: a data preparation module, a selection module, M storage modules, M serial modules, M calculation modules, a pause module and a discard module, wherein the data preparation module comprises a data splitting module and a recording module, the pause module comprises a comparison module, the discard module comprises M counting modules, one storage module has a corresponding serial module and a counting module, one serial module has a corresponding calculation module, and M is an integer greater than 1; The pause module is used to send a pause instruction to the data preparation module, the M serial modules and the discard module, and the comparison module is used to determine a pause value according to the M sub-data obtained from the M serial modules, and send the pause value and a record pause value instruction to the recording module; The data splitting module is used to receive the data to be processed, split the data to be processed to obtain sub-data, send the split sub-data to the recording module and the selection module, and suspend the splitting of the data to be processed after receiving the pause instruction; The selection module is used to determine the target module corresponding to the sub-data from the M storage modules when receiving the sub-data, and send the sub-data to the target module; The storage module is used to store the received sub-data, and the counting module corresponding to the storage module is used to record the number of sub-data in the storage module; The discarding module is used to determine a reference value according to the count values of the M counting modules after receiving the pause instruction, and send a maintain sending instruction or a stop sending instruction to the serial module according to the reference value; The serial module is used for, after receiving the pause instruction, continuing to receive and send the sub-data if receiving the maintain sending instruction, and stopping receiving and sending the sub-data if receiving the stop sending instruction; The recording module is used to update the recording value according to the pause value sent by the comparison module after receiving the recording pause value instruction.
2. The data processing system supporting the suspend operation according to claim 1, characterized in that: The data to be processed is grid data, the grid data includes Z×Y×X work group data, and the index value corresponding to the i-th work group data split by the data splitting module is (z i ,y i , x i ), x i is an integer in the range [0, X-1], y i is an integer in the range [0, Y-1], z i is an integer in the range [0, Z-1]; Accordingly, the step of splitting the data to be processed to obtain sub-data includes: When the data splitting module receives the pause instruction and the resume instruction, it uses the record value in the record module as the initial value, and splits the work group data corresponding to the initial value from the grid data to be processed as the first sub-data.
3. The data processing system supporting the suspend operation according to claim 2, characterized in that: M=4。 4. The data processing system supporting the suspend operation according to claim 3, characterized in that: The step of determining a target module corresponding to the sub-data from the M storage modules upon receiving the sub-data comprises: The target identifier g is determined in a polling arbitration manner, and the storage module with the module identifier g is determined as the target module.
5. The data processing system supporting the suspend operation according to claim 1, characterized in that: The storage depth of the storage module is K, K=4; Correspondingly, the bit width of the counter corresponding to the counting module is 3 bits.
6. The data processing system supporting the suspend operation according to claim 1, characterized in that: The recording module is further configured to update the recording value according to the index value of the sub-data split from the data splitting module when the pause instruction is not received; The updating of the record value according to the index value of the sub-data split from the data splitting module includes: The index value corresponding to the sub-data received from the data splitting module is increased by one to obtain a first update value, and the record value is updated with the first update value.
7. The data processing system supporting the suspend operation according to claim 1, characterized in that: The updating of the record value according to the pause value sent by the comparison module includes: The pause value is used as a second update value, and the record value is updated with the second update value.
8. The data processing system supporting the suspend operation according to claim 1, characterized in that: When the M serial modules all receive the stop sending instruction, they will no longer send any data to the computing module. The M serial modules execute the sub-data sending operation to the pause module, send the first sub-data of the storage module sending port corresponding to the M serial modules to the pause module, and then clear the corresponding storage module.
Citation Information
Patent Citations
Network device
CN109391559A
Data transmission method and system, electronic equipment and storage medium
CN119292978A