Multi-dimensional fast Fourier transform data processing method and device and electronic equipment

By dynamically adjusting the decomposition strategy of multi-dimensional fast Fourier transform data processing, the sub-sequences are decomposed according to the sequence length and storage form, the problem of low computing efficiency in the prior art is solved and significant performance improvement is achieved.

CN119066309APending Publication Date: 2024-12-03PEKING UNIV +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411073502.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, a fixed decomposition strategy is adopted when processing multi-dimensional fast Fourier transform data, which leads to low computational efficiency and long time. Especially when using OpenCL's open source clFFT library, it is impossible to fully utilize the computing memory access of the graphics processor. characteristic.

Method used

According to the first sequence length and preset batch size of the to-process sequence in each dimension, the transpose parameters and batch size are determined, and the sub-sequence is decomposed into multiple decomposition factors according to the length and storage form of the sub-sequence, and the discrete four is executed. Leaf transformation calculation, dynamically adjust the decomposition strategy to adapt to different lengths and storage forms.

Benefits of technology

It improves the efficiency of graphics processors in multi-dimensional fast Fourier transform calculations, significantly improves performance, and has an acceleration ratio of between 2.59-27.83 times, solving the problems of low computing efficiency and time-consuming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066309A_ABST
    Figure CN119066309A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-dimensional fast Fourier transform data processing method and device and electronic equipment. The method comprises the following steps: according to a first sequence length and a preset batch processing size of a to-be-processed sequence on each dimension, determining a transposition parameter and a batch processing size corresponding to the to-be-processed sequence on each dimension; according to the first sequence length corresponding to each dimension and the component of the to-be-processed sequence in each dimension, at least one sub-sequence corresponding to the component of the to-be-processed sequence in each dimension is determined, and the transposition parameter is used for determining whether to perform transposition operation on the sub-sequence; and decomposing the sub-sequence into a plurality of decomposition factors according to the second sequence length of the sub-sequence and the storage form of the sub-sequence in the memory of the graphics processor. According to the method and the device, the technical problems of low calculation efficiency and too long time consumption caused by adoption of a fixed decomposition strategy during processing of the multi-dimensional fast Fourier transform data in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a multi-dimensional fast Fourier transform data processing method, device and electronic equipment. Background Art

[0002] In the current related technologies, when calculating multi-dimensional fast Fourier transform sequences through graphics processors, two mainstream programming models are usually used, namely CUDA specifically for NVIDA graphics processors and OpenCL compatible with graphics processors from other manufacturers. The open source clFFT library based on OpenCL sets a fixed decomposition calculation strategy for multi-dimensional fast Fourier transform sequences in consideration of versatility, resulting in low calculation efficiency and excessive time consumption.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] The embodiments of the present application provide a multi-dimensional fast Fourier transform data processing method, device and electronic device to at least solve the technical problems of low computational efficiency and excessive time consumption caused by the use of a fixed decomposition strategy when processing multi-dimensional fast Fourier transform data in the related art.

[0005] According to one aspect of an embodiment of the present application, a multidimensional fast Fourier transform data processing method is provided, including: determining the corresponding transposition parameters and batch sizes of the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of a graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of the multiple decomposition factors.

[0006] Optionally, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory includes: decomposing the subsequence into multiple decomposition factors when the storage form is that the subsequence is continuously stored in the graphics processor memory; and decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence when the storage form is that the subsequence is non-continuously stored in the graphics processor memory.

[0007] Optionally, when the storage form is non-continuous storage of the subsequence in the graphics processor memory, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence includes: when the second sequence length of the subsequence is less than a first preset length threshold, decomposing the subsequence into multiple decomposition factors; when the second sequence length of the subsequence is not less than the preset length threshold, transposing the subsequence so that the storage form of the subsequence is transposed to continuous storage, and then decomposing the transposed subsequence into multiple decomposition factors.

[0008] Optionally, determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension based on the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension includes: determining a target value range for the first sequence length from multiple preset value ranges, wherein the preset value range includes a first preset value range, a second preset value range, a third preset value range, a fourth preset value range and a fifth preset value range, the minimum value of the second preset value range is equal to the maximum value of the first preset value range, the minimum value of the third preset value range is equal to the maximum value of the second preset value range, the minimum value of the fourth preset value range is equal to the maximum value of the third preset value range, and the minimum value of the fifth preset value range is equal to the maximum value of the fourth preset value range; determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension based on the target value range.

[0009] Optionally, determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension based on the target value range includes: when the target value range is a first preset value range, determining that the components of the sequence to be processed in each dimension are subsequences corresponding to the components; when the target value range is a second preset value range, a third preset value range or a fourth preset value range, decomposing the components of the sequence to be processed in each dimension into a first subsequence and a second subsequence, and determining the first subsequence and the second subsequence as subsequences corresponding to the components of the sequence to be processed in each dimension, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding first subsequence and the second subsequence; when the target value range is a fifth preset value range, decomposing the components of the sequence to be processed in each dimension into a third subsequence, a fourth subsequence and a fifth subsequence, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding third subsequence, the fourth subsequence and the fifth subsequence.

[0010] Optionally, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performing discrete Fourier transform calculation on the multiple decomposition factors includes: when the target value range is the fourth preset value range and the value of the transposition parameter is equal to the preset parameter value, after transposing the first multidimensional array composed of the first subsequence and the second subsequence, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the graphics processor memory and performing discrete Fourier transform calculation; after replacing the first subsequence in the first multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transposing the first multidimensional array again, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the graphics processor memory and performing discrete Fourier transform calculation; replacing the second subsequence in the first multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transposing the first multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0011] Optionally, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors includes: when the target value range is the fourth preset value range and the value of the transposition parameter is not equal to the preset parameter value, after transposing the second multidimensional array composed of the first subsequence, the second subsequence and the transposition parameter, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; after replacing the first subsequence in the second multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transposing the second multidimensional array again, and after the transposition processing, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; replacing the second subsequence in the second multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transposing the second multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0012] Optionally, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: when the target value range is the fifth preset value range and the value of the transposition parameter is equal to the preset parameter value, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the memory of the graphics processor. The discrete Fourier transform calculation is performed on the subsequences corresponding to the third subsequence, the discrete Fourier transform calculation result corresponding to the fourth subsequence, and the third multidimensional array composed of the fifth subsequence is transposed, and after the transposition, the subsequences are decomposed into multiple decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the graphics processor memory, and the discrete Fourier transform calculation is performed; the fifth subsequence in the third multidimensional array is replaced by the discrete Fourier transform calculation result of the fifth subsequence, and the third multidimensional array is transposed again to obtain the calculation result corresponding to the sequence to be processed.

