ARM platform-oriented VSIPL library optimization method
By using NE10 or OpenBLAS function library on the ARM platform to optimize the data processing of the VSIPL library, the performance bottleneck problem of the VSIPL library in large-scale data and complex algorithm processing is solved, the stability and applicability are improved, and the real-time signal processing is met Sexual needs.
Patent Information
- Application Number
- CN202410958060.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-17
AI Technical Summary
The performance of the VSIPL library is affected by memory access latency and computing bottlenecks when processing large-scale data and complex algorithms, and its performance depends on hardware characteristics, resulting in large differences in performance on different platforms, steep learning curve and high development difficulty.
Use the NE10 function library or OpenBLAS function library for data processing on the ARM platform. By initializing the objective function library, reading and configuring data, calling processing functions, and outputting the results to the VSIPL library, optimizing data processing in a targeted manner, supporting NEON Instruction set to improve performance.
It improves the stability and performance of the VSIPL library, meets the real-time requirements of signal processing, enhances universal applicability, and significantly improves the ability to process large-scale data and complex algorithms.
Smart Images

Figure CN118916035A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a VSIPL library optimization method for an ARM platform. Background Art
[0002] VSIPL (Vector Signal Image Processing Library) is a vector, signal and image processing library, mainly used for advanced embedded signal, information and image processing. VSIPL library provides a set of open standard application programming interfaces (API) and a common computing library for different platforms, which decouples software applications from hardware resources and enhances the portability of application software. Developers only need to use the computing library provided by the VSIPL library to develop and design algorithm components without having to worry about hardware details. In addition, through code reuse, system development time is effectively reduced and the software life cycle is extended.
[0003] Although the VSIPL library provides a wealth of signal processing and image processing functions, it still has many defects in some aspects. For example, when processing complex algorithms in the fields of radar, wireless communication, multimedia processing, etc., its performance may be affected by memory access delays or computing bottlenecks, resulting in the inability to provide sustained high performance. The VSIPL library performs well when processing small-scale data, but as the data size increases, more memory and computing resources are required, which leads to memory bandwidth bottlenecks or processor overload, thus affecting its performance. In addition, the performance of the VSIPL library depends largely on the characteristics of the hardware, and its performance may also vary greatly on different hardware platforms. Therefore, choosing a suitable hardware platform, using targeted optimization methods and reasonable algorithms are the key to improving the performance stability of the VSIPL library.
[0004] However, the currently proposed VSIPL library optimization methods have a steeper learning curve and are more difficult to develop. Summary of the invention
[0005] In view of this, the embodiment of the present application proposes a VSIPL library optimization method for the ARM platform, selects the ARM platform to process the data in the VSIPL library, selects the function library in a targeted manner and optimizes it, stably improves the data processing speed and system performance, and has broad application prospects.
[0006] In the first aspect, an embodiment of the present application proposes a VSIPL library optimization method for an ARM platform, which is suitable for performing data processing on data stored in a VSIPL library on an ARM platform, and the method comprises: adding a header file of a target function library on the ARM platform to link the target function library and initializing the target function library; wherein the target function library is a NE10 function library or an OpenBLAS function library; reading the data to be processed from a target view object in the VSIPL library, determining the processing requirements corresponding to the data to be processed, and configuring required parameters based on the data to be processed; calling a corresponding processing function from the target function library based on the processing requirements, and performing data processing on the data to be processed based on the processing function and the required parameters to obtain a data processing result; outputting the data processing result according to the standard of the VSIPL library, and copying the output to a result view object of the VSIPL library.
[0007] Through the above method, data processing is performed on the stored data in the VSIPL library on the ARM platform, so that the stability of the VSIPL library can be improved. When performing data processing, the header file of the target function library is first added on the ARM platform to link the target function library and initialize the target function library. Then, the data to be processed is read from the target view object in the VSIPL library, the processing requirements corresponding to the data to be processed are determined, and the required parameters are configured based on the data to be processed. Then, the corresponding processing function is called from the target function library based on the processing requirements, and the data to be processed is processed based on the processing function and the required parameters to obtain the data processing result. Finally, the data processing result is output according to the standard specified by the VSIPL library and copied to the result view object of the VSIPL library. The function library is selected and optimized in a targeted manner, which effectively improves the ability of the VSIPL library to process large-scale data and implement complex algorithms, meets the real-time requirements of signal processing, and enhances the universal applicability of the VSIPL library, which has broad application prospects.
[0008] Optionally, the VSIPL library encapsulates memory management through an object-based design. The smallest storage object in the VSIPL library is a data array. Several data arrays form a block object. The block object is a continuous memory area for storing data. Several block objects are allowed to be constructed as a view object in the form of vectors, matrices or high objects. Each view object has a specific offset, length and stride. Access to the data array stored in the VSIPL library is indirectly implemented through view objects and block objects. If the step size of the data array to be accessed is 1 and the complex data storage method is interleaved storage, the data pointer of the data array to be accessed is directly provided to the library function interface. If the step size of the data array to be accessed is not 1 and the complex data storage method is block storage, the data array to be accessed needs to be rearranged to achieve memory alignment, and the data pointer after memory alignment is provided to the library function interface.
[0009] Optionally, configuring the required parameters based on the data to be processed includes: obtaining and configuring the required parameters of the data to be processed from the information carried by the target view object; or, obtaining and configuring the required parameters of the data to be processed through a data parameter structure specific to the VSIPL library.
[0010] Optionally, the ARM platform supports the NEON instruction set, and the processor deployed by the ARM platform supports NEON. If there is no processing function corresponding to the processing requirement in the target function library, the method further includes: adding a header file containing arm_neon.h to the source file, and the header file containing arm_neon.h defines all NEONintrinsics; 128-bit alignment of the data to be processed to obtain aligned data; using NEON intrinsics to write a processing function corresponding to the processing requirement, and based on the written processing function and the required parameters, data processing is performed on the aligned data to obtain a data processing result; the data processing result is output according to the standard of the VSIPL library, and the output is copied to the result view object of the VSIPL library. For processing functions that are not in the target function library, this application supports the writing of functions based on NEON, so as to better optimize the VSIPL library and further improve the performance, stability and universal applicability of the VSIPL library.
[0011] Optionally, during compilation, the NEON instruction set is enabled by a -mfpu=neon compilation option or a -mfloat-abi=softfp compilation option. Selecting a suitable compilation option can fully utilize the performance of the NEON instruction.
[0012] Optionally, if data processing related to signal processing is required, the NE10 function library is selected as the target function library, and if data processing related to matrix operations is required, the OpenBLAS function library is selected as the target function library.
[0013] Optionally, after outputting the data processing result according to the standard of the VSIPL library and copying the output to the result view object of the VSIPL library, the method further includes: releasing the target function library. After completing one data processing, the target function library is released immediately, which can save resources and quickly prepare for the next data processing.
[0014] In the second aspect, an embodiment of the present application proposes a VSIPL library optimization system for an ARM platform, the system comprising a library linking module, used to add a header file of a target library on the ARM platform to link the target library and initialize the target library, wherein the target library is a NE10 library or an OpenBLAS library; a data reading module, used to read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed; a data processing module, used to call the corresponding processing function from the target function library based on the processing requirements, and perform data processing on the data to be processed based on the processing function and the required parameters to obtain a data processing result; a data output module, used to output the data processing result according to the standard of the VSIPL library, and copy the output to the result view object of the VSIPL library.
[0015] In a third aspect, an embodiment of the present application proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the VSIPL library optimization method for the ARM platform as described in the first aspect above.
[0016] In a fourth aspect, an embodiment of the present application proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the VSIPL library optimization method for the ARM platform as described in the first aspect above can be implemented.
[0017] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1It is a flowchart of a VSIPL library optimization method for an ARM platform provided by an embodiment of the present application;
[0019] Figure 2 is a code diagram of a data array provided by an embodiment of the present application;
[0020] Figure 3 An embodiment of the present application provides a flowchart for writing a processing function corresponding to a processing requirement and using the written processing function to perform data processing;
[0021] Figure 4 It is a schematic diagram of the structural components of a VSIPL library optimization system for an ARM platform provided by another embodiment of the present application;
[0022] Figure 5 It is a structural schematic diagram of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0023] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0024] The optimization of the VSIPL library on the ARM platform can be achieved using NEON technology. NEON technology provides a dedicated extension to the ARM instruction architecture, that is, additional instructions that can perform mathematical operations on multiple data streams in parallel. NEON accelerates data operations by providing 32 128-bit vector registers, each of which can correspond to multiple data channels and supports the use of SIMD instructions to operate on these multi-channel data simultaneously. The use of NEON technology can refer to the following methods:
[0025] 1) Compiler automatic vector optimization
[0026] Compiler automatic vector optimization means that when the compiler compiles the program code, it automatically identifies and uses the SIMD architecture to perform instruction-level parallel processing. Common optimization aspects include vectorization recognition, loop unrolling, instruction merging, data layout adjustment, and control flow optimization. When used, optimization can usually be performed through specific compilation options.
[0027] 2) Manually assemble NEON programs
[0028] For experienced programmers, hand-coded NEON assembler can achieve very high performance.
[0029] 3) Open source libraries supporting NEON:
[0030] Common libraries include NE10, OpenBLAS, Eigen, etc.
[0031] 4)NEON intrinsics
[0032] NEON intrinsic is a set of C and C++ functions defined in arm_neon.h, which are supported by both ARM compiler and GCC. The compiler replaces these function calls with an appropriate NEON instruction or NEON instruction sequence. When using it, programmers only need to focus on the high-level behavior of the algorithm and do not need to care about the underlying implementation of the code.
[0033] These four methods have different degrees of optimization. The lower-level optimization methods have better effects, but the learning curve is steeper, the development difficulty is greater, and there are still problems that need to be solved.
[0034] The first method has a higher development efficiency. Developers do not need to explicitly use NEON intrinsics or assembly language. When the O3 optimization option is turned on during compilation, the compiler will automatically identify and optimize the code. The optimized code is still a high-level language, which is easy to understand and maintain. However, its performance is not as good as manual optimization. The code cannot be automatically optimized to NEON instructions, and the compiler needs to analyze the code and apply vector optimization, which often causes extra time consumption and increases the compilation time.
[0035] The second method is to manually write assembly code to precisely control the execution of NEON instructions to achieve optimal performance. However, it is difficult and costly to develop. It requires developers to have deep knowledge of programming languages and architectures. Assembly code is difficult to read and maintain, and is prone to errors. At the same time, assembly code is highly dependent on the specific hardware platform, so its portability is also poor.
[0036] The third method usually uses the NEON instruction set for high optimization and designs a simplified and easy-to-use API interface, so that developers can more easily call the functions of these libraries, while also having high portability to different platforms. Among them, the NE10 library optimizes signal processing functions on the ARM platform, and the OpenBLAS library optimizes matrix-related operations using the basic linear algebra library interface and the linear algebra function library interface.
[0037] The fourth method provides a way to directly control the NEON instruction set, which can be used to tune the performance of specific algorithms, allowing developers to precisely control the execution of NEON instructions, so it is highly flexible. When using it, programmers only need to focus on the high-level behavior of the algorithm and do not need to worry about the underlying implementation of the code, so it is easier than manually writing assembly language.
[0038] However, the third and fourth methods are still immature and currently remain only in the theoretical stage.
[0039] In summary, considering the performance improvement effect, portability to different platforms, code operability and other aspects, it is more appropriate to choose NEON open source library and NEON intrinsics to optimize the VSIPL library.
[0040] Based on this, an embodiment of the present application proposes a VSIPL library optimization method for an ARM platform, which is applied to an electronic device, wherein the electronic device may be a terminal or a server. This embodiment and the following embodiments are all described using the server as an example. The implementation details of the VSIPL library optimization method for the ARM platform proposed in this embodiment are described in detail below. The following content is only the implementation details provided for ease of understanding and is not necessary for the implementation of this solution.
[0041] The specific process of the VSIPL library optimization method for the ARM platform proposed in this embodiment is as follows: Figure 1 As shown, including:
[0042] Step 101, add the header file of the target function library on the ARM platform to link the target function library, and initialize the target function library.
[0043] In the specific implementation, the server first needs to add the header file of the target function library on the ARM platform to link the target function library and initialize the target function library. Wherein, the target function library is the NE10 function library or the OpenBLAS function library. If data processing related to signal processing is required, the NE10 function library is selected as the target function library, and if data processing related to matrix operation is required, the OpenBLAS function library is selected as the target function library.
[0044] In an example, if the NE10 function library is selected as the target function library, the header files that need to be added on the ARM platform include ne10_types.h and ne10_fft.h.
[0045] In an example, if the OpenBLAS function library is selected as the target function library, the header files that need to be added on the ARM platform include cblas.h and lapack.h.
[0046] Step 102, read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed.
[0047] In a specific implementation, after linking to the target function library, the server can read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed.
[0048] It is worth noting that the VSIPL library encapsulates memory management through an object-based design. The smallest storage object in the VSIPL library is a data array. Several data arrays can form a block object. A block object is a continuous memory area for storing data. Several block objects allow for the construction of a view object in the form of a vector, matrix or high-level object. Each view object has a specific offset, length and stride. Accessing the data array stored in the VSIPL library needs to be implemented indirectly through view objects and block objects. If the stride of the data array to be accessed is 1 and the complex data storage method is interleaved storage, the data pointer of the data array to be accessed is directly provided to the library function interface. If the stride of the data array to be accessed is not 1 and the complex data storage method is block storage, the data array to be accessed needs to be rearranged to achieve memory alignment, and the data pointer after memory alignment is provided to the library function interface to read out the data to be processed.
[0049] In an example, the code structure of the data array can be as follows Figure 2 shown.
[0050] In one example, the required parameters corresponding to the data to be processed can be obtained and configured from the information carried by the target view object, or obtained and configured through a data parameter structure specific to the VSIPL library.
[0051] Step 103, calling the corresponding processing function from the target function library based on the processing requirements, and performing data processing on the data to be processed based on the processing function and required parameters to obtain a data processing result.
[0052] In the specific implementation, after the server reads the data to be processed from the target view object in the VSIPL library, determines the processing requirements corresponding to the data to be processed, and configures the required parameters based on the data to be processed, it can call the corresponding processing function from the target function library based on the processing requirements corresponding to the data to be processed, and perform data processing on the data to be processed based on the processing function and the required parameters to obtain the data processing results.
[0053] The NE10 library provides a large number of functions related to signal processing, such as using the ne10_fft_c2c_1d_float32_neon function to perform complex Fourier transforms. The OpenBLAS library is an open source optimized BLAs library that provides a large number of high-performance linear algebra functions, including matrix multiplication, matrix inversion, and vector dot product, such as using the cblas_sgemm function to perform matrix multiplication.
[0054] Step 104, output the data processing result according to the standard of the VSIPL library, and copy the output to the result view object of the VSIPL library.
[0055] In the specific implementation, the output of both the Ne10 function library and the OpenBLAS function library does not meet the standards of the VSIPL library, and such output cannot be stored in the VSIPL library. Therefore, the server needs to output the data processing results according to the standards of the VSIPL library, and then copy the output to the result view object (data array) of the VSIPL library.
[0056] In one example, after the server outputs the data processing results according to the standard of the VSIPL library and copies the output to the result view object of the VSIPL library, it also needs to release the target function library. After completing a data processing, the server immediately releases the target function library, which can save resources and quickly prepare for the next data processing.
[0057] In this embodiment, data processing is performed on the stored data in the VSIPL library on the ARM platform, which can improve the stability of the VSIPL library. When performing data processing, the header file of the target function library is first added on the ARM platform to link the target function library and initialize the target function library. Then, the data to be processed is read from the target view object in the VSIPL library, the processing requirements corresponding to the data to be processed are determined, and the required parameters are configured based on the data to be processed. Then, the corresponding processing function is called from the target function library based on the processing requirements, and the data to be processed is processed based on the processing function and the required parameters to obtain the data processing result. Finally, the data processing result is output according to the standard of the VSIPL library and copied to the result view object of the VSIPL library. The function library is selected and optimized in a targeted manner, which effectively improves the ability of the VSIPL library to process large-scale data and implement complex algorithms, meets the real-time requirements of signal processing, and enhances the universal applicability of the VSIPL library, which has broad application prospects.
[0058] In one embodiment, the ARM platform supports the NEON instruction set, and the processor deployed on the ARM platform supports NEON. If there is no processing function corresponding to the processing requirement in the target function library, the server can Figure 3 Each step shown in the figure writes a processing function corresponding to the processing requirements, and uses the written processing function to process the data, including:
[0059] Step 201 , adding a header file including arm_neon.h to a source file, wherein the header file including arm_neon.h defines all NEON intrinsics.
[0060] In a specific implementation, the server adds a header file including arm_neon.h to a C or C++ source file, wherein the header file including arm_neon.h defines all NEON intrinsics.
[0061] Step 202, 128-bit alignment is performed on the data to be processed to obtain aligned data.
[0062] In the specific implementation, NEON instructions require that data access must be 128-bit aligned, that is, the data used must be 128-bit aligned. Therefore, the server needs to align the data to be processed by 128 bits to obtain the aligned data, thereby improving the performance of the VSIPL library.
[0063] Step 203: Use NEON intrinsics to write a processing function corresponding to the processing requirement, and based on the written processing function and required parameters, perform data processing on the aligned data to obtain a data processing result.
[0064] In the specific implementation, the server uses NEON intrinsics to write a processing function corresponding to the processing requirements. The written processing function is usually used to perform vector operations. The server processes the aligned data based on the written processing function and required parameters to obtain the data processing result.
[0065] In one example, at compile time, the NEON instruction set may be enabled via the -mfpu=neon compilation option or the -mfloat-abi=softfp compilation option, ensuring that the -O2 or higher optimization option is included in the compiler command line to fully utilize the performance of the NEON instructions.
[0066] In one example, if the obtained data processing result cannot meet the requirements, that is, the performance improvement of the VSIPL library is insufficient, the written processing function needs to be readjusted and optimized.
[0067] Step 204, output the data processing result according to the standard of the VSIPL library, and copy the output to the result view object of the VSIPL library.
[0068] In the specific implementation, the output result of the NEON inline function does not meet the standard of the VSIPL library. Such output cannot be stored in the VSIPL library. Therefore, the server needs to output the data processing result according to the standard of the VSIPL library, and then copy the output to the data array of the result view object of the VSIPL library.
[0069] This embodiment supports function writing based on NEON for processing functions not in the target function library, so as to better optimize the VSIPL library and further improve the performance, stability and universal applicability of the VSIPL library.
[0070] Another embodiment of the present application proposes a VSIPL library optimization system for an ARM platform. The details of the VSIPL library optimization system for an ARM platform proposed in this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this example. Figure 4 It is a schematic diagram of the VSIPL library optimization system for the ARM platform proposed in this embodiment, including: a function library linking module 301, a data reading module 302, a data processing module 303 and a data output module 304.
[0071] The function library linking module 301 is used to add the header file of the target function library on the ARM platform to link the target function library and initialize the target function library. The target function library is the NE10 function library or the OpenBLAS function library.
[0072] The data reading module 302 is used to read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed.
[0073] The data processing module 303 is used to call the corresponding processing function from the target function library based on the processing requirements, and perform data processing on the data to be processed based on the processing function and required parameters to obtain the data processing results.
[0074] The data output module 304 is used to output the data processing results according to the standard of the VSIPL library and copy the output to the result view object of the VSIPL library.
[0075] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
[0076] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0077] In order to illustrate the superiority of the VSIPL library optimization method for the ARM platform proposed in this application, the performance comparison before and after optimizing the VSIPL library function in different ways is listed below.
[0078] Table 1: vsip_ccfftop_f function, comparison of the effect before and after optimization with Ne10 library
[0079]
[0080]
[0081] It can be seen from Table 1 that the speed of the signal processing function vsip_ccfftop_f can be increased by 3 to 5 times after being optimized by the Ne10 function library.
[0082] Table 2: Comparison of the vsip_ccholsol_f function before and after optimization with the OpenBLAS library
[0083]
[0084] As can be seen from Table 2, the performance of the matrix operation function vsip_ccholsol_f decreases significantly when the number of points is large. After being optimized by the OpenBLAS function library, the speed can be increased by 21 times.
[0085] Table 3: Comparison of compiler optimization and NEON intrinsic optimization results for vsip_cvdot_f function
[0086] Points Compiler optimization (μs) NEON intrinsic optimization (μs) Speedup 1024 2.6 0.9 2.8 2048 5.3 2.0 2.7 4096 10.9 3.9 2.8 8192 21.0 7.6 2.8
[0087] As can be seen from Table 3, the implementation method using NEON intrinsic functions is more effective than the compiler optimization method, with a speedup ratio of 2.8 times, and there is still room for optimization.
[0088] The application prospect of the VSIPL library optimization method for the ARM platform proposed in this application is very broad. In addition to playing an important role in software radar, it can also provide efficient and real-time signal processing capabilities in other fields, especially in situations where a large number of mathematical operations are required, which can significantly improve the processing speed and system performance. For example, in the field of wireless communication, the NEON-optimized VSIPL library can be used to quickly implement signal processing algorithms, such as fast Fourier transform, digital filter, channel encoding and decoding, etc. These algorithms are crucial in baseband processing and can improve the data processing speed and efficiency of wireless communication systems. In the field of multimedia processing, such as audio processing and video processing, the NEON-optimized VSIPL library can be used to implement audio effect processing, video encoding and decoding, image processing, etc. These applications require a large number of mathematical operations, and NEON's vector instructions can greatly improve the operation speed. At the same time, the VSIPL library can also be used in medical imaging, such as computer tomography (CT) and magnetic resonance imaging (MRI) data processing, which requires a large amount of image processing and analysis work. The NEON-optimized VSIPL library can accelerate these calculations and shorten the image processing time.
[0089] As ARM processors are increasingly used in various devices, the importance of NEON-optimized VSIPL libraries will become increasingly prominent.
[0090] Another embodiment of the present application provides an electronic device, such as Figure 5 As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute the VSIPL library optimization method for the ARM platform as described in the above-mentioned method embodiments.
[0091] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect other circuits such as peripheral devices, voltage regulators and power management circuits together, which are all well known in the art, so this article will not describe them further. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0092] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0093] Another embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the VSIPL library optimization method for the ARM platform as described in the above method embodiment is implemented.
[0094] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk and other media that can store program codes.
[0095] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A VSIPL library optimization method for an ARM platform, suitable for processing data stored in a VSIPL library on an ARM platform, It is characterized in that The method comprises: Adding a header file of a target function library on an ARM platform to link the target function library, and initializing the target function library; wherein the target function library is a NE10 function library or an OpenBLAS function library; Read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed; Based on the processing requirement, a corresponding processing function is called from the target function library, and based on the processing function and the required parameters, data processing is performed on the data to be processed to obtain a data processing result; The data processing result is output according to the standard of the VSIPL library, and the output is copied to the result view object of the VSIPL library.
2. The VSIPL library optimization method for ARM platform as claimed in claim 1, It is characterized in that The VSIPL library encapsulates memory management through an object-based design. The smallest storage object in the VSIPL library is a data array. Several data arrays form a block object. The block object is a continuous memory area for storing data. Several block objects are allowed to be constructed into a view object in the form of vector, matrix or height objects. Each view object has a specific offset, length and stride. Access to the data array stored in the VSIPL library is indirectly achieved through view objects and block objects. If the step size of the data array to be accessed is 1 and the complex data storage method is interleaved storage, the data pointer of the data array to be accessed is directly provided to the library function interface. If the step size of the data array to be accessed is not 1 and the complex data storage method is block storage, the data array to be accessed needs to be rearranged to achieve memory alignment, and the data pointer after memory alignment is provided to the library function interface.
3. The VSIPL library optimization method for ARM platform as claimed in claim 1, It is characterized in that The configuring the required parameters based on the data to be processed includes: Obtaining required parameters of the data to be processed from the information carried by the target view object and configuring them; Alternatively, the required parameters of the data to be processed are obtained and configured through the data parameter structure specific to the VSIPL library.
4. The VSIPL library optimization method for ARM platform as claimed in claim 1, It is characterized in that The ARM platform supports the NEON instruction set, and the processor deployed on the ARM platform supports NEON. If there is no processing function corresponding to the processing requirement in the target function library, the method further includes: Add the header file including arm_neon.h to the source file. The header file including arm_neon.h defines all NEON intrinsics. Performing 128-bit alignment on the data to be processed to obtain aligned data; Using NEON intrinsics to write a processing function corresponding to the processing requirement, and based on the written processing function and the required parameters, performing data processing on the aligned data to obtain a data processing result; The data processing result is output according to the standard of the VSIPL library, and the output is copied to the result view object of the VSIPL library.
5. The VSIPL library optimization method for ARM platform as claimed in claim 4, It is characterized in that At compile time, the NEON instruction set is enabled by the -mfpu=neon compilation option or the -mfloat-abi=softfp compilation option.
6. The VSIPL library optimization method for ARM platform as described in any one of claims 1 to 5, It is characterized in that If data processing related to signal processing is required, the NE10 function library is selected as the target function library. If data processing related to matrix operations is required, the OpenBLAS function library is selected as the target function library.
7. The VSIPL library optimization method for ARM platform as described in any one of claims 1 to 5, It is characterized in that After outputting the data processing result according to the standard of the VSIPL library and copying the output to the result view object of the VSIPL library, the method further includes: Release the target function library.
8. A VSIPL library optimization system for ARM platform, It is characterized in that The system comprises: a function library linking module, a data reading module, a data processing module and a data output module; A function library link module, used for adding a header file of a target function library on an ARM platform to link the target function library and initialize the target function library, wherein the target function library is a NE10 function library or an OpenBLAS function library; A data reading module is used to read the data to be processed from the target view object in the VSIPL library, determine the processing requirements corresponding to the data to be processed, and configure the required parameters based on the data to be processed; A data processing module, used for calling a corresponding processing function from the target function library based on the processing requirement, and performing data processing on the data to be processed based on the processing function and the required parameters to obtain a data processing result; The data output module is used to output the data processing results according to the standard of the VSIPL library and copy the output to the result view object of the VSIPL library.
9. An electronic device, It is characterized in that include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the VSIPL library optimization method for the ARM platform as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the VSIPL library optimization method for the ARM platform is implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Construction method for software radar middleware
CN111580790A
Software frequency domain matched filtering method based on VSIPL standard
CN118210483A
Object oriented component and framework architecture for signal processing
US20040045007A1
