PROGRAM FOR DECIDING PROCESSING BLOCK TO BE OPTIMIZED AND METHOD FOR DECIDING PROCESSING BLOCK TO BE OPTIMIZED
The program and method streamline the identification of optimization targets by analyzing compiler and profiling reports, achieving rapid and effective detection of high-impact processing blocks in software optimization.
Patent Information
- Application Number
- JP2021018328
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-02-08
- Publication Date
- 2024-09-18
- Estimated Expiration
- 2041-02-08
AI Technical Summary
Conventional software optimization methods require expert analysis of source code and hardware architecture to identify optimization targets, which is time-consuming and inefficient, especially under varied execution conditions.
A program and method that determine optimization target processing blocks by analyzing compiler and profiling reports to extract optimization indices and effect weights, enabling rapid identification of blocks with high optimization potential.
Facilitates fast detection of processing blocks with high optimization effects, matching expert-level performance without the need for manual code analysis, thus reducing turnaround time.
Smart Images

Figure 0007552405000009 
Figure 0007552405000010 
Figure 0007552405000015
Abstract
Description
[Technical field]
[0001] The present invention relates to a program and a method for determining a processing block to be optimized. [Background technology]
[0002] In recent years, the use of OSS (Open Source Software) has been attracting attention in the field of HPC (High Performance Computing), and there is a demand for shortening the TAT (Turn Around Time) of OSS performance optimization work in the latest HPC environment.
[0003] To shorten the TAT for performance optimization, it is necessary to speed up the detection of processing blocks to be optimized in the OSS. In other words, it is required to detect processing blocks that have a high optimization effect under the given OSS input data and parallel conditions (execution conditions).
[0004] For example, it is possible to identify functions or code with high cost or low performance index based on a profiling report output by a profiler under specific execution conditions. Functions or code with high cost or low performance index may be called hot spots. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 9-16436 [Patent Document 2] Japanese Patent Application Publication No. 6-175843 [Patent Document 3] JP 2003-44289 A Summary of the Invention [Problem to be solved by the invention]
[0006] However, in such conventional software optimization methods, the analysis of source code by experts with specialized knowledge of optimization and hardware architecture is essential to investigate the optimization effect, causes, and solutions of hot spots.
[0007] Furthermore, because optimization involves modifying the source code, finding a solution requires understanding the processing content of the source code around the hotspot, which takes a huge amount of time.
[0008] In addition, it is necessary to check hotspots and consider the optimization effect, causes, and solutions for each OSS execution condition. Therefore, it takes a huge amount of time to find a processing block with a high optimization effect based on the hardware specifications under general execution conditions such as a wide range of input data and parallel conditions. According to one aspect, the present invention aims to quickly detect an optimization target process block that has a high optimization effect. [Means for solving the problem]
[0009] For this reason, this optimization target processing block determination program causes the processor of the information processing device to extract an optimization method and an optimization non-application condition indicating the reason why the optimization method cannot be applied from an optimization report generated when the software is compiled, determine an optimization applicability index value for each of the multiple processing blocks included in the software based on the optimization method and the optimization non-application condition, and execute a process of determining an optimization target processing block to be optimized from among the multiple processing blocks included in the software based on the optimization applicability index value. Effect of the Invention
[0010] According to one embodiment, it is possible to quickly detect optimization target process blocks that have a high optimization effect. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a diagram illustrating a configuration of a computer system according to an embodiment. [Diagram 2] FIG. 1 is a diagram illustrating an example of a hardware configuration of a management apparatus of a computer system according to an embodiment. [Diagram 3] FIG. 1 illustrates a functional configuration of an optimization target processing block output unit of a computer system as an example of an embodiment. [Figure 4] FIG. 10 is a diagram illustrating an example of a high-cost processing block ranking in a computer system as an example of an embodiment. [Diagram 5] 11 is a diagram illustrating an example of information on difficulty level for each optimization type in a computer system as an example of an embodiment. FIG. [Figure 6] FIG. 10 is a diagram illustrating an example of a non-application condition of optimization in a computer system according to an embodiment; [Figure 7] 1 is a diagram illustrating an example of optimization index information for each processing block in a computer system as an example of an embodiment. FIG. [Figure 8] FIG. 10 is a diagram illustrating an example of a compiler optimization report in a computer system according to an embodiment. [Figure 9] FIG. 10 is a diagram illustrating an example of a compiler optimization report in a computer system according to an embodiment. [Figure 10] FIG. 10 is a diagram illustrating an example of a compiler optimization report in a computer system according to an embodiment. [Figure 11] 11 is a diagram illustrating information on difficulty level for each optimization type in a computer system as an example of an embodiment. FIG. [Figure 12] FIG. 11 is a diagram illustrating an example of optimization index information for each processing block in a computer system as an example of an embodiment. [Figure 13] 1 is a diagram illustrating an example of execution condition information in a computer system as an example of an embodiment; [Figure 14] 1 is a diagram illustrating an example of processing block cost information in a computer system as an example of an embodiment. [Figure 15]FIG. 10 is a diagram illustrating an example of a profiling report in a computer system according to an embodiment. [Figure 16] FIG. 10 is a diagram illustrating an example of a profiling report in a computer system according to an embodiment. [Figure 17] 1 is a diagram illustrating cost aggregation information of a processing block in a computer system as an example of an embodiment. FIG. [Figure 18] 11 is a diagram illustrating an example of applied effect weights for each optimization type in a computer system as an example of an embodiment. FIG. [Figure 19] 1 is a diagram illustrating an example of optimization target processing block presentation information in a computer system as an example of an embodiment. FIG. [Figure 20] FIG. 13 is a diagram illustrating a modified example of optimization target processing block presentation information in a computer system as an example of an embodiment. [Figure 21] 1 is a diagram illustrating an example of optimization target processing block presentation information in a computer system as an example of an embodiment. FIG. [Figure 22] 11 is a flowchart illustrating a method for outputting an optimization target processing block by a computer system as an example of an embodiment. [Diagram 23] 1 is a diagram illustrating a result of optimization detected by a management device of a computer system as an example of an embodiment, together with a result of a source code analysis by an expert using a conventional method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, an embodiment of the present optimization target processing block determination program and optimization target processing block determination method will be described with reference to the drawings. However, the embodiments shown below are merely examples, and there is no intention to exclude the application of various modified examples and techniques not explicitly stated in the embodiments. In other words, this embodiment can be implemented with various modifications within the scope of its purpose. In addition, each figure does not intend to include only the components shown in the figure, but can include other functions, etc.
[0013] (A) Configuration FIG. 1 is a diagram illustrating a schematic configuration of a computer system 1 as an example of an embodiment.
[0014] 1, a computer system 1 includes a computer 2 and a management device 3. The computer 2 and the management device 3 are connected via a communication path 4 such as a LAN (Local Area Network). The computing device 2 is a computer (information processing device) that executes software. The computing device 2 may realize HPC.
[0015] The computing device 2 may be a multi-core processor having multiple computing cores (processor cores), or may be a multi-processor system having multiple processors. Furthermore, the computing device 2 may be a parallel computing system in which multiple computers are connected.
[0016] The computing device 2 executes software having a plurality of processing blocks. The processing blocks may be called modules. The software may be OSS. In the following example, the computing device 2 executes OSS.
[0017] Furthermore, the computing device 2 may execute parallel processing for processing a plurality of processes in parallel. In the present computer system 1, the computing device 2 is provided with a plurality of processors and is provided with a function for processing a plurality of processes in parallel by the plurality of processors.
[0018] The management device 3 manages the computing device 2, and realizes performance optimization processing for software executed by the computing device 2. Hereinafter, software that is the target of the performance optimization processing may be referred to as optimization target software. In this embodiment, an example is shown in which the optimization target software is OSS. The optimization target software has multiple processing blocks.
[0019] The management device 3 may perform optimization on a processing block basis. The optimization may be called tuning. In the performance optimization process, the management device 3 realizes an optimization target processing block output function that determines and presents optimization target processing blocks to be targeted for optimization processing from among these processing blocks. FIG. 2 is a diagram illustrating an example of a hardware configuration of the management device 3 of the computer system 1 according to an embodiment.
[0020] The management device 3 is an information processing device (computer) and includes, for example, a processor 11, a memory 12, a storage device 13, a graphics processing device 14, an input interface 15, an optical drive device 16, a device connection interface 17, and a network interface 18 as components. These components 11 to 18 are configured to be able to communicate with each other via a bus 19.
[0021] The processor (processing unit) 11 controls the entire management device 3. The processor 11 may be a multiprocessor. The processor 11 may be, for example, any one of a CPU, an MPU (Micro Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), and an FPGA (Field Programmable Gate Array). The processor 11 may also be a combination of two or more types of elements among the CPU, MPU, DSP, ASIC, PLD, and FPGA.
[0022] The processor 11 executes a control program (optimization target process block output program: not shown), thereby realizing the function of an optimization target process block output unit 100, as exemplified in FIG.
[0023] The management device 3 realizes the function of the optimization target processing block output unit 100 by executing a program {optimization target processing block output program, OS (Operating System) program} recorded on, for example, a computer-readable non-transitory recording medium.
[0024] The program describing the processing contents to be executed by the management device 3 can be recorded on various recording media. For example, the program to be executed by the management device 3 can be stored in the storage device 13. The processor 11 loads at least a part of the program in the storage device 13 into the memory 12 and executes the loaded program.
[0025] The programs to be executed by the management device 3 (processor 11) may also be recorded in a non-transitory portable recording medium such as the optical disk 16a, the memory device 17a, or the memory card 17c. The programs stored in the portable recording medium are installed in the storage device 13 under the control of the processor 11, for example, and then become executable. The processor 11 may also read out and execute the programs directly from the portable recording medium.
[0026] The memory 12 is a storage memory including a ROM (Read Only Memory) and a RAM (Random Access Memory). The RAM of the memory 12 is used as a main storage device of the management device 3. The RAM temporarily stores at least a part of the program to be executed by the processor 11. The memory 12 also stores various data necessary for processing by the processor 11.
[0027] The storage device 13 is a storage device such as a hard disk drive (HDD), a solid state drive (SSD), or a storage class memory (SCM), and stores various data. The storage device 13 is used as an auxiliary storage device for the management device 3. The storage device 13 stores an OS program, a control program, and various data. The control program includes an optimization target processing block output program.
[0028] As the auxiliary storage device, a semiconductor storage device such as an SCM or a flash memory can also be used. Furthermore, a plurality of storage devices 13 may be used to configure a RAID (Redundant Arrays of Inexpensive Disks).
[0029] Furthermore, the storage device 13 may store various data that are generated when the optimization target processing block output unit 100 executes each processing.
[0030] A monitor 14a is connected to the graphics processing device 14. The graphics processing device 14 displays an image on the screen of the monitor 14a in accordance with an instruction from the processor 11. Examples of the monitor 14a include a display device using a CRT (Cathode Ray Tube) and a liquid crystal display device.
[0031] A keyboard 15a and a mouse 15b are connected to the input interface 15. The input interface 15 transmits signals sent from the keyboard 15a and the mouse 15b to the processor 11. The mouse 15b is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.
[0032] The optical drive device 16 uses a laser beam or the like to read data recorded on an optical disk 16a. The optical disk 16a is a portable, non-transient recording medium on which data is recorded so that it can be read by the reflection of light. Examples of the optical disk 16a include a DVD (Digital Versatile Disk), a DVD-RAM, a CD-ROM (Compact Disc Read Only Memory), and a CD-R (Recordable) / RW (ReWritable).
[0033] The device connection interface 17 is a communication interface for connecting peripheral devices to the management device 3. For example, a memory device 17a or a memory reader / writer 17b can be connected to the device connection interface 17. The memory device 17a is a non-transient recording medium equipped with a communication function with the device connection interface 17, such as a Universal Serial Bus (USB) memory. The memory reader / writer 17b writes data to a memory card 17c or reads data from the memory card 17c. The memory card 17c is a card-type non-transient recording medium.
[0034] The network interface 18 is connected to the communication path 4. The network interface 18 transmits and receives data to and from the computing device 2 via the communication path 4. The communication path 4 may be connected to other information processing devices, communication devices, and the like. FIG. 3 is a diagram illustrating a functional configuration of the optimization target processing block output unit 100 of the computer system 1 as one example of an embodiment. The optimization target process block output unit 100 detects process blocks for which optimization can be highly effective under given input data and parallel conditions (execution conditions).
[0035] As shown in FIG. 3, the optimization target processing block output unit 100 has functions as an optimization index extraction unit 101, an execution condition setting unit 102, a cost performance index extraction unit 103, an optimization effect index calculation unit 104, and an output control unit 105.
[0036] A compiler optimization report and a profiling report are input from a compiler (not shown) to the optimization target processing block output unit 100. The compiler may be executed in either the computing device 2 or the management device 3, or may be executed in an information processing device other than the computing device 2 and the management device 3.
[0037] The compiler optimization report is generated by the compiler when compiling software to be optimized, and indicates information regarding optimizations that have been applied to the software and information regarding optimizations that have not been applied (e.g., reasons for not applying them) (see, for example, FIGS. 8 to 10 described below). Note that the compiler optimization report is well known, and a detailed description thereof will be omitted.
[0038] A profiling report is generated by a profiler (performance analysis tool) attached to a compiler, and indicates various information collected by the profiler during program execution (see, for example, FIGS. 15 and 16 described below). The profiling report may include, for example, the frequency of function calls and the time required for them. Note that profiling reports are well known, and a detailed description thereof will be omitted.
[0039] The optimization index extraction unit 101 may select a processing block with a high cost as a candidate for optimization from among a plurality of processing blocks constituting the software to be optimized. For example, the optimization index extraction unit 101 may determine, as a candidate for optimization, a processing block whose cost set by a profiler is equal to or greater than a predetermined threshold value from among a plurality of processing blocks constituting the software to be optimized. FIG. 4 is a diagram illustrating an example of a high-cost processing block ranking in the computer system 1 as an example of an embodiment.
[0040] In the following, we will show an example in which OSS software is the software to be optimized and Fujitsu Limited's Development Studio is used as the compiler and profiler.
[0041] The high-cost processing block ranking shown in FIG. 4 is a list of multiple processing blocks included in the software to be optimized, arranged according to cost, with the processing blocks with the highest cost value at the top.
[0042] It should be noted that the top-ranked modules (processing blocks) in the high-cost processing block ranking shown in FIG. 4 are modules in the mathematical library code (FFT, MPI, etc.), and since tuning them on the software to be optimized is difficult, they are excluded from optimization by this management device 3.
[0043] Therefore, in the example shown in Fig. 4, two processing blocks (modules), qvan2_ and func_11_, are selected as optimization targets. The "_ (underscore)" at the end of qvan2_ and func_11_ represents any character.
[0044] These processing blocks may have a hierarchical structure with smaller processing blocks. For example, qvan2_ includes qvan2.1, qvan2.2, and qvan2.3 as processing blocks, and the upper processing block of these processing blocks qvan2.1, qvan2.2, and qvan2.3 corresponds to qvan2.
[0045] Based on the compiler optimization report, the optimization index extraction unit 101 creates optimization type difficulty information 201 in which an optimization index value based on the hardware specifications is set for each optimization type for each of a plurality of processing blocks included in the software to be optimized. FIG. 5 is a diagram illustrating the optimization type difficulty level information 201 in the computer system 1 as one example of the embodiment. The optimization type difficulty information 201 indicates the degree of ease of implementation for each optimization type under each non-optimization application condition.
[0046] The optimization type is an optimization method applied to a processing block. In the example shown in FIG. 5, nine types of optimization types (optimization methods) Opt-1 to Opt-9 are shown. For example, Opt-6 is software pipelining, and Opt-7 is SIMD (Single Instruction, Multiple Data). Hereinafter, any optimization type (optimization method) may be represented as Opt-n (n is a natural number). The optimization type is not limited to the method exemplified in FIG. 5, but may be other methods, and may be modified as appropriate.
[0047] The optimization non-application condition indicates the reason (condition) for which the optimization type cannot be applied. The optimization non-application condition can be said to be a factor (optimization exclusion factor) that inhibits the application of an optimization method when the optimization method is to be applied to a processing block.
[0048] 6 is a diagram illustrating an example of optimization non-application conditions in the computer system 1 as one example of an embodiment. In the example shown in this Fig. 6, six types of optimization non-application conditions Nc-1 to Nc-6 are shown.
[0049] 6, for example, Nc-5 indicates that a loop contains an executable statement that cannot be converted to SIMD. Hereinafter, any non-applicable condition may be represented as Nc-m (m is a natural number).
[0050] 5 is expressed as a matrix of nine types of optimization types (optimization methods) Opt-1 to Opt-9 and six types of optimization non-application conditions (optimization exclusion factors) Nc_1 to Nc_6. In addition, in this matrix, a numerical value indicating the applicability of the optimization is set for each combination. Hereinafter, the numerical value (index value) indicating the applicability of the optimization may be referred to as the optimization index value.
[0051] 5, an arbitrary numerical value between 0 and 1 is set as the optimization index value, with a smaller value indicating a more difficult application and a larger value indicating an easier application. The optimization index value may be considered a non-application condition indicating the difficulty of applying the optimization. In the optimization type difficulty information 201, a value indicating the ease of realization when applying the optimization method to the source code of the software to be optimized is set for each non-application condition.
[0052] For example, in the example shown in FIG. 5, an optimization index value of 0.8 is set for Opt-7 (SIMD conversion) to Nc-3 (branch (with IF statement)). This indicates that it is relatively easy to apply SIMD conversion as an optimization process to a processing block of the software to be optimized from the viewpoint of branching. On the other hand, an optimization index value of 0.4 is set for Nc-6 (the result may differ from that of serial execution due to data dependency, changes in assignment reference order, etc.) to Opt-7 (SIMD conversion). This indicates that it is relatively difficult to apply SIMD conversion as an optimization process to a processing block of the software to be optimized due to high data dependency. Note that an optimization index value of 0 also includes the case where the optimization method has already been applied.
[0053] In this way, the optimization type difficulty information 201 is configured by defining an optimization index value indicating the degree of difficulty of realization for each combination of an optimization type and a non-applicable condition. The optimization type difficulty information 201 may be called an optimization index table.
[0054] It is desirable that the optimization type difficulty information 201 is set in advance by a programmer or the like based on empirical rules. That is, for each optimization type, the programmer or the like identifies an optimization non-application condition (optimization exclusion factor) that may be a factor preventing the application of the optimization type, and sets the degree of the influence (ease of application, difficulty of application) as an optimization index value.
[0055] The optimization index value reflects the hardware specifications. Specifically, the hardware specifications are reflected in the optimization type and the optimization non-application conditions. For example, when the optimization environment has a SIMD circuit as a hardware specification, SIMDization is a candidate for the optimization type. The hardware specification of the SIMD circuit is also reflected in the SIMD length (the number of instructions that can be executed simultaneously). For example, the number of registers as a hardware specification is reflected in the lack of registers as a non-optimization condition. The optimization type difficulty level information 201 is stored in a predetermined storage area such as the memory 12 or the storage device 13, for example. Moreover, the optimization index extraction unit 101 sets optimization index information 202 for each processing block.
[0056] FIG. 7 is a diagram illustrating an example of the processing block optimization index information 202 in the computer system 1 as an example of the embodiment. 7 is represented as a matrix combining p types (p is a natural number) of processing blocks Blk_1 to Blk_p and n types of optimization types (optimization techniques) Opt-1 to Opt-n. In addition, optimization index values extracted from the optimization type difficulty information 201 are set at positions in this matrix corresponding to each combination of processing block and optimization type.
[0057] The optimization index extraction unit 101 extracts an optimization type and a non-application condition from the compiler optimization report of each processing block. Then, the optimization index extraction unit 101 refers to the optimization type-specific difficulty information 201 based on the combination of the optimization type and the non-application condition, and extracts an optimization index value corresponding to the combination of the optimization type and the non-application condition.
[0058] The optimization index extraction unit 101 sets the optimization index value extracted from the optimization type difficulty information 201 at the combination location of the corresponding processing block and optimization type in the processing block optimization index information 202.
[0059] 8 to 10 are diagrams excerpted from a compiler optimization report in the computer system 1 as one example of the embodiment. The compiler optimization report, some of which are shown in Figures 8 to 10, is generated by the compiler for the processing block qvan2_ (see Figure 4) and includes information indicating the optimization application state (optimization application conditions) (see symbol P1 in Figure 8 and symbol P2 in Figure 9). The compiler optimization report also includes information indicating that the optimization technique could not be applied (optimization non-application conditions) (see symbol P3 in Figure 10).
[0060] For example, by searching for a predetermined word such as "[OPTIMIZATON]" contained in the compiler optimization report, information indicating the optimization application state and the optimization non-application conditions may be extracted from the compiler optimization report.
[0061] Furthermore, the optimization index extraction unit 101 may extract information corresponding to the type of optimization and non-application conditions from information indicating the optimization application state and the optimization non-application conditions in the compiler optimization report.
[0062] Fig. 11 is a diagram for explaining the difficulty level information for each optimization type 201 in the computer system 1 as an example of an embodiment, and Fig. 12 is a diagram showing an example of the optimization index information for each processing block 202. Fig. 12 shows the optimization index information for each processing block 202 corresponding to the processing blocks qvan2.1, qvan2.2, and qvan2.3.
[0063] For example, qvan2.2 includes a combination of optimization types Opt-6, Opt-7 and Nc_3. The optimization index extraction unit 101 extracts each optimization index value of 0.8 of the non-applied condition Nc-3 corresponding to the optimization types Opt-6 and Opt-7 in the per-optimization type difficulty information 201, as shown in Fig. 11. Then, the optimization index extraction unit 101 sets the extracted optimization index value of 0.8 in correspondence with the optimization types Opt-6 and Opt-7 of qvan2.2 in the per-processing block optimization index information 202, as shown in Fig. 12.
[0064] qvan2.3 includes a combination of optimization types Opt-6, Opt-7 and Nc_6. The optimization index extraction unit 101 extracts each optimization index value of 0.4 of the non-applied condition Nc-6 corresponding to the optimization types Opt-6 and Opt-7 in the per-optimization type difficulty information 201, as shown in Fig. 11. Then, the optimization index extraction unit 101 sets the extracted optimization index value of 0.4 in correspondence with the optimization types Opt-6 and Opt-7 of qvan2.3 in the per-processing block optimization index information 202, as shown in Fig. 12.
[0065] In qvan2.1, since all applicable optimization types have been applied in the corresponding processing block, an optimization index value of 0 is extracted. Then, the optimization index extraction unit 101 sets the extracted optimization index value 0 in correspondence with the optimization types Opt-1 to Opt-9 of qvan2.1 in the per-processing-block optimization index information 202, as shown in FIG. The optimization index extraction unit 101 stores the created optimization index information 202 for each processing block in a predetermined storage area of the memory 12 or the storage device 13 .
[0066] The execution condition setting unit 102 creates the execution condition information 203 . The execution condition information 203 is information indicating the conditions (execution conditions) under which the computing device 2 executes the optimization target software. FIG. 13 is a diagram illustrating an example of the execution condition information 203 in the computer system 1 according to an embodiment.
[0067] 13, the execution conditions are configured as a combination of an input data condition and a parallel condition. In addition, Cnd_1 to Cnd_q (q is a natural number) are set as information for identifying each combination of the input data condition and the parallel condition. These Cnd_1 to Cnd_q may be expressed as conditions Cnd_1 to Cnd_q.
[0068] The input data condition is a condition for data input to the software to be optimized. For example, if the software to be optimized is a simulator, the input data condition may be a standard or condition for data input to the simulator. The execution condition setting unit 102 may set the input data condition by randomly sampling any point from the expected range of variation of the input data.
[0069] The parallel data condition is a condition for performing parallel calculation using a plurality of processors included in the calculation device 2, and is, for example, information such as the number of processors to be used for parallel calculation. The execution condition setting unit 102 may set the parallel data condition by randomly sampling any point from the expected variation range of the parallel condition. The cost performance index extraction unit 103 creates processing block cost information 204 based on the profiling report output from the profiler.
[0070] The profiler performs profiling on the processing blocks of the software to be optimized for each execution condition set by the execution condition setting unit 102, and creates a profiling report. The cost / performance index extraction unit 103 extracts the cost or performance index of each processing block from the profiling report for each execution condition created by the profiler.
[0071] The cost is, for example, CPU time, elapsed time, or power. The performance index is a value that indicates performance, such as IPC (Instructions Per Cycle), memory bandwidth, FLOPS, SIMD ratio, or average clock speed, and may be an index that depends on the hardware environment. Hereinafter, at least one of the cost and the performance index may be referred to as a cost / performance index. FIG. 14 is a diagram illustrating an example of the processing block cost information 204 in the computer system 1 as an example of the embodiment.
[0072] In the processing block cost information 204 illustrated in FIG. 14, the processing blocks (Blk_1 to Blk_p) are associated with the costs or performance indices (cost / performance index) for each of the conditions (Cnd_1 to Cnd_q). The information constituting the processing block cost information 204 is stored in a predetermined storage area of the memory 12 or the storage device 13 .
[0073] The cost / performance index extraction unit 103 performs statistical processing on the costs of all execution conditions for each processing block to calculate a representative cost. The cost / performance index extraction unit 103 also performs statistical processing on the performance indexes of all execution conditions for each processing block to calculate a representative performance index. The statistical processing may be, for example, calculation of an average value or a median value. At least one of the representative cost and the representative performance index may be expressed as a representative cost / performance index. Also, the representative cost / performance index may be simply expressed as a representative cost. The cost / performance index extraction unit 103 stores the calculated cost, performance index, representative cost, representative performance index, etc. in a predetermined storage area of the memory 12 or the storage device 13.
[0074] 15 and 16 are diagrams excerpted from profiling reports in the computer system 1 as an example of an embodiment. 15 and 16 show a part of a series of profiling reports generated by the profiler for the processing block qvan2_ (see FIG. 4).
[0075] The profiling reports illustrated in FIGS. 15 and 16 include information on the costs of the processing blocks qvan2.1 to 2.3 (see symbols P01 and P02 in FIG. 15 and symbol P03 in FIG. 16).
[0076] 17 is a diagram for explaining cost tabulation information of processing blocks in a computer system 1 as an example of an embodiment. The cost tabulation information illustrated in FIG. 17 shows the cost, cost ratio, and execution time for processing blocks qvan2.1-2.3 included in processing block qvan2_. The cost performance index extraction unit 103 may calculate these values for each processing block using values extracted from a profiling report.
[0077] The cost performance index extraction unit 103 may obtain the values of each cost of qvan2.1 to 2.3 extracted from the profiling report, and may register the values in the processing block cost information 204 by tallying them up as necessary.
[0078] The cost performance index extraction unit 103 may register the values of the cost ratios and the execution times of qvan2.1 to 2.3 extracted from the profiling report in the processing block cost information 204 and the cost aggregation information of the processing blocks, respectively.
[0079] The optimization effect index calculation unit 104 calculates an optimization effect index for each processing block. The optimization effect index is a value that indicates the effect of optimization performed on the processing block. The optimization effect index indicates whether the processing block can be effectively optimized.
[0080] The optimization effect index calculation unit 104 calculates the optimization effect index of each processing block based on the optimization index value of the processing block calculated by the optimization index extraction unit 101 and the applied effect weight for each optimization type. The optimization effect index calculation unit 104 calculates the optimization effect index based on the following formula (1). Optimization effect index = Σ(optimization index value × applied effect weight) (1) In this embodiment, an example in which the optimization effect index is a value of 1 or less will be shown. The applied effect weight is set in advance for each optimization type. The sum of the applied effect weights for each optimization type is 1.0 {Σ(applied effect weight for each optimization type)=1.0}. FIG. 18 is a diagram illustrating application effect weights for each optimization type in the computer system 1 as one example of the embodiment.
[0081] For example, SIMD and software pipelining are important for performance optimization in the A64FX processor environment. Therefore, in the example shown in Figure 18, an application effect weight of 0.45 is set for "Opt-6: Software pipelining" and an application effect weight of 0.55 is set for "Opt-7: SIMD". Note that other optimizations are assumed to have been applied by the compiler to the Asis source code. In this way, for example, it is desirable to set application effect weights in advance for one or more optimization types that the operator considers important for performance optimization. The optimization effect index calculation unit 104 stores the calculated optimization effect index in a predetermined storage area of the memory 12 or the storage device 13.
[0082] The output control unit 105 selects one or more processing blocks (optimization target processing blocks) that can effectively realize optimization from among multiple processing blocks included in the optimization target software based on the optimization effect index calculated by the optimization effect index calculation unit 104. Then, the output control unit 105 outputs information about the selected optimization target processing blocks as presentation information. The optimization target processing blocks may be said to be processing blocks that are recommended as candidates for optimization.
[0083] The output control unit 105 extracts processing blocks (optimization target processing blocks) whose optimization effect index values are equal to or greater than a threshold value from among a plurality of processing blocks included in the optimization target software. The optimization target processing block presentation information 205 is created by including these optimization target processing blocks. FIG. 19 is a diagram illustrating an example of optimization target processing block presentation information 205 in the computer system 1 as one example of the embodiment.
[0084] The optimization target processing block presentation information 205 illustrated in FIG. 19 is configured as a list in which multiple processing blocks that make up multiple pieces of optimization target software are arranged according to the value of the optimization effect index, with the processing block with the highest optimization effect index value being placed at the top.
[0085] Moreover, the optimization target process block presentation information 205 illustrated in FIG. 19 includes a representative cost, an optimization effect index, and an optimization index value (for each optimization type) in association with each process block.
[0086] In FIG. 19, the optimization effect index of each processing block is calculated by the above formula (1) using each of the multiple optimization index values related to the same processing block shown to the right.
[0087] The output control unit 105 acquires the representative cost / performance index (representative cost) for each processing block calculated by the cost / performance index extraction unit 103, and sets it in the optimization target processing block presentation information 205 in association with the corresponding processing block.
[0088] Furthermore, the output control unit 105 acquires the optimization effect index of the processing block calculated by the optimization effect index calculation unit 104, and sets it in the optimization target processing block presentation information 205 in association with the corresponding processing block.
[0089] Furthermore, the output control unit 105 refers to the optimization index information for each processing block 202 to acquire information on the optimization index value corresponding to the processing block, and sets it in the optimization target processing block presentation information 205 in association with the corresponding processing block.
[0090] It is desirable that the output control unit 105 extracts only processing blocks whose optimization effect index is equal to or greater than a predetermined threshold value (for example, 0.5), and presents them in the optimization target processing block presentation information 205.
[0091] The operator can determine a processing block with a high optimization effect by referring to the optimization target processing block presentation information 205 and selecting a processing block with a high optimization effect index value as the processing block to be optimized (optimization target processing block).
[0092] Furthermore, the operator can determine a processing block that is efficient in terms of cost as a processing block to be optimized by selecting a processing block with a high representative cost value (high cost) with reference to the optimization target processing block presentation information 205. Note that a high cost indicates that the cost ratio of the corresponding block to the total cost is high.
[0093] In addition, as a criterion for selecting an optimization target processing block, either the optimization effect index or the representative cost (cost) may be adopted with priority. For example, among multiple processing blocks, a processing block with a high optimization effect index may be selected with priority, and if there are processing blocks with the same optimization effect index, a processing block with a high representative cost may be selected with priority. Also, among multiple processing blocks, a processing block with a high representative cost may be selected with priority, and if there are processing blocks with the same representative cost, a processing block with a high optimization effect index may be selected with priority.
[0094] The operator can determine an optimization type (optimization method) that is easy to apply to a processing block by referring to the optimization target processing block presentation information 205, referring to the optimization index value, and selecting an optimization type (optimization method) with a high optimization index value.
[0095] In the example shown in FIG. 19, the optimization target processing block presentation information 205 has an optimization index value set corresponding to the processing block, but this is not limited to this and can be modified as appropriate. FIG. 20 is a diagram showing a modified example of the optimization target processing block presentation information 205 in the computer system 1 as one example of the embodiment.
[0096] In the example shown in FIG. 20, source code modification contents for each optimization type are provided instead of the optimization index values for each optimization type of the optimization target process block presentation information 205 shown in FIG.
[0097] The source code change content is information indicating specific changes that should be made to the source code in order to realize the optimization type, and may be, for example, information suggesting division or merging of loops.
[0098] For example, information that can be used as source code modification contents may be registered in a database or the like in association with the optimization type, and the output control unit 105 may extract this information from the database and use it.
[0099] The operator can refer to the optimization target processing block presentation information 205 and the pre-change source code configuration content for each optimization type to know the changes that should be made to the source code in order to realize the optimization type (optimization method), which is very convenient. FIG. 21 is a diagram illustrating an example of optimization target processing block presentation information 205 in the computer system 1 as one example of the embodiment.
[0100] In the example shown in FIG. 21, optimization target processing block presentation information 205 related to processing blocks qvan2.1 to 2.3 is shown, and an example is shown in which processing blocks with an optimization effect index equal to or greater than a threshold value (0.5 in this example) are detected as optimization targets.
[0101] In the optimization target process block presentation information 205 illustrated in Fig. 21, the optimization efficiency index and cost values of qvan2.2 are the highest. Therefore, the operator may determine the optimization of qvan2.2 as the optimization target. In addition, the output control unit 105 may refer to the optimization target process block presentation information 205 and present the process block having the highest optimization efficiency index and cost values to the operator as the optimization target process block. (B) Operation
[0102] An optimization target processing block output method by the computer system 1 as one example of the embodiment configured as described above will be described with reference to the flowchart (steps A1 to A8) shown in FIG.
[0103] In step A1, the compiler compiles the software to be optimized. The compiler creates a compiler optimization report. The profiler creates a profiling report.
[0104] In step A2, the optimization index extraction unit 101 extracts an optimization index value based on the hardware specifications from the optimization type difficulty information 201 for each of the multiple processing blocks included in the software to be optimized based on the compiler optimization report, and creates optimization index information 202 for each processing block.
[0105] In step A3, the execution condition setting unit 102 sets the execution conditions and creates the execution condition information 203. The execution condition setting unit 102 sets, for example, the range of variation of each of the input data conditions and the parallel conditions.
[0106] In step A4, the cost / performance index extraction unit 103 extracts the cost / performance index of each processing block from the profiling report for each execution condition created by the profiler.
[0107] In step A5, the cost / performance index extraction unit 103 checks whether extraction of the cost / performance index of each processing block for all execution conditions has been performed. If the result of the check shows that extraction of the cost / performance index of each processing block for all execution conditions has not been completed (see the "not completed" route in step A5), the process returns to step A4. On the other hand, when extraction of the cost / performance indexes of each processing block for all execution conditions has been completed (see the "End" route of step A5), the process proceeds to step A6. In step A6, the optimization effect index calculation unit 104 calculates the optimization effect index of each processing block.
[0108] In step A7, the output control unit 105 extracts processing blocks (optimization target processing blocks) whose optimization effect index values are equal to or greater than a threshold value from among a plurality of processing blocks included in the optimization target software.
[0109] In step A8, the output control section 105 outputs a list of optimization target processing blocks sorted by the representative cost or representative performance index as optimization target processing block presentation information 205. Thereafter, the process ends. (C) Effects
[0110] Thus, according to the computer system 1 as an example of an embodiment, the optimization index extraction unit 101 extracts an optimization index value based on the hardware specifications from the difficulty information for each optimization type 201 for each of a plurality of processing blocks included in the software to be optimized based on the compiler optimization report, and creates optimization index information for each processing block 202.
[0111] Moreover, the optimization effect index calculation unit 104 calculates the optimization effect index of each processing block based on the above formula (1). The optimization effect index indicates whether the processing block can be effectively optimized.
[0112] Then, the output control unit 105 extracts processing blocks (optimization target processing blocks) whose optimization effect index values are greater than or equal to a threshold value from among the multiple processing blocks contained in the optimization target software, and creates optimization target processing block presentation information 205 that lists these optimization target processing blocks according to the values of their optimization effect index.
[0113] By referring to this optimization target process block presentation information 205, an operator can quickly search for optimization target process blocks that can benefit from optimization.
[0114] In addition, the cost / performance index extraction unit 103 extracts the cost / performance index of each processing block from the profiling report for each execution condition created by the profiler, and statistically processes the cost / performance indexes for all execution conditions for each processing block to calculate a representative cost / performance index. The output control unit 105 sets the representative cost / performance index calculated in this manner in the optimization target processing block presentation information 205 in association with the processing block.
[0115] The operator can determine a processing block that is efficient in terms of cost as a processing block to be optimized by referring to the optimization target processing block presentation information 205 and selecting a processing block with a high representative cost value. Also, the operator can determine a processing block that can obtain high performance (e.g., has a short processing time) as a processing block to be optimized by referring to the optimization target processing block presentation information 205 and selecting a processing block with a high representative performance index value.
[0116] According to this computer system 1, by using a compiler optimization report generated when compiling the software to be optimized and a profiling report generated when executing the profiler included with the compiler, it is possible to quickly detect processing blocks to be optimized that have a high optimization effect based on the hardware specifications under the execution conditions.
[0117] FIG. 23 is a diagram showing the results of optimization detected by the management device 3 of the computer system 1 as one example of the embodiment, together with the results of source code analysis by an expert using a conventional method.
[0118] FIG. 23 shows an example of optimizing the processing block qvan2.2. For example, item number 0 indicates the current state (Asis) and shows the result of optimization using the optimization option "-Kfast".
[0119] Additionally, items 1, 2, 4, and 5 show the results of optimization using methods determined by experts, and it can be seen that the elapsed time is shorter and faster than the result of item 1. Of these items 1, 2, 4, and 5, the result of item 5 achieved the greatest speedup.
[0120] Item No. 3 shows the result of optimization detected by the management device 3 of this computer system 1. The result of item No. 3 is comparable to the optimization results by experts shown in items Nos. 1, 2, 4, and 5, and is equivalent to the result of item No. 5, which achieved the greatest speedup. In this way, the computer system 1 can achieve high performance equivalent to performance optimization performed by an expert. (D) Other The configurations and processes of this embodiment may be selected as necessary, or may be combined as appropriate. The disclosed technology is not limited to the above-described embodiment, but can be implemented in various modifications without departing from the spirit of the present embodiment.
[0121] For example, in the above-described embodiment, the optimization effect index calculation unit 104 calculates the optimization effect index using equation (1), and the cost / performance index extraction unit 103 statistically processes the cost / performance indexes of all execution conditions for each processing block to calculate a representative cost / performance index, but this is not limited to this. For example, the optimization effect index calculation unit 104 may calculate an optimization effect index that reflects the cost of a processing block. Specifically, the optimization effect index calculation unit 104 may calculate the optimization effect index based on the following formula (2).
[0122] Optimization effect index = Σ(optimization index value × applied effect weight) × processing block cost index (2) The cost index of a processing block is, for example, the elapsed time or clock count of the processing block. In addition, the applied effect weight is set in advance for each optimization type. The sum of the applied effect weights for each optimization type is 1.0 {Σ(applied effect weight for each optimization type)=1.0}.
[0123] In this way, since cost is reflected in the optimization effect index, by selecting a processing block with a high optimization effect index value as the processing block to be optimized, it is possible to efficiently determine a processing block that has a high optimization effect and is also high cost. Furthermore, at least a part of the functions of the management device 3 may be provided in the computing device 2, and may be implemented with appropriate modifications.
[0124] In the above-described embodiment, an example is shown in which the software to be optimized is OSS, but this is not limited to this, and software other than OSS may also be the software to be optimized, and various modifications can be made to the implementation. Furthermore, the above disclosure enables a person skilled in the art to implement and manufacture the present embodiment.
[0125] (E) Notes The following supplementary notes are further disclosed regarding the above embodiment. (Appendix 1) A processor of the information processing device extracting an optimization technique and an optimization non-application condition indicating a reason why the optimization technique cannot be applied from an optimization report generated when compiling the software; determining an optimization applicability index value for each of a plurality of processing blocks included in the software based on the optimization technique and the optimization non-application condition; A process block to be optimized is determined from among a plurality of process blocks included in the software based on the optimization applicability index value. A program for determining a process block to be optimized, the program causing a user to execute a process.
[0126] (Appendix 2) Calculating the optimization applicability index value based on the implementation ease corresponding to the optimization method and the optimization non-application condition, which is extracted from optimization type difficulty information that specifies the implementation ease for each of multiple types of non-application conditions for each of multiple types of optimization methods. 2. The optimization target processing block determination program according to claim 1, wherein the optimization target processing block determination program causes the processor to execute a process.
[0127] (Appendix 3) determining, from among a plurality of processing blocks included in the software, a plurality of processing blocks having the optimization applicability index value equal to or greater than a threshold value as the optimization target processing blocks; The plurality of processing blocks determined as the optimization target processing blocks are output as a list together with the optimization applicability index value. 3. The optimization target process block determination program according to claim 1 or 2, characterized in that the program causes the processor to execute a process.
[0128] (Appendix 4) extracting cost information of the plurality of processing blocks from a profiling report generated under a plurality of types of execution conditions for the software; Calculating a representative cost for each of the plurality of processing blocks based on each cost information obtained under the plurality of execution conditions; Based on the representative cost, a processing block having a high representative cost is preferentially determined as an optimization target processing block to be optimized from among a plurality of processing blocks included in the software. 4. The optimization target processing block determination program according to claim 1, further comprising a processor for executing the processing.
[0129] (Appendix 5) A process of extracting an optimization technique and an optimization non-application condition indicating a reason why the optimization technique cannot be applied from an optimization report generated when compiling the software; determining an optimization applicability index value for each of a plurality of processing blocks included in the software based on the optimization technique and the optimization non-application condition; determining an optimization target process block to be optimized from among a plurality of process blocks included in the software based on the optimization applicability index value; 2. A method for determining a processing block to be optimized, comprising the steps of:
[0130] (Appendix 6) Calculating the optimization applicability index value based on the implementation ease corresponding to the optimization method and the optimization non-application condition, which is extracted from optimization type difficulty information that specifies the implementation ease for each of multiple types of non-application conditions for each of multiple types of optimization methods. 6. The optimization target processing block determination method according to claim 5, wherein the processing is executed by the information processing device.
[0131] (Appendix 7) determining, from among the plurality of processing blocks included in the above, a plurality of processing blocks having the optimization applicability index value equal to or greater than a threshold value as the optimization target processing blocks; a process of outputting the plurality of processing blocks determined as the optimization target processing blocks together with the optimization applicability index value as a list; 7. The optimization target processing block determination method according to claim 5 or 6, wherein the information processing device executes the above.
[0132] (Appendix 8) extracting cost information of the plurality of processing blocks from a profiling report generated under a plurality of types of execution conditions for the software; A process of calculating a representative cost for each of the plurality of processing blocks based on each cost information obtained under the plurality of types of execution conditions; determining, based on the representative cost, from among a plurality of processing blocks included in the software, a processing block having a high representative cost as a processing block to be optimized by giving priority to the processing block; 8. The optimization target processing block determination method according to any one of claims 5 to 7, wherein the information processing device executes the above-mentioned. [Explanation of symbols]
[0133] 1. Computer System 2 Computing device 3 Management device 4. Communication Channel 11 Processors 12. Memory 13 Storage device 14 Graphics Processing Unit 14a Monitor 15 Input Interface 15a Keyboard 15b Mouse 16 Optical drive device 16a Optical disc 17 Device connection interface 17a Memory Device 17b Memory Reader / Writer 17c Memory Card 18 Network Interface 18a Network 19 Bus 100 Optimization target processing block output section 101 Optimization index extraction unit 102 Execution condition setting section 103 Cost Performance Index Extraction Unit 104 Optimization effect index calculation unit 105 Output control section 201 Difficulty information for each optimization type 203 Execution condition information 204 Processing Block Cost Information 205 Optimization target processing block presentation information
Claims
1. A processor of the information processing device extracting an optimization technique and an optimization non-application condition indicating a reason why the optimization technique cannot be applied from an optimization report generated when compiling the software; determining an optimization applicability index value for each of a plurality of processing blocks included in the software based on the optimization technique and the optimization non-application condition; A process block to be optimized is determined from among a plurality of process blocks included in the software based on the optimization applicability index value. A program for determining a process block to be optimized, the program causing a user to execute a process.
2. Calculating the optimization applicability index value based on the implementation ease corresponding to the optimization method and the optimization non-application condition, which is extracted from optimization type difficulty information that specifies the implementation ease for each of multiple types of non-application conditions for each of multiple types of optimization methods.
2. The optimization target process block determining program according to claim 1, wherein the optimization target process block determining program is executed by the processor.
3. determining, from among a plurality of processing blocks included in the software, a plurality of processing blocks having the optimization applicability index value equal to or greater than a threshold value as the optimization target processing blocks; The plurality of processing blocks determined as the optimization target processing blocks are output as a list together with the optimization applicability index value.
3. The optimization target process block determining program according to claim 1, further comprising: causing said processor to execute a process.
4. extracting cost information of the plurality of processing blocks from a profiling report generated under a plurality of types of execution conditions for the software; Calculating a representative cost for each of the plurality of processing blocks based on each cost information obtained under the plurality of execution conditions; Based on the representative cost, a processing block having a high representative cost is preferentially determined as an optimization target processing block to be optimized from among a plurality of processing blocks included in the software.
4. The optimization target process block determination program according to claim 1, wherein the program causes the processor to execute a process.
5. A process of extracting an optimization technique and an optimization non-application condition indicating a reason why the optimization technique cannot be applied from an optimization report generated when compiling the software; determining an optimization applicability index value for each of a plurality of processing blocks included in the software based on the optimization technique and the optimization non-application condition; determining an optimization target process block to be optimized from among a plurality of process blocks included in the software based on the optimization applicability index value; 2. A method for determining a processing block to be optimized, comprising the steps of:
Citation Information
Patent Citations
Program generator for sampling execution information
JP1994175843A
Support method for optimization of parallel program
JP1997016436A
Program execution device
JP2001142718A
Compilation method, compiler, recording medium storing the compiler, storage device storing object code prepared by compilation method and processor provided with the storage device
JP2003044289A
Design support program, design support device, and design support method
JP2010113384A