[0013] Optionally, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: when the target value range is the fifth preset value range and the value of the transposition parameter is not equal to the preset parameter value, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation. Execute discrete Fourier transform calculation; perform transposition processing on a fourth multidimensional array consisting of a discrete Fourier transform calculation result corresponding to the third subsequence, a discrete Fourier transform calculation result corresponding to the fourth subsequence, a fifth subsequence and a transposition parameter, and after the transposition processing, decompose the subsequence into multiple decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the memory of the graphics processor and perform discrete Fourier transform calculation; replace the fifth subsequence in the fourth multidimensional array with the discrete Fourier transform calculation result of the fifth subsequence, and perform transposition processing on the fourth multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0014] Optionally, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor includes: when the target value range is a first preset value range, the value of the transposition parameter is not equal to the preset parameter value, and the first sequence length is greater than a second preset length threshold, transposing the subsequence, and after the transposition, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor; when the target value range is a third preset value range, and the value of the transposition parameter is equal to the preset parameter value, transposing a first multidimensional array composed of at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition; when the target value range is a third preset value range, and the value of the transposition parameter is not equal to the preset parameter value, transposing a second multidimensional array composed of at least one subsequence and the transposition parameter corresponding to at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition.

[0015] Optionally, performing discrete Fourier transform calculations on the multiple decomposition factors includes: determining a thread block in a graphics processor corresponding to each subsequence, and performing discrete Fourier transform calculations on each decomposition factor of the corresponding subsequence through the thread block.

[0016] According to another aspect of an embodiment of the present application, a multidimensional fast Fourier transform data processing device is also provided, including: a processing module, used to determine the transposition parameters and batch sizes corresponding to the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; a decomposition module, used to determine at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; a calculation module, used to decompose the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of a graphics processor, and perform discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors.

[0017] According to another aspect of an embodiment of the present application, a non-volatile storage medium is provided, in which a program is stored, wherein when the program is running, a device where the non-volatile storage medium is located is controlled to execute a multi-dimensional fast Fourier transform data processing method.

[0018] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including: a memory and a processor, the processor being used to run a program stored in the memory, wherein the multi-dimensional fast Fourier transform data processing method is executed when the program is run.

[0019] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the computer program implements a multi-dimensional fast Fourier transform data processing method.

[0020] In the embodiment of the present application, the transposition parameter and batch size corresponding to the sequence to be processed in each dimension are determined according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; at least one subsequence corresponding to the component of the sequence to be processed in each dimension is determined according to the first sequence length corresponding to each dimension and the component of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; the subsequence is decomposed into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and a discrete Fourier transform calculation is performed on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors. By decomposing the sequence to be processed multiple times according to the length and storage form of the components of the sequence to be processed in each dimension and determining whether to perform a transposition operation on the sequence to be processed according to the length of the sequence to be processed in each dimension, the purpose of executing different decomposition strategies for different sequences to be processed is achieved, thereby achieving the technical effect of improving the method for processing multidimensional fast Fourier transform data by various graphics processors, and further solving the technical problem of low computational efficiency and excessive time consumption caused by adopting a fixed decomposition strategy when processing multidimensional fast Fourier transform data in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] 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:

[0022] Figure 1 It is a flowchart of a multi-dimensional fast Fourier transform data processing method provided according to an embodiment of the present application;

[0023] Figure 2 It is a schematic diagram of the acceleration ratio of processing single-base Fast Fourier Transform data on a graphics processor of other manufacturers except AMD and NVIDA according to an embodiment of the present application;

[0024] Figure 3 Another schematic diagram of the speedup ratio of processing single-base Fast Fourier Transform data on a graphics processor of another manufacturer other than AMD and NVIDA according to an embodiment of the present application;

[0025] Figure 4It is a schematic diagram of the acceleration ratio of processing mixed-basis fast Fourier transform data on a graphics processor of other manufacturers except AMD and NVIDA according to an embodiment of the present application;

[0026] Figure 5 is another schematic diagram of the acceleration ratio of processing mixed-base fast Fourier transform data on graphics processors of other manufacturers except AMD and NVIDA according to an embodiment of the present application;

[0027] Figure 6 It is a schematic diagram of the acceleration ratio of processing single-base Fast Fourier Transform data on an AMD graphics processor according to an embodiment of the present application;

[0028] Figure 7 Another schematic diagram of the acceleration ratio of processing single-base Fast Fourier Transform data on an AMD graphics processor according to an embodiment of the present application;

[0029] Figure 8 is a schematic diagram of a speedup ratio for processing mixed-basis fast Fourier transform data on an AMD graphics processor according to an embodiment of the present application;

[0030] Fig. 9 is another schematic diagram of the acceleration ratio of processing mixed-basis fast Fourier transform data on an AMD graphics processor according to an embodiment of the present application;

[0031] Fig.10 It is a structural schematic diagram of a multi-dimensional fast Fourier transform data processing device provided according to an embodiment of the present application;

[0032] Fig.11 It is a structural schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] DFT (Discrete Fourier Transform) is a commonly used mathematical calculation method, which is widely used in signal processing, image processing, audio processing and other fields. Its calculation complexity is relatively high, which is O(N 2 ). FFT (Fast Fourier Transform) is a fast algorithm for calculating discrete Fourier transform. The main idea is to use the symmetry and periodicity of the rotation factors to decompose a longer DFT sequence into multiple shorter DFT sequences, thereby reducing the overall number of operations. The most classic FFT algorithm is the Kury-Tukey algorithm proposed in 1965, which recursively converts the DFT sequence into two shorter DFT sequences, reducing the computational complexity of DFT from O(N). 2 ) is reduced to O(NlogN). The Stockham computation framework avoids the explicit global transposition of the Curry-Tukey algorithm by inserting multi-dimensional transposition in each decomposition calculation, making it more suitable for implementation on graphics processors. The calculation of multi-dimensional DFT can be converted into solving a one-dimensional DFT problem in each dimension, and the FFT algorithm can be further used to reduce the computational complexity to O(NlogN).

[0036] In order to further simplify the complexity of programming on platforms such as graphics processing units (GPUs), the relevant technologies also abstract the hardware architecture through parallel programming models. There are two main types of current programming models: one is a dedicated model that is only applicable to specific hardware, such as CUDA for NVIDIA graphics processors, and the other is a general model that is applicable to hardware from various other manufacturers, such as OpenCL. Among them, OpenCL adopts a hierarchical thread organization architecture, including a grid layer, a thread block layer, and a thread layer. The graphics processor launches one grid at a time, a grid contains one or more thread blocks, a thread block contains one or more threads, and each thread block has a shared memory inside, which is visible to all threads in the thread block.

