3D-FFT task allocation method and device, equipment and storage medium
By dividing the calculation unit into a processing unit and a forwarding unit, and using the method of transit data transmission, the problem of inequality in 3D-FFT tasks in certain point-number scenarios is solved, and the saving of computing resources and the improvement of computing efficiency is achieved.
Patent Information
- Application Number
- CN202411648909.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-11
AI Technical Summary
When implementing 3D-FFT, the prior art cannot completely divide the calculation tasks, resulting in the inability to effectively allocate the calculation tasks in certain point scenarios.
By dividing the calculation unit into a processing unit and a forwarding unit, the processing unit participates in the FFT task processing, and the forwarding unit does not participate in the FFT task processing. Data transmission is performed directly between connected computing units, while data transmission is performed between unconnected computing units through the transit computing unit to achieve equal distribution of FFT tasks.
It realizes the equalization processing of 3D-FFT tasks while saving computing resources, thereby improving computing efficiency and performance.
Smart Images

Figure CN119597468A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a 3D-FFT task allocation method, device, equipment, and storage medium. Background Art
[0002] 3D-FFT (Fast Fourier Transform) is to perform FFT operations in the x, y, and z directions on three-dimensional data in sequence.
[0003] In order to save computing time when implementing 3D-FFT, existing methods will evenly distribute the FFT computing tasks to each computing unit.
[0004] However, the existing methods cannot completely evenly distribute the computational tasks for some 3D-FFT scenarios with a certain number of points. Summary of the invention
[0005] In order to solve one of the above-mentioned technical defects, the present application provides a 3D-FFT task allocation method, device, equipment, and storage medium.
[0006] In the first aspect of the present application, a 3D-FFT task allocation method is provided, wherein the computing unit executing the task is in each U direction of x, y, and z. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N Calculate the total number of units in a single direction;
[0007] The method includes:
[0008] The FFT sequence in the x direction of the 3D data is transmitted to the processing unit through the forwarding unit;
[0009] Performing x-direction FFT processing on the 3D data through the processing unit;
[0010] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit;
[0011] Performing FFT processing in the y direction on the 3D data processed in the x direction by the processing unit;
[0012] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit;
[0013] The processing unit performs FFT processing in the z direction on the 3D data processed in the y direction.
[0014] Optionally, the computing unit in each direction processes P N ×P N Group computing tasks; where P N It is the number of 3D-FFT task points;
[0015] The number of processing units is And the processing units are closely connected in space, where This is the round-up operation.
[0016] Optionally, the coordinates are in units (U x , U y , U z )'s processing unit processes the 3D data coordinates in the x direction as follows:
[0017] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction;
[0018] If P N =12andU N =4, then
[0019] Optionally, after the processing unit performs FFT processing on the 3D data in the x direction, the method further includes:
[0020] The processed coordinates in the x direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit;
[0021] Among them, if P N =12andU N =4, then
[0022] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit, including:
[0023] The FFT sequence in the y direction of the aggregated 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0024] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the y direction, and the 3D data coordinates after processing in the x direction are
[0025] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, is the coordinate of the 3D data in the z direction after processing in the x direction;
[0026] If P N =12andU N =4, then
[0027] Optionally, after performing FFT processing in the y direction on the 3D data processed in the x direction by the processing unit, the method further includes:
[0028] The processed coordinates in the y direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit;
[0029] Among them, if P N =12andU N =4, then
[0030] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit, including:
[0031] The FFT sequence in the z direction of the aggregated 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0032] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are
[0033] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, is the coordinate of the 3D data in the z direction after processing in the y direction;
[0034] If P N =12andU N =4, then
[0035] In the second aspect of the application, a 3D-FFT task allocation device is provided, wherein the computing unit executing the task is U in each of the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N Calculate the total number of units in a single direction;
[0036] The device includes:
[0037] A first transmission module, used for transmitting the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit;
[0038] A first processing module, configured to perform x-direction FFT processing on the 3D data through a processing unit;
[0039] A second transmission module is used to transmit the FFT sequence in the y direction of the 3D data processed in the x direction to the processing unit through the forwarding unit;
[0040] The second processing module is used to perform FFT processing in the y direction on the 3D data processed in the x direction through the processing unit;
[0041] A third transmission module, used for transmitting the FFT sequence in the z direction of the 3D data processed in the y direction to the processing unit through the forwarding unit;
[0042] The third processing module is used to perform FFT processing in the z direction on the 3D data processed in the y direction through the processing unit.
[0043] In a third aspect of the present application, an electronic device is provided, including:
[0044] Memory;
[0045] Processor; and
[0046] Computer programs;
[0047] The computer program is stored in the memory and is configured to be executed by the processor to implement the method as described in the first aspect above.
[0048] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the method described in the first aspect above.
[0049] The present application provides a 3D-FFT task allocation method, device, equipment, and storage medium, wherein the computing unit that performs the task is in each U in the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N is the total number of calculation units in a single direction; the method transmits the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit; the 3D data is subjected to FFT processing in the x direction by the processing unit; the FFT sequence in the y direction of the 3D data after the x direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the x direction processing is subjected to FFT processing in the y direction by the processing unit; the FFT sequence in the z direction of the 3D data after the y direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the y direction processing is subjected to FFT processing in the z direction by the processing unit.
[0050] This method arranges U in each dimension in three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0052] Figure 1 A schematic diagram of a computing unit provided in an embodiment of the present application;
[0053] Figure 2 A schematic diagram of data transmission of a computing unit provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of a forwarding unit and a processing unit provided in an embodiment of the present application;
[0055] Figure 4 A flowchart of a 3D-FFT task allocation method provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of x-direction allocation provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of y-direction allocation provided in an embodiment of the present application;
[0058] Figure 7 A schematic diagram of the structure of a 3D-FFT task allocation device provided in an embodiment of the present application;
[0059] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0061] In the process of implementing this application, the inventor found that in order to save computing time when implementing 3D-FFT, the existing method will divide the FFT computing task equally among various computing units. However, for some 3D-FFT scenarios with a certain number of points, the computing task cannot be completely evenly divided by the existing method.
[0062] In view of the above problems, the present application provides a 3D-FFT task allocation method, device, equipment, and storage medium, wherein the computing unit executing the task is in each U in the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N is the total number of calculation units in a single direction; the method transmits the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit; the 3D data is subjected to FFT processing in the x direction by the processing unit; the FFT sequence in the y direction of the 3D data after the x direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the x direction processing is subjected to FFT processing in the y direction by the processing unit; the FFT sequence in the z direction of the 3D data after the y direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the y direction processing is subjected to FFT processing in the z direction by the processing unit.
[0063] The 3D-FFT task allocation method, device, equipment, and storage medium provided in the present application are a 3D-FFT task allocation method, device, equipment, and storage medium based on a three-dimensional processing system. In this method, U is arranged in each dimension in a three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance.
[0064] This embodiment provides a 3D-FFT task allocation method, in which the computing units that perform the tasks are arranged and connected in a three-dimensional structure. That is, the computing units are arranged in the x, y, and z directions. N The connected computing units can directly transmit data, while the unconnected computing units cannot directly transmit data. Data is transferred through the computing units between them (that is, the connected computing units can directly transmit data, while the unconnected computing units cannot directly transmit data. Data needs to be transferred through the intermediate computing units for transmission). N is the total number of computing units in a single direction. Therefore, the computing units form a three-dimensional computing structure. For example, The three-dimensional structure of a computing unit is U N ×U N ×U N , that is, U in the x, y, and z directions N A computing unit.
[0065] like Figure 1 As shown, the 4×4×4 computing unit (i.e., U N =4) are arranged and connected in a three-dimensional structure. Spatially adjacent chips can directly exchange data, for example, (1,1,1) is connected to the computing units (1,1,0), (1,0,1), (0,1,1), (1,1,2), (1,2,1), (2,1,1) in the surrounding six directions. Four chips in the same dimension form a loop, such as Figure 2 As shown. (0, 0, 0) and (3, 0, 0) can also transmit data directly. If the computing unit (0, 0, 0) wants to transmit data to (2, 0, 0), it needs to be transferred through (1, 0, 0), that is, (0, 0, 0) first transmits the data to (1, 0, 0), and (1, 0, 0) then transmits the data to (2, 0, 0). In this way, data transmission between all computing units can be realized.
[0066] In addition, in the specific implementation, the computing units can be divided into processing units and forwarding units according to the FFT task, where the processing unit participates in the FFT task processing, and the forwarding unit does not participate in the FFT task processing. For example, the computing tasks required for each level of calculation are counted. In order to evenly divide the computing tasks, some computing units are selectively allowed to only forward and not participate in the computing tasks. These computing units that do not participate in the computing tasks are forwarding units, and other computing units are processing units. N =4 as an example, according to the FFT task, the last column of computing units in the x direction does not participate in the computing task, so it is a forwarding unit, and the other computing units are processing units. Figure 3 The medium-dark gray is the processing unit, and the light gray is the forwarding unit. The processing unit is used not only for data transmission and reception, but also for executing tasks; the forwarding unit is only used for data transmission and reception, not for executing tasks.
[0067] The computing unit in each direction processes P N ×P N A set of 3D data. Among them, P N is the total number of 3D data sets processed by the computing unit in a single direction. The number of processing units is The rest are forwarding units, and the processing units are closely connected in space. N 3D-FFT of points, each dimension needs to process P N ×P N Group computing tasks, where P N is the number of 3D-FFT task points. N ×U N ×U N Three-dimensional computing structure, each computing unit processes Group calculation tasks, round up the number of groups to get in, is a round-up operation. is the number of processing units, and the rest are forwarding units. In addition, the processing units are closely connected in space.
[0068] See also Figure 4 The implementation process of the 3D-FFT task allocation method provided in this embodiment is as follows:
[0069] 401 , transmitting the FFT sequence in the x direction of the 3D data to a processing unit.
[0070] If the coordinates of the processing unit are unit(U x , U y , U z ), the 3D data coordinates are data(P x , P y , P z), then the FFT sequence in the x direction of the 3D data will be forwarded to each processing unit through the forwarding unit. The 3D data is assigned to the coordinate unit (U x , U y , U z ) processing unit.
[0071] Among them, the character in the lower right corner represents the direction, such as The y in the lower right corner indicates the y direction, and the character in the upper right corner indicates the direction of FFT processing, such as The x in the upper right corner indicates that FFT processing is performed in the x direction. x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction.
[0072] If P N =12andU N =4 (i.e., 4×4×4 computing units perform 12-point 3D-FFT tasks), then
[0073] Taking the 12-point 3D-FFT task allocation of 4×4×4 computing units as an example, PN=12, and the coordinates of the processing unit are unit(U x , U y , U z ), the 3D data coordinates are data(P x , P y , P z ). Among them, U x ∈[1,4],U y ∈[1,4],U z ∈[1,4],P x ∈[1, 12], P y ∈[1, 12], P z ∈[1, 12]. Before performing the x-direction FFT processing, the x-direction FFT sequences in the 144 sets of 3D data are transmitted to the 3×4×4 processing units through step 401, such as Figure 3 The dark gray computing units (i.e., processing units) in the figure each process 3 groups. The light gray computing units (i.e., forwarding units) do not store data and only forward data during transmission. At this time, the coordinate unit (U x , U y , Uz ) The coordinates of the 3D data stored in in,
[0074] For example, Figure 5 The processing units in the calculation plane z=1 shown on the right side have the coordinates of the 3D data assigned to each processing unit in the calculation plane z=1 after completing step 401 as shown in Table 1:
[0075] Table 1
[0076]
[0077]
[0078] 402 , performing x-direction FFT processing on the 3D data by a processing unit.
[0079] In this step, the processing unit performs x-direction FFT processing on the x-direction FFT sequence of the 3D data allocated to the processing unit in step 401 .
[0080] For example, the coordinates are unit(U x , U y , U z )'s processing unit processes the 3D data coordinates in the x direction as follows:
[0081] Still taking the calculation plane of z=1, For example, the coordinates after completing the x-direction FFT processing in step 402 are shown in Table 2:
[0082] Table 2
[0083]
[0084] In addition, after executing step 402, the processed coordinates in the x direction are also The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0085] If P N =12andU N =4 (i.e., 4×4×4 computing units perform 12-point 3D-FFT tasks), then
[0086] Still Figure 3 As shown, P N =12, that is After obtaining the 3D data processed in the x direction shown in Table 2, the 3D data processed in the x direction will be sent to the same processing unit. At this time, the data coordinates stored in the calculation plane processing unit of z=1 are shown in Table 3:
[0087] Table 3
[0088]
[0089] 403 , transmitting the FFT sequence in the y direction of the 3D data processed in the x direction to a processing unit.
[0090] The FFT sequence in the y direction of the aggregated 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0091] If the coordinates are The 3D data is assigned to the coordinate unit (U x , U y , U z ) processing unit.
[0092] in, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, It is the coordinate of the 3D data in the z direction after processing in the x direction.
[0093] If P N =12andU N =4 (i.e., 4×4×4 computing units perform 12-point 3D-FFT tasks), then
[0094] For example, in step 403, transmission is started, and the FFT sequence in the y direction of the 3D data processed in the x direction is sent to the processing unit for FFT processing in the y direction. After transmission, each processing unit unit (U x , U y , U z ) The 3D data coordinates stored in
[0095] For example, P N =12, like Figure 6 The four processing units in the x=1, y=1 direction shown on the right have the coordinates of the 3D data assigned to the four processing units in the x=1, y=1 direction after completing step 403 as shown in Table 4:
[0096] Table 4
[0097]
[0098] 404 , performing FFT processing in the y direction on the 3D data processed in the x direction by a processing unit.
[0099] For example, the coordinates are unit(U x , U y , U z The 3D data coordinates after the processing in the x direction obtained by the processing unit of the ) in the y direction processing step 402 are
[0100] Still with P N =12, Taking the four processing units in the direction of x=1, y=1 as an example, the coordinates after completing the FFT processing in the y direction of step 404 are shown in Table 5:
[0101] Table 5
[0102]
[0103] In addition, after executing step 404, the processed coordinates in the y direction are also The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0104] If P N =12andU N =4 (i.e., 4×4×4 computing units perform 12-point 3D-FFT tasks), then
[0105] Still Figure 4 As shown, P N =12, that is After obtaining the 3D data processed in the y direction shown in Table 5, the 3D data processed in the y direction will be sent to the same processing unit. At this time, the data coordinates stored in the four processing units in the x=1, y=1 directions are shown in Table 6:
[0106] Table 6
[0107]
[0108] 405 , transmitting the FFT sequence in the z direction of the 3D data processed in the y direction to a processing unit.
[0109] The FFT sequence in the z direction of the aggregated 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0110] If the coordinates are The 3D data is assigned to the coordinate unit (U x , U y, U z ) processing unit.
[0111] in, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, It is the coordinate of the 3D data in the z direction after processing in the y direction.
[0112] If P N =12andU N =4 (i.e., 4×4×4 computing units perform 12-point 3D-FFT tasks), then
[0113] For example, in step 405, transmission is started, and the 3D data processed in the y direction is sent to the processing unit for FFT processing in the z direction. After transmission, each processing unit unit (U x , U y , U z ) is stored in the data coordinates
[0114] 406 , performing FFT processing in the z direction on the 3D data processed in the y direction by a processing unit.
[0115] For example, the coordinates are unit(U x , U y , U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are
[0116] This completes the allocation and processing of FFT tasks, which can ensure that FFT tasks are evenly distributed, saving computing resources while ensuring performance.
[0117] 3D-FFT is to perform FFT processing on the data in the three directions of x, y, and z respectively. In order to save computing time, the computing tasks are assigned to multiple processing units. Therefore, the 3D-FFT task allocation method provided in this embodiment transmits the 3D data to be processed before performing FFT processing in each direction, so that each group of FFT data in the corresponding direction is in the same processing unit. For example: before performing the FFT processing operation in the x direction in step 402, the FFT sequence in the x direction of the 3D data will be transmitted through step 401, so that each group of data in the x direction is in the same processing unit, thereby performing FFT calculation in the x direction. After completing the FFT calculation in the x direction, the FFT sequence in the y direction of the 3D data processed in the x direction is transmitted through step 403, so that each group of data in the y direction is in the same processing unit. Similarly, after executing step 404 to complete the FFT processing in the y direction, the FFT sequence in the z direction of the 3D data processed in the y direction is transmitted through step 405, so that each group of data in the z direction is in the same processing unit.
[0118] The 3D-FFT task allocation method provided in this embodiment is a new task allocation scheme, which selects to reduce the use of some computing units so that the computing tasks can be evenly distributed, thereby saving computing resources while ensuring performance.
[0119] For example, to implement 12-point 3D-FFT based on 4×4×4 computing units, 144 groups of FFT sequences need to be processed when calculating each dimension. It is impossible to evenly distribute the computing tasks to all computing units. The existing solution is that each of the 48 computing units processes 2 groups of FFTs, and each of the remaining 16 computing units processes 3 groups of FFTs. The existing method cannot evenly divide the tasks. The 3D-FFT task allocation method provided by this embodiment uses 48 computing units for calculation. Then the 48 computing units are processing units, each processing unit processes 3 groups, and the remaining 16 computing units are forwarding units. The forwarding unit does not perform task processing and is only used for forwarding during data transmission. Based on the algorithm characteristics of 3D-FFT, each round of calculation is an alternate generation relationship, so the calculation time of the 3D-FFT task allocation method provided in this embodiment is the same as that of the existing method. Thereby saving the computing resources of the forwarding unit without increasing the computing time. The 3D-FFT task allocation method provided in this embodiment saves some computing resources without increasing the computing cycle by adjusting the computing task allocation.
[0120] In addition to the above 4×4×4 scenario, the 3D-FFT task allocation method provided in this embodiment is also applicable to other scenarios such as the task allocation of 8×8×8 computing units to implement 48-point 3D-FFT, or the task allocation of 8×8×8 computing units to implement 56-point 3D-FFT. For example, in molecular dynamics, when long-range force analysis is performed by 3D-FFT (such as performing 48-point 3D-FFT in some small systems), when the computing unit is an 8×8×8 structure, the existing 3D-FFT task allocation method cannot evenly divide the task. The 3D-FFT task allocation method provided in this embodiment only divides the computing tasks into 6×8×8 processing units, thereby saving computing units.
[0121] This embodiment provides a 3D-FFT task allocation method, in which the computing units that perform the tasks are each U in the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N is the total number of calculation units in a single direction; the method transmits the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit; the 3D data is subjected to FFT processing in the x direction by the processing unit; the FFT sequence in the y direction of the 3D data after the x direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the x direction processing is subjected to FFT processing in the y direction by the processing unit; the FFT sequence in the z direction of the 3D data after the y direction processing is transmitted to the processing unit through the forwarding unit; the 3D data after the y direction processing is subjected to FFT processing in the z direction by the processing unit.
[0122] In this method, U is arranged along each dimension in three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance.
[0123] Based on the same inventive concept of the 3D-FFT task allocation method, this embodiment provides a 3D-FFT task allocation device, wherein the computing unit executing the task is in each U direction of x, y, and z. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them. According to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing. N Calculates the total number of units in a single direction.
[0124] See also Figure 7 , the device comprises:
[0125] The first transmission module 701 is used to transmit the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit.
[0126] The first processing module 702 is configured to perform x-direction FFT processing on the 3D data through a processing unit.
[0127] The second transmission module 703 is used to transmit the FFT sequence in the y direction of the 3D data processed in the x direction to the processing unit through the forwarding unit.
[0128] The second processing module 704 is configured to perform FFT processing in the y direction on the 3D data processed in the x direction through a processing unit.
[0129] The third transmission module 705 is used to transmit the FFT sequence in the z direction of the 3D data processed in the y direction to the processing unit through the forwarding unit.
[0130] The third processing module 706 is configured to perform FFT processing in the z direction on the 3D data processed in the y direction through a processing unit.
[0131] Among them, the computing unit in each direction processes P N ×PN Group computing tasks. Among them, P N is the number of 3D-FFT task points.
[0132] The number of processing units is And the processing units are closely connected in space, where This is the round-up operation.
[0133] Among them, the coordinates are unit (U x , U y , U z )'s processing unit processes the 3D data coordinates in the x direction as follows:
[0134] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction.
[0135] If P N =12andU N =4, then
[0136] The device further comprises:
[0137] The first aggregation module is used to convert the processed x-direction coordinates into The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0138] Among them, if P N =12andU N =4, then
[0139] The second transmission unit 703 is used to transmit the FFT sequence in the y direction of the aggregated 3D data after processing in the x direction to the processing unit through the forwarding unit.
[0140] Among them, the coordinates are unit (U x , U y , U z ) is processed in the y direction, and the 3D data coordinates after processing in the x direction are
[0141] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, It is the coordinate of the 3D data in the z direction after processing in the x direction.
[0142] If P N =12andU N =4, then
[0143] The device further comprises:
[0144] The first aggregation module is used to convert the processed coordinates in the y direction into The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0145] Among them, if P N =12andU N =4, then
[0146] The third transmission module 705 is used to transmit the FFT sequence in the z direction of the aggregated 3D data after processing in the y direction to the processing unit through the forwarding unit.
[0147] Among them, the coordinates are unit (U x , U y , U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are
[0148] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, It is the coordinate of the 3D data in the z direction after processing in the y direction.
[0149] If P N =12andU N =4, then
[0150] The device provided in this embodiment has U arranged along each dimension in a three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance.
[0151] Based on the same inventive concept of the 3D-FFT task allocation method, this embodiment provides an electronic device, such as Figure 8 As shown, it includes: a memory 801, a processor 802, and a computer program.
[0152] The computer program is stored in the memory 801 and is configured to be executed by the processor 802 to implement the above 3D-FFT task allocation method.
[0153] The computing unit that performs the task is in the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them. According to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing. N Calculates the total number of units in a single direction.
[0154] The above 3D-FFT task allocation method includes:
[0155] The FFT sequence in the x direction of the 3D data is transmitted to the processing unit through the forwarding unit.
[0156] The processing unit performs x-direction FFT processing on the 3D data.
[0157] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0158] The processing unit performs FFT processing in the y direction on the 3D data processed in the x direction.
[0159] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0160] The processing unit performs FFT processing in the z direction on the 3D data processed in the y direction.
[0161] Optionally, the computing unit in each direction processes P N ×P N Group computing tasks. Among them, P N is the number of 3D-FFT task points.
[0162] The number of processing units is And the processing units are closely connected in space, where This is the round-up operation.
[0163] Optionally, the coordinates are in units (U x , U y , U z )'s processing unit processes the 3D data coordinates in the x direction as follows:
[0164] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction.
[0165] If P N =12andU N =4, then
[0166] Optionally, after the processing unit performs FFT processing on the 3D data in the x direction, the method further includes:
[0167] The processed coordinates in the x direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0168] Among them, if P N =12andU N =4, then
[0169] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit, including:
[0170] The FFT sequence in the y direction of the aggregated 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0171] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the y direction, and the 3D data coordinates after processing in the x direction are
[0172] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, It is the coordinate of the 3D data in the z direction after processing in the x direction.
[0173] If P N =12andU N =4, then
[0174] Optionally, after performing FFT processing in the y direction on the 3D data processed in the x direction by the processing unit, the method further includes:
[0175] The processed coordinates in the y direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0176] Among them, if P N =12andU N =4, then
[0177] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit, including:
[0178] The FFT sequence in the z direction of the aggregated 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0179] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are
[0180] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, It is the coordinate of the 3D data in the z direction after processing in the y direction.
[0181] If P N =12andU N =4, then
[0182] The electronic device provided by this embodiment has a computer program executed by a processor to arrange U in each dimension in a three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance.
[0183] Based on the same inventive concept of the 3D-FFT task allocation method, this embodiment provides a computer-readable storage medium, and a computer program is stored thereon. The computer program is executed by a processor to implement the above 3D-FFT task allocation method.
[0184] The computing unit that performs the task is in the x, y, and z directions. NThe connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them. According to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing. N Calculates the total number of units in a single direction.
[0185] The above 3D-FFT task allocation method includes:
[0186] The FFT sequence in the x direction of the 3D data is transmitted to the processing unit through the forwarding unit.
[0187] The processing unit performs x-direction FFT processing on the 3D data.
[0188] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0189] The processing unit performs FFT processing in the y direction on the 3D data processed in the x direction.
[0190] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0191] The processing unit performs FFT processing in the z direction on the 3D data processed in the y direction.
[0192] Optionally, the computing unit in each direction processes P N ×P N Group computing tasks. Among them, P N is the number of 3D-FFT task points.
[0193] The number of processing units is And the processing units are closely connected in space, where This is the round-up operation.
[0194] Optionally, the coordinates are in units (U x , U y , U z )'s processing unit processes the 3D data coordinates in the x direction as follows:
[0195] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction.
[0196] If P N =12andU N =4, then
[0197] Optionally, after the processing unit performs FFT processing on the 3D data in the x direction, the method further includes:
[0198] The processed coordinates in the x direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0199] Among them, if P N =12andU N =4, then
[0200] The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit, including:
[0201] The FFT sequence in the y direction of the aggregated 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
[0202] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the y direction, and the 3D data coordinates after processing in the x direction are
[0203] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, It is the coordinate of the 3D data in the z direction after processing in the x direction.
[0204] If P N =12andU N =4, then
[0205] Optionally, after performing FFT processing in the y direction on the 3D data processed in the x direction by the processing unit, the method further includes:
[0206] The processed coordinates in the y direction are The 3D data is aggregated to coordinates of unit (U x , U y , U z ) processing unit.
[0207] Among them, if P N =12andU N =4, then
[0208] The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit, including:
[0209] The FFT sequence in the z direction of the aggregated 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
[0210] Optionally, the coordinates are in units (U x , U y , U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are
[0211] Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, It is the coordinate of the 3D data in the z direction after processing in the y direction.
[0212] If P N =12andU N =4, then
[0213] The computer readable storage medium provided in this embodiment is executed by a processor to arrange U in each dimension in a three-dimensional space. N computing units, and There is a connection relationship between the computing units, which can transfer data; according to the computing task, The computing units are divided into processing units and forwarding units. The processing units participate in FFT task processing and data forwarding, while the forwarding units only participate in data forwarding. First, through data forwarding, the FFT processing tasks in the x dimension are evenly distributed to the processing units for x-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the y dimension to the processing units for y-direction calculations. After the processing is completed, data forwarding is performed to evenly distribute the FFT processing tasks in the z dimension to the processing units for z-direction calculations, thereby obtaining 3D-FFT results. By reducing the number of computing units that process FFT tasks, the FFT tasks are evenly distributed, which saves computing resources while ensuring performance.
[0214] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.
[0215] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0216] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0217] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0218] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0219] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A 3D-FFT task allocation method, characterized in that: The computing unit that performs the task is in the x, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N Calculate the total number of units in a single direction; The method comprises: The FFT sequence in the x direction of the 3D data is transmitted to the processing unit through the forwarding unit; Performing x-direction FFT processing on the 3D data by a processing unit; The FFT sequence in the y direction of the 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit; Performing FFT processing in the y direction on the 3D data processed in the x direction by the processing unit; The FFT sequence in the z direction of the 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit; The processing unit performs FFT processing in the z direction on the 3D data processed in the y direction.
2. The method according to claim 1, characterized in that The computing unit in each direction processes P2×P N Group computing tasks; Among them, P N It is the number of 3D-FFT task points; The number of processing units is And the processing units are closely connected in space, where This is the round-up operation.
3. The method according to claim 2, characterized in that Coordinates are unit (U x ,U y ,U z )'s processing unit processes the 3D data coordinates in the x direction as follows: Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction, is the coordinate of the 3D data in the y direction, is the coordinate of the 3D data in the z direction; If P N =12andU N =4, then 4. The method according to claim 3, characterized in that After the processing unit performs x-direction FFT processing on the 3D data, the method further includes: The processed coordinates in the x direction are The 3D data is aggregated to coordinates of unit (U x ,U y ,U z ) processing unit; Among them, if P N =12andU N =4, then The step of transmitting the FFT sequence in the y direction of the 3D data processed in the x direction to the processing unit through the forwarding unit includes: The FFT sequence in the y direction of the aggregated 3D data processed in the x direction is transmitted to the processing unit through the forwarding unit.
5. The method according to claim 2, characterized in that: Coordinates are unit (U x ,U y ,U z ) is processed in the y direction, and the 3D data coordinates after processing in the x direction are Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the x-coordinate of the 3D data after processing in the x-direction, is the coordinate of the 3D data in the y direction after processing in the x direction, is the coordinate of the 3D data in the z direction after processing in the x direction; If P N =12andU N =4, then 6. The method according to claim 5, characterized in that After the processing unit performs FFT processing in the y direction on the 3D data processed in the x direction, the method further includes: The processed coordinates in the y direction are The 3D data is aggregated to coordinates of unit (U x ,U y ,U z ) processing unit; Among them, if P N =12andU N =4, then The method of transmitting the FFT sequence in the z direction of the 3D data processed in the y direction to the processing unit through the forwarding unit includes: The FFT sequence in the z direction of the aggregated 3D data processed in the y direction is transmitted to the processing unit through the forwarding unit.
7. The method according to claim 2, characterized in that: Coordinates are unit (U x ,U y ,U z ) is processed in the z direction, and the 3D data coordinates after processing in the y direction are Among them, U x is the coordinate of the processing unit in the x direction, U y is the coordinate of the processing unit in the y direction, U z is the coordinate of the processing unit in the z direction, is the coordinate of the 3D data in the x direction after processing in the y direction, is the coordinate of the 3D data in the y direction after processing in the y direction, is the coordinate of the 3D data in the z direction after processing in the y direction; If P N =12andU N =4, then 8. A 3D-FFT task allocation device, characterized in that: The computing unit that performs the task is in the z, y, and z directions. N The connected computing units directly transmit data, while the unconnected computing units do not directly transmit data, and the data is transferred through the computing units between them; according to the FFT task, the computing units are divided into processing units and forwarding units, among which the processing units participate in the FFT task processing, and the forwarding units do not participate in the FFT task processing; U N Calculate the total number of units in a single direction; The device comprises: A first transmission module, used for transmitting the FFT sequence in the x direction of the 3D data to the processing unit through the forwarding unit; A first processing module, configured to perform x-direction FFT processing on the 3D data through a processing unit; A second transmission module is used to transmit the FFT sequence in the y direction of the 3D data processed in the x direction to the processing unit through the forwarding unit; The second processing module is used to perform FFT processing in the y direction on the 3D data processed in the x direction through the processing unit; A third transmission module, used for transmitting the FFT sequence in the z direction of the 3D data processed in the y direction to the processing unit through the forwarding unit; The third processing module is used to perform FFT processing in the z direction on the 3D data processed in the y direction through the processing unit.
9. An electronic device, characterized in that: include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 7.