[0037] Due to the versatility of OpenCL, some graphics processors (Graphics Processing Unit) currently use OpenCL as their programming model. In the OpenCL ecosystem, the most widely used open source FFT calculation library is clFFT. clFFT adopts the recursive idea to recursively decompose the input of any situation into pre-set situations. In the process of performing FFT calculations on each dimension of the multidimensional FFT, the first step of decomposition will be performed on the dimension. For different lengths, different sub-FFT sequences will be obtained. How to set the calculation order of the sub-FFT sequence and intersperse multi-dimensional transposition has a great impact on the memory access performance of FFT on NVIDA, AMD and other manufacturers' graphics processors. However, clFFT sets a fixed FFT decomposition calculation strategy, which makes it unable to make good use of the calculation and memory access characteristics of graphics processors of other manufacturers. It should be noted that the graphics processors of other manufacturers referred to in the embodiments of the present application are graphics processors designed and manufactured by manufacturers other than NVIDA and AMD. In addition, the method provided in the present application can be used not only in the graphics processors of these other manufacturers, but also in the graphics processors of NVIDA and AMD.

[0038] In addition, some GPUs from other manufacturers currently have low global bandwidth, which makes global memory read and write of FFT on GPUs the biggest performance bottleneck. Or there is no L2 cache or the L2 cache is small, which makes the L1 cache hit rate have a greater impact on performance. Currently, open source FFT function libraries such as clFFT lack fine-tuning of GPU hardware and cannot fully utilize hardware features to achieve satisfactory performance results.

[0039] In order to solve the above problems, relevant solutions are provided in the embodiments of the present application, which are described in detail below.

[0040] According to an embodiment of the present application, a method embodiment of a multidimensional fast Fourier transform data processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0041] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device.

[0042] In the above operating environment, the embodiment of the present application provides a multi-dimensional fast Fourier transform data processing method, such as Figure 1 As shown, the method comprises the following steps:

[0043] Step S102, determining the corresponding transposition parameters and batch sizes of the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size;

[0044] In the technical solution provided in step S102, the data layout formats of the sequence to be processed include interleave and planar formats. The interleave format stores the real and imaginary parts of the FFT input complex numbers alternately, while the planar format stores the real and imaginary parts in different vectors.

[0045] In some embodiments of the present application, the input data format of the above sequence to be processed is [B, N 0 ,...,N d ], where B is the preset batch size, N i is the size of the i+1th dimension of the multidimensional FFT, and the value range of i is 0-d. For the component N of the i-th dimension of the sequence to be processed i , the corresponding batch size prefix and transposition parameter suffix are calculated as follows:

[0046]

[0047] Through the above formula, the process of calculating the sequence to be processed can be equivalent to completing the data scale in each dimension such as [prefix, N i ,suffix] i Since prefix can be regarded as the batch size, it can be considered that the data size is [N i ,suffix] i FFT calculation of the point.

[0048] Step S104, determining at least one subsequence corresponding to the component of the sequence to be processed in each dimension according to the length of the first sequence corresponding to each dimension and the component of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence;

[0049] In the technical solution provided in step S104, the step of determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension includes: determining a target value range for the first sequence length from multiple preset value ranges, wherein the preset value range includes a first preset value range, a second preset value range, a third preset value range, a fourth preset value range and a fifth preset value range, the minimum value of the second preset value range is equal to the maximum value of the first preset value range, the minimum value of the third preset value range is equal to the maximum value of the second preset value range, the minimum value of the fourth preset value range is equal to the maximum value of the third preset value range, and the minimum value of the fifth preset value range is equal to the maximum value of the fourth preset value range; determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the target value range.

[0050] As an optional implementation, the first preset value range, the second preset value range, the third preset value range, the fourth preset value range and the fifth preset value range can be set according to the performance of the graphics processor. For example, on a graphics processor of another manufacturer, the length of the first sequence is 2 a (a is a positive integer), the first preset value range is 0<2 a ≤2 11 , the second preset value range is 2 11 <2 a ≤2 16 , the third preset value range is 2 16 <2 a ≤2 18 , the fourth preset value range is 2 18 <2 a ≤2 22 , the fifth preset value range is 2 22 <2 a .

[0051] When determining the subsequence corresponding to the components on each dimension, the components on each dimension can be decomposed. The specific decomposition formula is as follows:

[0052] N i =n 0 *n 1 *...*n k

[0053] where n j N iThe j+1th sub-FFT sequence after decomposition. In addition, for sub-FFT sequences of different lengths, multi-dimensional transposition and multiplication by corresponding rotation factors can be interspersed as needed before and after Fourier calculation to ensure that the storage form of some data with low computational efficiency in the GPU memory is as continuous as possible, thereby improving the overall computational efficiency.

[0054] In some embodiments of the present application, the step of determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension based on the target value range includes: when the target value range is a first preset value range, determining that the components of the sequence to be processed in each dimension are subsequences corresponding to the components; when the target value range is a second preset value range, a third preset value range or a fourth preset value range, decomposing the components of the sequence to be processed in each dimension into a first subsequence and a second subsequence, and determining the first subsequence and the second subsequence as subsequences corresponding to the components of the sequence to be processed in each dimension, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding first subsequence and the second subsequence; when the target value range is a fifth preset value range, decomposing the components of the sequence to be processed in each dimension into a third subsequence, a fourth subsequence and a fifth subsequence, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding third subsequence, the fourth subsequence and the fifth subsequence.

[0055] Step S106, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performing discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of the multiple decomposition factors.

[0056] Specifically, for the subsequence n j , it can be decomposed into multiple decomposition factors according to the following formula:

[0057] n j =f 0 *f 1 *...*f m

[0058] f p n j The p+1th factorization factor of j is the subsequence n j The length of the second sequence, f p n j The length of the p+1th factorization of . p The decomposition factor can be directly called by the corresponding f p Click the DFT function to complete the DFT calculation. pThe value range can be [2,3,4,5,6,7,8,9,10].

[0059] In the technical solution provided in step S106, the step of decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory includes: when the storage form is that the subsequence is continuously stored in the graphics processor memory, decomposing the subsequence into multiple decomposition factors; when the storage form is that the subsequence is non-continuously stored in the graphics processor memory, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence.

[0060] As an optional implementation, in the case where the storage form is non-continuous storage of the subsequence in the memory of the graphics processor, the step of decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence includes: when the second sequence length of the subsequence is less than a first preset length threshold, decomposing the subsequence into multiple decomposition factors; when the second sequence length of the subsequence is not less than the preset length threshold, transposing the subsequence so that the storage form of the subsequence is transposed to continuous storage, and then decomposing the transposed subsequence into multiple decomposition factors.

[0061] Specifically, after determining the subsequences corresponding to the components of each dimension of the sequence to be processed, the data shape is [B′,n 0 ,n 1 ,...,n k ,suffix], for the convenience of subsequent description, the data is arranged in the memory in row-major order. For each subsequence, if the subsequence is stored in the GPU memory in a continuous manner, that is, in the case of continuous dimensions and / or the last dimension, it can be directly decomposed into multiple decomposition factors and calculated. If it is not stored in a continuous manner, that is, in a non-continuous dimension, then in n j When it is small, it can be directly decomposed to obtain multiple decomposition factors and calculated. j When it is larger, each thread block completes n j The number of point FFTs decreases, the L1 cache hit rate decreases, and the memory access performance decreases. Therefore, n j Transpose to continuous dimensions and complete the calculation.

[0062] As an optional implementation, transposition includes explicit transposition and implicit transposition. Implicit transposition refers to the following: j After the FFT calculation, the result is transposed in situ and written back to the video memory. jAfter the sub-FFT is calculated and written back to the video memory, a new kernel function is configured for transposition. The advantage of implicit transposition is that it reduces the access to the video memory, but the allocation of thread blocks and threads is not optimal at this time, which affects the performance of transposition to a certain extent; the advantage of explicit transposition is that it can reallocate better computing resources, but the disadvantage is that it requires more access to the video memory.

[0063] In some embodiments of the present application, the step of decomposing a subsequence into a plurality of decomposition factors according to a second sequence length of the subsequence and a storage form of the subsequence in a graphics processor memory includes: when the target value range is a first preset value range, the value of the transposition parameter is not equal to the preset parameter value, and the first sequence length is greater than a second preset length threshold, transposing the subsequence, and after the transposition, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and a storage form of the subsequence in a graphics processor memory; when the target value range is a third preset value range, and the value of the transposition parameter is equal to the preset parameter value, transposing a first multidimensional array composed of at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition; when the target value range is a third preset value range, and the value of the transposition parameter is not equal to the preset parameter value, transposing a second multidimensional array composed of at least one subsequence and a transposition parameter corresponding to at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition.

[0064] In some embodiments of the present application, decomposing a subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors includes: when the target value range is a fourth preset value range and the value of the transposition parameter is equal to the preset parameter value, after transposing a first multidimensional array composed of a first subsequence and a second subsequence, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; after replacing the first subsequence in the first multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transposing the first multidimensional array again, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; replacing the second subsequence in the first multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transposing the first multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0065] In some embodiments of the present application, the steps of decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors include: when the target value range is a fourth preset value range and the value of the transposition parameter is not equal to the preset parameter value, after transposing the second multidimensional array composed of the first subsequence, the second subsequence and the transposition parameter, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors. Perform discrete Fourier transform calculation; after replacing the first subsequence in the second multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transpose the second multidimensional array again, and after the transposition, decompose the subsequence into multiple decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the memory of the graphics processor and perform discrete Fourier transform calculation; replace the second subsequence in the second multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transpose the second multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0066] As an optional implementation, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performing discrete Fourier transform calculation on the multiple decomposition factors includes: when the target value range is the fifth preset value range and the value of the transposition parameter is equal to the preset parameter value, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the graphics processor memory and performing discrete Fourier transform calculation; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the graphics processor memory. decomposition factors and perform discrete Fourier transform calculation; transpose a third multidimensional array consisting of the discrete Fourier transform calculation result corresponding to the third subsequence, the discrete Fourier transform calculation result corresponding to the fourth subsequence and the fifth subsequence, and after the transposition, decompose the subsequence into multiple decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the graphics processor memory and perform discrete Fourier transform calculation; replace the fifth subsequence in the third multidimensional array with the discrete Fourier transform calculation result of the fifth subsequence, and transpose the third multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0067] In some embodiments of the present application, decomposing a subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performing discrete Fourier transform calculation on the multiple decomposition factors includes: when the target value range is the fifth preset value range and the value of the transposition parameter is not equal to the preset parameter value, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the graphics processor memory and performing discrete Fourier transform calculation; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the graphics processor memory. factoring and performing discrete Fourier transform calculation; performing transposition processing on a fourth multidimensional array consisting of a discrete Fourier transform calculation result corresponding to the third subsequence, a discrete Fourier transform calculation result corresponding to the fourth subsequence, a fifth subsequence and a transposition parameter, and after the transposition processing, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; replacing the fifth subsequence in the fourth multidimensional array with the discrete Fourier transform calculation result of the fifth subsequence, and performing transposition processing on the fourth multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0068] As an optional implementation, different decomposition calculation methods can be used for different target value ranges, and the memory access performance of the graphics processor during FFT calculation can be improved by interspersing one or more transposition steps according to the target value range and transposition parameters during the decomposition calculation process.

[0069] Specifically, when the target value range is the first value range, the components N of the sequence to be processed in each dimension can be directly i As the subsequence corresponding to this dimension, the following values ​​are taken according to different suffixes:

[0070] When suffix is ​​1, N i In memory, it is a continuous dimension. i Directly decompose to obtain multiple decomposition factors and complete FFT calculation.

[0071] When suffix is ​​not equal to 1, N i is a non-contiguous dimension in memory. i When ≤512, for N i Decompose to obtain multiple decomposition factors and complete FFT calculation; when N i When >512, each thread block completes N with the same number of threads. i The number of point FFTs decreases, the L1 cache hit rate decreases, and the memory access performance decreases. Therefore, an explicit transposition is performed first to convert N iTranspose to continuous dimensions to get [suffix,N i ], for N i Decompose to obtain multiple decomposition factors and complete FFT calculation, and finally explicitly convert N i Transpose to the original dimension to get [N i ,sufix].

[0072] When the target value range is the second preset value range, N i Decompose into n 0 *n 1 , n 0 、n 1 The values ​​of suffix are as follows:

[0073] When suffix is ​​equal to 1, first 0 Decompose to get multiple decomposition factors and complete FFT calculation, and implicitly transpose to get [n 1 ,n 0 ] write back to video memory; then write 1 Decompose to obtain multiple decomposition factors and complete FFT calculation.

[0074] When suffix is ​​not equal to 1, first 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; and implicitly transpose to obtain [n 1 ,n 0 ,suffix] is written back to the video memory; then n 1 Decompose to obtain multiple decomposition factors and complete FFT calculation.

[0075] When the target value range is the third preset value range, N i Decompose into n 0 *n 1 , n 0 >n 1 , we need to change n 0 Transpose to continuous dimensions to complete the FFT calculation. Depending on the different values ​​of suffix, there are:

[0076] When suffix is ​​equal to 1, first perform an explicit transposition to obtain [n 1 ,n 0 ]; then n 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; finally, 1 Decompose to obtain multiple decomposition factors and complete FFT calculation.

[0077] When suffix is ​​not equal to 1, first perform an explicit transposition to obtain [n 1 ,suffix,n 0]; then n 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; then 1 Decompose to obtain multiple decomposition factors and complete FFT calculation; finally perform explicit transposition to obtain [n 1 ,n 0 ,suffix].

[0078] When the target value range is the fourth preset value range, N i Decompose into n 0 *n 1 , n 0 、n 1 They are both large and need to be transposed to continuous dimensions to complete the FFT calculation. Depending on the different values ​​of suffix:

[0079] When suffix is ​​equal to 1, first perform an explicit transposition to obtain [n 1 ,n 0 ]; then n 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; then perform explicit transposition to obtain [n 0 ,n 1 ]; then n 1 Decompose to obtain multiple decomposition factors and complete FFT calculation; finally perform explicit transposition to obtain [n 1 ,n 0 ];

[0080] When suffix is ​​not equal to 1, first perform an explicit transposition to obtain [n 1 ,suffix,n 0 ]; then n 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; then perform explicit transposition to obtain [suffix,n 0 ,n 1 ]; then n 1 Decompose to obtain multiple decomposition factors and complete FFT calculation; finally perform explicit transposition to obtain [n 1 ,n 0 ,Suffix].

[0081] When the target value range is the fifth preset value range, N i Decompose into n 0 *n 1 *n 2 , at this time n 0 、n 1 、n 2 They are all small, depending on the length of the suffix:

[0082] When suffix is ​​equal to 1, first 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; then 1 Decompose to obtain multiple decomposition factors and complete FFT calculation, and perform implicit transposition to obtain [n 1 ,n 0 ,n 2 ]; then n 2 Decompose to obtain multiple decomposition factors and complete FFT calculation, and perform implicit transposition to obtain [n 2 ,n 1 ,n 0 ];

[0083] When suffix is ​​not equal to 1, first 0 Decompose to obtain multiple decomposition factors and complete FFT calculation; then 1 Decompose to obtain multiple decomposition factors and complete FFT calculation, and perform implicit transposition to obtain [n 1 ,n 0 ,n 2 ,suffix]; then n 2 Decompose to obtain multiple decomposition factors and complete FFT calculation, and perform implicit transposition to obtain [n 2 ,n 1 ,n 0 ,suffix].

[0084] In some embodiments of the present application, performing discrete Fourier transform calculations on multiple decomposition factors includes: determining thread blocks in a graphics processor corresponding to each subsequence, and performing discrete Fourier transform calculations on each decomposition factor of the corresponding subsequence through the thread blocks.

[0085] Specifically, each thread block can be responsible for the calculation of one or more sub-FFT sequences, and during the calculation, each thread in the thread block can directly call the DFT function to complete the DFT calculation of the decomposition factor assigned to the thread. The DFT function is mainly optimized from the aspects of fully expanding the calculation loop and carefully planning the use of variables to reduce the risk of register overflow, which can maximize the use of hardware resources while reducing the number of operations as much as possible.

[0086] In order to further verify the effect of the method provided in the present application when processing a multi-dimensional FFT sequence through a graphics processor, some embodiments of the present application also provide a schematic diagram of the performance comparison of the method and the clFFT library executed in graphics processors of other manufacturers except AMD and NVIDA and an AMD RX 550 graphics processor. The comparison results are shown in FIG. Figure 2-9 As shown. Figure 2This is a schematic diagram of the speedup ratio of processing single-base interleave format fast Fourier transform data on a graphics processor from another manufacturer. Figure 3 The figure is a schematic diagram showing the speedup ratio of processing single-basis planar format fast Fourier transform data on a graphics processor of another manufacturer. Figure 4 This is a schematic diagram of the speedup ratio of processing interleave fast Fourier transform data of 2 / 3 / 5 / 7 mixed basis on a graphics processor of another manufacturer. Figure 5 The figure is a schematic diagram of the speedup ratio for processing fast Fourier transform data in planar format with a mixed basis of 2 / 3 / 5 / 7 on a graphics processor of another manufacturer. Figure 6 This is a schematic diagram of the speedup ratio of processing single-base interleave format fast Fourier transform data on an AMD graphics processor. Figure 7 A schematic diagram showing the speedup ratio for processing single-basis planar format Fast Fourier Transform data on an AMD graphics processor. Figure 8 The figure is a schematic diagram of the speedup ratio of processing the interleave format fast Fourier transform data of 2 / 3 / 5 / 7 mixed basis on AMD graphics processor. Fig. 9 A schematic diagram of the speedup ratio for processing fast Fourier transform data in planar format with 2 / 3 / 5 / 7 mixed basis on AMD graphics processor.

[0087] from Figure 2 , Figure 3 , Figure 4 and Figure 5 It can be seen that when the method provided by the present application is executed in a graphics processor of another manufacturer, compared with the clFFT library, a 2.77-7.01-fold acceleration can be obtained in the case of a single 2D and 3D 2 / 3 / 5 / 7 basis, and a 2.59-27.83-fold acceleration can be obtained in the case of a mixed 2D and 3D 2 / 3 / 5 / 7 basis. Figure 6 , Figure 7 , Figure 8 and Fig. 9 It can be seen that when the method provided in the present application is executed on an AMD graphics processor, compared with the clFFT library, a 1.40-4.03 times acceleration can be obtained in the case of a 2D or 3D 2 / 3 / 5 / 7 single basis, and a 1.04-3.02 times acceleration can be obtained in the case of a 2D or 3D 2 / 3 / 5 / 7 mixed basis.

[0088] It can be seen from the above test results that the method provided in the embodiments of the present application can effectively improve the computational efficiency of various graphics processors when performing multi-dimensional fast Fourier transform calculations, and has a good performance acceleration effect and significant performance improvement.

[0089] By adopting the method of determining the transposition parameter and batch size corresponding to the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; determining at least one subsequence corresponding to the component of the sequence to be processed in each dimension according to the first sequence length corresponding to each dimension and the component of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors, decomposing the sequence to be processed multiple times according to the length and storage form of the component of the sequence to be processed in each dimension and determining whether to perform a transposition operation on the sequence to be processed according to the length of the sequence to be processed in each dimension, the purpose of executing different decomposition strategies for different sequences to be processed is achieved, thereby realizing the technical effect of improving the method for processing multidimensional fast Fourier transform data by various graphics processors, and further solving the technical problem of low calculation efficiency and excessive time consumption caused by adopting a fixed decomposition strategy when processing multidimensional fast Fourier transform data in the related art.

[0090] In addition, the multi-dimensional fast Fourier transform data processing method provided in the embodiment of the present application provides a hierarchical multi-dimensional FFT decomposition solution, which can reasonably set the calculation order of sub-FFT sequences and the position of interspersed multi-dimensional transpositions according to different FFT sequence lengths. Compared with the existing open source clFFT library, it can more effectively utilize the hardware resources of the graphics processor and promote the application of graphics processors of other manufacturers in the field of high-performance computing.

[0091] The present application embodiment provides a multi-dimensional fast Fourier transform data processing device, Fig.10 is a schematic diagram of the structure of the device. Fig.10 It can be seen that the device includes: a processing module 102, which is used to determine the transposition parameters and batch sizes corresponding to the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; a decomposition module 104, which is used to determine at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; a calculation module 106, which is used to decompose the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and perform discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors.

[0092] In some embodiments of the present application, the decomposition module 104 determines, based on the first sequence lengths corresponding to the dimensions and the components of the sequence to be processed in the dimensions, the step of determining at least one subsequence corresponding to the components of the sequence to be processed in the dimensions, including: determining a target value range for the first sequence length from a plurality of preset value ranges, wherein the preset value ranges include a first preset value range, a second preset value range, a third preset value range, a fourth preset value range, and a fifth preset value range, the minimum value of the second preset value range is equal to the maximum value of the first preset value range, the minimum value of the third preset value range is equal to the maximum value of the second preset value range, the minimum value of the fourth preset value range is equal to the maximum value of the third preset value range, and the minimum value of the fifth preset value range is equal to the maximum value of the fourth preset value range; determining, based on the target value range, at least one subsequence corresponding to the components of the sequence to be processed in the dimensions.

[0093] In some embodiments of the present application, the step of the decomposition module 104 determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the target value range includes: when the target value range is the first preset value range, determining that the components of the sequence to be processed in each dimension are the subsequences corresponding to the components; when the target value range is the second preset value range, the third preset value range or the fourth preset value range, decomposing the components of the sequence to be processed in each dimension into a first subsequence and a second subsequence, and determining the first subsequence and the second subsequence as subsequences corresponding to the components of the sequence to be processed in each dimension, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding first subsequence and the second subsequence; when the target value range is the fifth preset value range, decomposing the components of the sequence to be processed in each dimension into a third subsequence, a fourth subsequence and a fifth subsequence, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding third subsequence, the fourth subsequence and the fifth subsequence.

[0094] In some embodiments of the present application, the step of the computing module 106 decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory includes: when the storage form is that the subsequence is stored continuously in the graphics processor memory, decomposing the subsequence into multiple decomposition factors; when the storage form is that the subsequence is stored non-continuously in the graphics processor memory, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the subsequence.

[0095] In some embodiments of the present application, when the storage form of the subsequence is non-continuous storage in the graphics processor memory, the computing module 106 decomposes the subsequence into multiple decomposition factors according to the second sequence length of the subsequence, including: when the second sequence length of the subsequence is less than a first preset length threshold, decomposing the subsequence into multiple decomposition factors; when the second sequence length of the subsequence is not less than the preset length threshold, transposing the subsequence so that the storage form of the subsequence is transposed to continuous storage, and then decomposing the transposed subsequence into multiple decomposition factors.

[0096] In some embodiments of the present application, the step of the calculation module 106 decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor includes: when the target value range is the first preset value range, the value of the transposition parameter is not equal to the preset parameter value, and the first sequence length is greater than the second preset length threshold, transposing the subsequence, and after the transposition, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor; when the target value range is the third preset value range and the value of the transposition parameter is equal to the preset parameter value, transposing a first multidimensional array composed of at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition; when the target value range is the third preset value range and the value of the transposition parameter is not equal to the preset parameter value, transposing a second multidimensional array composed of at least one subsequence and the transposition parameter corresponding to at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition.

[0097] In some embodiments of the present application, the calculation module 106 decomposes the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performs discrete Fourier transform calculation on the multiple decomposition factors. The steps include: when the target value range is the fourth preset value range and the value of the transposition parameter is equal to the preset parameter value, after transposing the first multidimensional array composed of the first subsequence and the second subsequence, decompose the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the graphics processor memory, and perform discrete Fourier transform calculation; after replacing the first subsequence in the first multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transpose the first multidimensional array again, decompose the subsequence into multiple decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the graphics processor memory, and perform discrete Fourier transform calculation; replace the second subsequence in the first multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transpose the first multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0098] In some embodiments of the present application, the calculation module 106 decomposes the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performs discrete Fourier transform calculation on the multiple decomposition factors, including: when the target value range is a fourth preset value range and the value of the transposition parameter is not equal to the preset parameter value, after transposing the second multidimensional array composed of the first subsequence, the second subsequence and the transposition parameter, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the graphics processor memory. The method comprises the steps of: replacing the first subsequence in the second multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transposing the second multidimensional array again, and decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the memory of the graphics processor after the transposition processing, and performing discrete Fourier transform calculation; replacing the second subsequence in the second multidimensional array with the discrete Fourier transform calculation result of the second subsequence, and transposing the second multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0099] In some embodiments of the present application, the calculation module 106 decomposes the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performs discrete Fourier transform calculation on the multiple decomposition factors, including: when the target value range is the fifth preset value range and the value of the transposition parameter is equal to the preset parameter value, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the graphics processor memory and performing discrete Fourier transform calculation on the multiple decomposition factors; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the graphics processor memory; The column is decomposed into multiple decomposition factors and discrete Fourier transform calculation is performed; a third multidimensional array consisting of the discrete Fourier transform calculation result corresponding to the third subsequence, the discrete Fourier transform calculation result corresponding to the fourth subsequence and the fifth subsequence is transposed, and after the transposition, the subsequence is decomposed into multiple decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the graphics processor memory and discrete Fourier transform calculation is performed; the fifth subsequence in the third multidimensional array is replaced by the discrete Fourier transform calculation result of the fifth subsequence, and the third multidimensional array is transposed again to obtain the calculation result corresponding to the sequence to be processed.

[0100] In some embodiments of the present application, the calculation module 106 decomposes the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, and performs discrete Fourier transform calculation on the multiple decomposition factors, including: when the target value range is the fifth preset value range and the value of the transposition parameter is not equal to the preset parameter value, decomposing the subsequence into multiple decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the graphics processor memory and performing discrete Fourier transform calculation; decomposing the subsequence into multiple decomposition factors according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the graphics processor memory; The method comprises the following steps: decomposing the first subsequence into a plurality of decomposition factors and performing discrete Fourier transform calculation; performing transposition processing on a fourth multidimensional array consisting of a discrete Fourier transform calculation result corresponding to the third subsequence, a discrete Fourier transform calculation result corresponding to the fourth subsequence, a fifth subsequence and a transposition parameter, and after the transposition processing, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the fifth subsequence and the storage form of the fifth subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; replacing the fifth subsequence in the fourth multidimensional array with the discrete Fourier transform calculation result of the fifth subsequence, and performing transposition processing on the fourth multidimensional array again to obtain the calculation result corresponding to the sequence to be processed.

[0101] In some embodiments of the present application, the step of the computing module 106 performing discrete Fourier transform calculations on multiple decomposition factors includes: determining thread blocks in a graphics processor corresponding to each subsequence, and performing discrete Fourier transform calculations on each decomposition factor of the corresponding subsequence through the thread blocks.

[0102] It should be noted that the various modules in the above-mentioned multi-dimensional fast Fourier transform data processing device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.

[0103] Fig.11 The hardware structure block diagram of a computer terminal (or mobile device) having a graphics processor or connected to an external graphics processor via a data line for implementing a multi-dimensional fast Fourier transform data processing method is shown. Fig.11 As shown, the computer terminal 110 (or mobile device 110) may include one or more (1102a, 1102b, ..., 1102n are used to illustrate) processors 1102 (the processor 1102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1104 for storing data, and a transmission device 1106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Fig.11 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.11 More or fewer components as shown, or with Fig.11 Different configurations are shown.

[0104] It should be noted that the one or more processors 1102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 110 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0105] The memory 1104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the multi-dimensional fast Fourier transform data processing method in the embodiment of the present application. The processor 1102 executes various functional applications and data processing by running the software programs and modules stored in the memory 1104, that is, the multi-dimensional fast Fourier transform data processing method described above is implemented. The memory 1104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1104 may further include a memory remotely arranged relative to the processor 1102, and these remote memories may be connected to the computer terminal 110 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0106] The transmission device 1106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 110. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0107] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 110 (or mobile device).

[0108] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, in which a program is stored, wherein when the program is run, the following multi-dimensional fast Fourier transform data processing method is executed: according to the first sequence length of the sequence to be processed in each dimension and the preset batch size, the transposition parameters and batch sizes corresponding to the sequence to be processed in each dimension are determined; according to the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension, at least one subsequence corresponding to the components of the sequence to be processed in each dimension is determined, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; according to the second sequence length of the subsequence and the storage form of the subsequence in the graphics processor memory, the subsequence is decomposed into multiple decomposition factors, and discrete Fourier transform calculation is performed on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors.

[0109] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a computer program, which implements the following multi-dimensional fast Fourier transform data processing method when executed by a processor: determining the corresponding transposition parameters and batch sizes of the sequence to be processed in each dimension based on the first sequence length of the sequence to be processed in each dimension and the preset batch size; determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension based on the first sequence length corresponding to each dimension and the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; decomposing the subsequence into multiple decomposition factors based on the second sequence length of the subsequence and the storage form of the subsequence in the memory of a graphics processor, and performing discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of multiple decomposition factors.

[0110] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0114] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0115] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A multi-dimensional fast Fourier transform data processing method, It is characterized in that include: Determining, according to the first sequence length of the sequence to be processed in each dimension and the preset batch size, the transposition parameter and batch size corresponding to the sequence to be processed in each dimension; Determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the length of the first sequence corresponding to each dimension and the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; The subsequence is decomposed into a plurality of decomposition factors according to a second sequence length of the subsequence and a storage form of the subsequence in a graphics processor memory, and discrete Fourier transform calculation is performed on the plurality of decomposition factors, wherein the subsequence is equal to the multiplication of the plurality of decomposition factors.

2. The multidimensional fast Fourier transform data processing method according to claim 1, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor comprises: In the case where the storage form is that the subsequence is continuously stored in the memory of the graphics processor, decomposing the subsequence into a plurality of decomposition factors; In a case where the storage form is that the subsequence is non-continuously stored in the memory of the graphics processor, the subsequence is decomposed into a plurality of decomposition factors according to a second sequence length of the subsequence.

3. The multidimensional fast Fourier transform data processing method according to claim 2, It is characterized in that In the case where the storage form is that the subsequence is non-continuously stored in the memory of the graphics processor, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence includes: When the second sequence length of the subsequence is less than a first preset length threshold, decomposing the subsequence into a plurality of decomposition factors; When the second sequence length of the subsequence is not less than the preset length threshold, the subsequence is transposed so that the storage form of the subsequence is transposed to continuous storage, and then the transposed subsequence is decomposed into a plurality of decomposition factors.

4. The multidimensional fast Fourier transform data processing method according to claim 1, It is characterized in that Determining, according to the first sequence lengths corresponding to the respective dimensions and the components of the sequence to be processed in the respective dimensions, at least one subsequence corresponding to the components of the sequence to be processed in the respective dimensions includes: Determine a target value range for the first sequence length from a plurality of preset value ranges, wherein the preset value ranges include a first preset value range, a second preset value range, a third preset value range, a fourth preset value range, and a fifth preset value range, a minimum value of the second preset value range is equal to a maximum value of the first preset value range, a minimum value of the third preset value range is equal to a maximum value of the second preset value range, a minimum value of the fourth preset value range is equal to a maximum value of the third preset value range, and a minimum value of the fifth preset value range is equal to a maximum value of the fourth preset value range; At least one subsequence corresponding to the components of the sequence to be processed in each dimension is determined according to the target value range.

5. The multidimensional fast Fourier transform data processing method according to claim 4, It is characterized in that Determining at least one subsequence corresponding to the components of the sequence to be processed in each dimension according to the target value range includes: When the target value range is the first preset value range, determining the component of the sequence to be processed in each dimension as a subsequence corresponding to the component; When the target value range is the second preset value range, the third preset value range, or the fourth preset value range, decomposing the components of the sequence to be processed in each dimension into a first subsequence and a second subsequence, and determining the first subsequence and the second subsequence as subsequences corresponding to the components of the sequence to be processed in each dimension, wherein the components of the sequence to be processed in each dimension are equal to the product of the corresponding first subsequence and the second subsequence; When the target value range is the fifth preset value range, the components of the sequence to be processed in each dimension are decomposed into a third subsequence, a fourth subsequence and a fifth subsequence, wherein the components of the sequence to be processed in each dimension are equal to the corresponding third subsequence, the fourth subsequence and the fifth subsequence multiplied by each other.

6. The multidimensional fast Fourier transform data processing method according to claim 5, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: When the target value range is the fourth preset value range and the value of the transposition parameter is equal to the preset parameter value, after performing transposition processing on the first multidimensional array composed of the first subsequence and the second subsequence, the subsequence is decomposed into a plurality of decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the memory of the graphics processor, and a discrete Fourier transform calculation is performed; After replacing the first subsequence in the first multidimensional array with the discrete Fourier transform calculation result corresponding to the first subsequence, transposing the first multidimensional array again, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the second subsequence and the storage form of the second subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation; The second subsequence in the first multidimensional array is replaced by a discrete Fourier transform calculation result of the second subsequence, and the first multidimensional array is transposed again to obtain a calculation result corresponding to the sequence to be processed.

7. The multidimensional fast Fourier transform data processing method according to claim 5, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: When the target value range is the fourth preset value range and the value of the transposition parameter is not equal to the preset parameter value, after performing transposition processing on the second multidimensional array consisting of the first subsequence, the second subsequence and the transposition parameter, the subsequence is decomposed into a plurality of decomposition factors according to the second sequence length of the first subsequence and the storage form of the first subsequence in the memory of the graphics processor and a discrete Fourier transform calculation is performed; After replacing the first subsequence in the second multidimensional array with a discrete Fourier transform calculation result corresponding to the first subsequence, transposing the second multidimensional array again, and after the transposition processing, decomposing the subsequence into a plurality of decomposition factors according to a second sequence length of the second subsequence and a storage form of the second subsequence in a graphics processor memory, and performing discrete Fourier transform calculation; The second subsequence in the second multidimensional array is replaced by a discrete Fourier transform calculation result of the second subsequence, and the second multidimensional array is transposed again to obtain a calculation result corresponding to the sequence to be processed.

8. The multidimensional fast Fourier transform data processing method according to claim 5, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: When the target value range is the fifth preset value range and the value of the transposition parameter is equal to the preset parameter value, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; Decomposing the subsequence into a plurality of decomposition factors and performing discrete Fourier transform calculation according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the memory of the graphics processor; performing transposition processing on a third multidimensional array consisting of a discrete Fourier transform calculation result corresponding to the third subsequence, a discrete Fourier transform calculation result corresponding to the fourth subsequence, and the fifth subsequence, and after the transposition processing, decomposing the subsequence into a plurality of decomposition factors according to a second sequence length of the fifth subsequence and a storage form of the fifth subsequence in a graphics processor memory, and performing discrete Fourier transform calculation; The fifth subsequence in the third multidimensional array is replaced by the discrete Fourier transform calculation result of the fifth subsequence, and the third multidimensional array is transposed again to obtain the calculation result corresponding to the sequence to be processed.

9. The multidimensional fast Fourier transform data processing method according to claim 5, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and performing discrete Fourier transform calculation on the plurality of decomposition factors includes: When the target value range is the fifth preset value range and the value of the transposition parameter is not equal to the preset parameter value, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the third subsequence and the storage form of the third subsequence in the memory of the graphics processor and performing discrete Fourier transform calculation; Decomposing the subsequence into a plurality of decomposition factors and performing discrete Fourier transform calculation according to the second sequence length of the fourth subsequence and the storage form of the fourth subsequence in the memory of the graphics processor; performing a transposition process on a fourth multidimensional array consisting of a discrete Fourier transform calculation result corresponding to the third subsequence, a discrete Fourier transform calculation result corresponding to the fourth subsequence, the fifth subsequence and the transposition parameter, and after the transposition process, decomposing the subsequence into a plurality of decomposition factors according to a second sequence length of the fifth subsequence and a storage form of the fifth subsequence in a graphics processor memory and performing a discrete Fourier transform calculation; The fifth subsequence in the fourth multidimensional array is replaced by a discrete Fourier transform calculation result of the fifth subsequence, and the fourth multidimensional array is transposed again to obtain a calculation result corresponding to the sequence to be processed.

10. The multidimensional fast Fourier transform data processing method according to claim 4, It is characterized in that Decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor comprises: When the target value range is the first preset value range, the value of the transposition parameter is not equal to the preset parameter value, and the first sequence length is greater than a second preset length threshold, transposing the subsequence, and after the transposition, decomposing the subsequence into a plurality of decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor; When the target value range is the third preset value range and the value of the transposition parameter is equal to the preset parameter value, transposing the first multidimensional array composed of the at least one subsequence, and decomposing each subsequence into a plurality of decomposition factors after the transposition; When the target value range is the third preset value range and the value of the transposition parameter is not equal to the preset parameter value, the at least one subsequence and the second multidimensional array consisting of the transposition parameter corresponding to the at least one subsequence are transposed, and after the transposition, each subsequence is decomposed into a plurality of decomposition factors.

11. The multidimensional fast Fourier transform data processing method according to claim 1, It is characterized in that Performing discrete Fourier transform calculations on the plurality of decomposition factors includes: A thread block in a graphics processor corresponding to each of the subsequences is determined, and a discrete Fourier transform calculation is performed on each of the decomposition factors of the corresponding subsequence through the thread block.

12. A multi-dimensional fast Fourier transform data processing device, It is characterized in that include: A processing module, used for determining the transposition parameter and batch size corresponding to the sequence to be processed in each dimension according to the first sequence length of the sequence to be processed in each dimension and the preset batch size; a decomposition module, configured to determine, according to the length of the first sequence corresponding to each dimension and the components of the sequence to be processed in each dimension, at least one subsequence corresponding to the components of the sequence to be processed in each dimension, wherein the transposition parameter is used to determine whether to perform a transposition operation on the subsequence; A calculation module is used to decompose the subsequence into multiple decomposition factors according to the second sequence length of the subsequence and the storage form of the subsequence in the memory of the graphics processor, and perform discrete Fourier transform calculation on the multiple decomposition factors, wherein the subsequence is equal to the multiplication of the multiple decomposition factors.

13. A non-volatile storage medium, It is characterized in that The non-volatile storage medium stores a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the multi-dimensional fast Fourier transform data processing method according to any one of claims 1 to 11.

14. An electronic device, It is characterized in that include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the multi-dimensional fast Fourier transform data processing method according to any one of claims 1 to 11 when running.

15. A computer program product, It is characterized in that The invention comprises a computer program, which, when executed by a processor, implements the multi-dimensional fast Fourier transform data processing method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Three-dimensional Fourier transform acceleration method, device, equipment and medium

    CN119249048A