Vector processor, control method of vector processor, and program

The extended vector load instruction optimizes vector register utilization by loading short vectors with power-of-two address intervals, addressing inefficiencies in conventional vector processors and enhancing operation efficiency.

JP2024134067AActive Publication Date: 2024-10-03NEC PLATFROMS LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023044163
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2024-10-03
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

Conventional vector processors inefficiently utilize vector registers when processing short vectors due to unused blocks and inefficient data transfer control when dividing vector registers into subvector registers, leading to decreased efficiency in vector operations.

Method used

Implementing an extended vector load instruction that loads multiple short vectors from main memory into vector registers with address intervals that are powers of two, optimizing the use of vector registers by storing short vectors efficiently without altering the architecture of conventional processors.

Benefits of technology

Enhances the utilization efficiency of vector registers and improves vector operation efficiency by effectively storing and processing short vectors, thereby improving throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024134067000001_ABST
    Figure 2024134067000001_ABST
Patent Text Reader

Abstract

To provide a vector processor which efficiently acquires and stores, in a vector register, multi-dimensional data including some short vectors, stored in regular but inconsecutive addresses in a main storage unit.SOLUTION: A vector processor includes a data control apparatus and a vector register. When receiving an extended vector load command, the data control apparatus loads a plurality of short vectors of multi-dimensional data arranged regularly in a main storage unit, to a vector register. Address interval in the vector register for storing the loaded short vectors is squares of 2.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a vector processor, a control method for a vector processor, and a program. [Background technology]

[0002] The following patent documents are cited as documents relating to vector registers.

[0003] Patent document 1 relates to an apparatus comprising a processing circuit for performing vector processing operations.

[0004] Patent Document 2 relates to a processing unit that executes a memory access instruction for accessing memory to a plurality of addresses with one instruction.

[0005] Patent Document 3 relates to a vector processing device that improves the efficiency of vector processing.

[0006] Patent Document 4 relates to a vector register that is divided into a plurality of sub-registers for use. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] Special Publication No. 2020-501270 [Patent Document 2] Japanese Patent Application Publication No. 2018-194946 [Patent Document 3] Japanese Patent Application Laid-Open No. 2013-182420 [Patent Document 4] Special Publication No. 58-053786 Summary of the Invention [Problem to be solved by the invention]

[0008] The following analysis is given by the inventor.

[0009] Vector processors are designed to perform high-speed data processing called SIMD (Single Instruction, Multiple Data) operations, which perform the same calculations on a large amount of data. To process a large amount of data at high speed, vector processors have registers called vector registers, which, for example, have a fixed length of 64 elements and store the data on which SIMD calculations are performed, and are optimized to perform high-speed calculations on each element of one block of the vector register all at once.

[0010] When a conventional vector load instruction (hereinafter sometimes referred to as the VLD (Vector Load) instruction) loads a vector from main memory to a vector register, and a vector shorter than, for example, 64 elements, which is the maximum length that can be stored in a vector register, is loaded, invalid elements that do not hold valid data are present. In other words, when the length of the vector (hereinafter referred to as the vector length or VL (Vector Length)) is very short, many unused blocks are present in the vector register. This poses a problem of reduced efficiency during vector operations.

[0011] In other words, conventional vector processors have not considered applications that perform operations on large amounts of short vectors (hereinafter also referred to as short vectors). When multidimensional data containing short vectors is retrieved from main memory and stored in a vector register using the VLD instruction, the vector is stored as being much shorter than the length of the register block, resulting in little valid data in the register block and a lot of invalid data. As a result, the vector register is used inefficiently and the vector arithmetic unit cannot be used efficiently.

[0012] In Patent Document 4, in order to efficiently process short vectors, the vector register is divided into sub-vector registers and used to reduce invalid blocks that do not hold data in the vector register. However, with the method in Patent Document 4, when the vector register is divided into sub-vector registers, the data transfer control must be changed from the data transfer control when the vector register is not divided into sub-vector registers, which poses a problem that the control method becomes complicated.

[0013] The present invention aims to provide a vector processor, a control method for a vector processor, and a program that contribute to improving the utilization efficiency of vector registers and the efficiency of vector operations by efficiently retrieving and storing multidimensional data, including several short vectors, stored in regular but non-contiguous addresses in main memory, into vector registers. [Means for solving the problem]

[0014] According to a first aspect of the present invention, there is provided a vector processor including a data control unit and a vector register, When the extended vector load instruction is input, the data control unit loads a plurality of short vectors of multidimensional data regularly arranged in the main memory into a vector register; A vector processor can be provided in which the address spacing in the vector register that stores the loaded multiple short vectors is a power of two.

[0015] According to a second aspect of the present invention, there is provided a vector processor including a data control unit and a vector register, a data control unit that, when an extended vector load instruction is input, loads a plurality of short vectors of multidimensional data regularly arranged in a main memory into a vector register; A method for controlling a vector processor can be provided in which the address spacing in a vector register that stores multiple loaded short vectors is a power of 2. This method is associated with a specific machine, a computer, that executes the method for controlling a vector processor.

[0016] According to a third aspect of the present invention, a computer is provided with: When an extended vector load instruction is input, a process is executed to load a plurality of short vectors of multidimensional data regularly arranged in the main memory into a vector register; The address spacing in the vector register that stores the loaded multiple short vectors can be provided as a program, which is a power of two.

[0017] These programs can be recorded on a computer-readable storage medium. The storage medium can be a non-transient medium such as a semiconductor memory, a hard disk, a magnetic recording medium, or an optical recording medium. The present invention can also be embodied as a computer program product. [Effects of the Invention]

[0018] According to the present invention, it is possible to provide a vector processor, a control method for a vector processor, and a program that contribute to enabling efficient acquisition and storage of multidimensional data, including several short vectors (short vectors), stored in regular but non-contiguous addresses in a main memory device, in a vector register, thereby improving the utilization efficiency of the vector register and the efficiency of vector operations. [Brief explanation of the drawings]

[0019] [Figure 1] FIG. 1 is a diagram illustrating an example of a configuration of a vector processor according to an embodiment of the present invention. [Figure 2] 1 is a diagram illustrating an example of the configuration of a computer including a vector processor according to a first embodiment of the present invention. [Figure 3]FIG. 2 is a diagram illustrating an example of a configuration of a vector register according to the first embodiment of the present invention. [Figure 4] FIG. 2 is a diagram illustrating an example of multidimensional data according to the first embodiment of the present invention. [Figure 5] FIG. 1 is a diagram illustrating an example of a case where a short vector of multidimensional data is stored in a vector register according to the prior art. [Figure 6] FIG. 10 is a diagram illustrating an example in which a short vector is stored in a vector register according to the first embodiment of the present invention. [Figure 7] FIG. 2 is a diagram illustrating an example of an extended VLD instruction according to the first embodiment of the present invention. [Figure 8] FIG. 1 is a flowchart of a prior art process of a data control unit for storing vector data in a vector register according to the prior art. [Figure 9] FIG. 3 is a flowchart showing a process of the data control device for storing vector data in a vector register according to the first embodiment of the present invention. [Figure 10] FIG. 2 is a diagram showing the configuration of a computer that constitutes the data control device of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0020] First, an overview of one embodiment of the present invention will be described with reference to the drawings. Note that the reference numerals attached to the drawings in this overview are attached to each element for convenience as an example to facilitate understanding, and are not intended to limit the present invention to the illustrated form. Furthermore, connecting lines between blocks in the drawings and the like referred to in the following description include both bidirectional and unidirectional lines. Unidirectional arrows are used to schematically indicate the flow of the main signal (data) and do not exclude bidirectionality.

[0021] 1 is a diagram showing an example of the configuration of a vector processor according to an embodiment of the present invention. Referring to FIG. 1, a vector processor 10 includes a data control unit 13 and a vector register (VR) 11.

[0022] When an extended vector load instruction is input, the data control unit 13 loads multiple short vectors of multidimensional data regularly arranged in the main memory device 12 into the vector register. The address interval (distance) in the vector register 11 that stores the multiple loaded short vectors, for example, the address interval between the first blocks of the short vectors stored in the vector register 11, is a power of 2. Here, the address interval being a power of 2 means that the address interval in the vector register 11 between two adjacent stored short vectors (the address interval between the blocks storing the short vectors in the vector register 11) is 2 for the first power of 2, 4 for the second power of 2, and 8 for the third power of 2.

[0023] In addition, we will create a new extended VLD instruction that extends the conventional VLD instruction and efficiently stores short vectors in vector registers.

[0024] When short vectors are regularly stored in the main memory 12, multiple short vectors are loaded into the vector register using the extended VLD instruction to utilize the unused vector register blocks. The loaded data is sent to the arithmetic unit for processing in the same way as a single long vector. The arithmetic unit processes the multiple short vectors stored in the vector register as a single vector. In order to perform vector arithmetic processing on multiple acquired short vectors without making any special changes to the architecture of a conventional vector processor, the address intervals (distances) of the blocks storing the short vectors in the vector register are divided into addresses that are powers of two.

[0025] The operand of the extended VLD instruction for multidimensional data is implemented by utilizing the free space of a conventional general VLD instruction. That is, the operand of the extended vector load instruction stores a numerical value representing the main memory address interval (stride) for storing multidimensional data in the main memory 12 in the free space of a conventional general VLD instruction. The data control unit 13 loads multiple short vectors from the main memory 12 into the vector register 11 based on the main memory address interval represented by the numerical value.

[0026] In addition, the vector length specification instruction that specifies the VL (vector length) required for the extended VLD instruction is also implemented in the same manner as the extended VLD instruction. Other instructions similar to the extended VLD instruction that operate on vector registers are also extended in the same manner as the extended VLD instruction. That is, when an extended vector length specification instruction that specifies the vector length in each dimension of multidimensional data is input, the data control unit 13 retrieves from the main memory device 12 multiple short vectors to be loaded into the vector register 11 according to the vector length in each dimension. The distance is determined from the extended vector length specification instruction.

[0027] As described above, according to one embodiment of the present invention, it is possible to provide a vector processor, a control method for a vector processor, and a program that contribute to enabling multidimensional data including several short vectors (short vectors) stored in regular but non-contiguous addresses in a main memory to be efficiently acquired and stored in a vector register, thereby improving the utilization efficiency of the vector register and the efficiency of vector operations.

[0028] [First embodiment] Next, a vector processor according to a first embodiment of the present invention will be described with reference to the drawings. Figure 2 is a diagram showing an example of the configuration of a computer equipped with the vector processor according to the first embodiment of the present invention. In Figure 2, components with the same reference numerals as those in Figure 1 indicate the same components.

[0029] The computer 100 in FIG. 2 includes a vector processor 10 and a main memory device 12 according to the first embodiment of the present invention.

[0030] A first embodiment of the present invention will be described with reference to Fig. 2 to Fig. 9. As shown in Fig. 2, a vector processor 10 according to the first embodiment of the present invention includes a vector register (VR) 11, a data control device 13, an arithmetic unit 14, a control unit 15, and a CPU (Central Processing Unit) 200. The main memory device 12 may be disposed within the vector processor 10. The CPU 200 may also be disposed outside the vector processor 10.

[0031] Fig. 3 is a diagram showing an example of the configuration of a vector register according to the first embodiment of the present invention. The vector register 11 shown in Fig. 2 includes a plurality of register blocks 20 shown in Fig. 3. The register blocks 20 shown in Fig. 3 include, for example, 64 blocks numbered 0 to 63 for storing a single piece of data.

[0032] In Figure 3, as an example, register block 20 is composed of 64 blocks, but it is not intended to limit the number of blocks that register block 20 has to 64, and the number of blocks that register block 20 has may be any number other than 64.

[0033] Fig. 4 is a diagram showing an example of multidimensional data according to the first embodiment of the present invention. As shown in Fig. 4, each row of a two-dimensional data structure 30 includes elements 31 (shown with diagonal lines) that store valid data to be calculated, and elements 32 that store data that are not to be calculated. The example of multidimensional data according to the first embodiment of the present invention shown in Fig. 4 is an example of two-dimensional data composed of elements in 7 rows and 100 columns.

[0034] 4 shows an example of two-dimensional data having a short vector, but it is not intended to limit the number of dimensions of multidimensional data having a short vector that is the target of the extended VLD instruction to 2. The number of dimensions of multidimensional data can be increased as long as it can be specified by the operand of the extended VLD instruction, as shown in an example of the extended VLD instruction of the first embodiment of the present invention shown in FIG. 7 described later.

[0035] In the first embodiment of the present invention, elements 31 storing valid data to be operated on are stored at three consecutive addresses on the main memory device 12, forming a three-element short vector. Note that the 100 elements of data on each row, including elements 31 storing valid data to be operated on and elements 32 storing data not to be operated on, as shown in Figure 4, are also arranged consecutively on the main memory device 12. The leading elements of the three-element short vector are arranged at intervals of 100 elements on the main memory device 12.

[0036] The vector processor 10 performs SIMD operations on the entire two-dimensional data shown in FIG.

[0037] FIG. 5 shows an example of a conventional technique for storing a short vector of multidimensional data in a vector register. In the example shown in FIG. 5, valid data 41 is stored in blocks 0 to 2 of register block 20 of vector register 11, and invalid data 42 is stored in blocks 3 to 63, using a conventional VLD instruction. When vector processor 10 retrieves a three-element short vector from main memory 12 into vector register 11, it retrieves 64 pieces of data, the size of register block 20. However, in the data shown in FIG. 4, the interval between three-element short vectors is greater than 64 addresses in main memory. Therefore, only one three-element short vector is stored as valid data 41 in blocks 0 to 2 of register block 20, and invalid data 42 is stored in the remaining 61 blocks 3 to 63. As a result, blocks 3 to 63 are not effectively used.

[0038] FIG. 6 is a diagram showing an example in which a three-element short vector is stored in the vector register 11 according to the first embodiment of the present invention.

[0039] 6, the extended VLD instruction proposed in the present invention stores valid data 41 in blocks 0 to 2 and blocks 4 to 6 in register block 20, and stores invalid data 43 in blocks 3 and 7. As shown in Fig. 6, in the first embodiment of the present invention, a three-element short vector is truncated in two dimensions and retrieved from main memory device 12 and stored in register block 20, thereby making effective use of blocks of register block 20 that conventionally stored invalid data, such as blocks 4, 5, 6, and 8 of register block 20 shown in Fig. 6, for storing valid data 41.

[0040] Distance 44, which is the interval at which short vectors are stored, is controlled by data control device 13 so that calculation unit 14 can be used without modification of conventional vector processor 10. An interval at a power of 2 is, for example, 2 for the first power of 2, 4 for the second power of 2, and 8 for the third power of 2.

[0041] 4 is stored in vector register 11, the minimum distance 44 that can store a three-element short vector is 4, and the maximum number of short vectors that can be stored in register block 20 is 16, which is the quotient of 64 divided by 4. When storing two-dimensional data having 16 or more three-element short vectors in vector register 11 using the extended VLD instruction of the present invention, it is necessary to execute the extended VLD instruction multiple times.

[0042] FIG. 7 is a diagram showing an example of an extended VLD instruction 60 according to the first embodiment of the present invention.

[0043] A conventional VLD instruction uses a total of four bytes of space, consisting of one byte representing the operation code (OPECODE) 61, one byte representing the address 62 of the vector register 11 that stores the data, one byte representing the address 63 of the main memory 12 where the data is stored, and one byte representing the stride 64, which indicates the main memory address interval where the data is stored on the main memory 12, and four bytes of the operand are unused.

[0044] In contrast, the extended VLD instruction 60 of the first embodiment of the present invention, an example of which is shown in Figure 7, contains one byte representing an opcode 61, one byte of numerical value representing the address 62 of the vector register 11 that stores the data, one byte of numerical value representing the address 63 of the main memory 12 where the data is stored, and one byte of numerical value representing the stride 64 in which the data of dimension 1 is stored on the main memory 12.In addition, a numerical value representing the stride, which is the storage interval for multi-dimensional data of dimensions higher than two, is stored in the unused four-byte area of ​​the conventional VLD instruction.

[0045] By combining the conventional stride for one dimension (stride for dimension 1, 64) with the extended strides for four dimensions, namely, stride for dimension 2, 65, stride for dimension 3, 67, and stride for dimension 5, 68, it is possible to load up to five-dimensional data into the vector register with a single extended VLD instruction. That is, the operand of the extended vector load instruction stores a numerical value representing the main memory address interval (stride for each dimension) at which each multidimensional data is stored in the main memory 12, and the data control unit 13 can load multiple short vectors from the main memory into the vector register 11 based on the main memory address interval (stride for each dimension) represented by the numerical value.

[0046] As an example, the stride for the two-dimensional data shown in Fig. 4 will be described. As mentioned above, Fig. 4 is an example of two-dimensional data composed of elements of a matrix with 7 rows and 100 columns. In the case of the two-dimensional data shown in Fig. 4, the stride 64 of dimension 1 is "1", and the stride 65 of dimension 2 is "100".

[0047] The stride of each dimension can be set to "zero." When the stride is set to zero, the operation is similar to a copy, in which the same data is acquired repeatedly. The number of times the data is acquired repeatedly is determined by the vector length specification instruction, which specifies the vector length (VL) of each dimension. As an example, in the case of two-dimensional data, if the stride of the first dimension is "1," the stride of the second dimension is "zero," the vector length (VL) of the first dimension is "3," and the vector length (VL) of the second dimension is "2," the operation is to copy a three-element short vector twice from the starting address specified by the extended VLD instruction and store it in vector register 11 at a distance of "4" (an interval that is a power of two).

[0048] Next, we will explain the case of three-dimensional data configured by stacking two layers of two-dimensional data (7 rows and 100 columns) shown in FIG. 4 in the height direction. In the case of such three-dimensional data, in the extended VLD instruction 60 of the first embodiment of the present invention, an example of which is shown in FIG. 7, the stride 64 of dimension 1 (first dimension) is "1," the stride 65 of dimension 2 (second dimension) is "100," and the stride 66 of dimension 3 (third dimension) is "100 x 7 = 700." However, since the extended VLD instruction 60 shown in FIG. 7 has 8 bits for each dimension, it can only be specified in the range from 0 to 255. Therefore, it is necessary to divide the extended VLD instruction 60. As another example of a method for specifying a stride, the stride of each dimension may be specified by the number of times the dimension immediately below is repeated. For example, in the case of three-dimensional data configured by stacking two layers of two-dimensional data (7 rows and 100 columns) shown in Figure 4 in the height direction, the strides may be specified as follows: 1 for dimension 1, 100 for dimension 2, and 7 for dimension 3. In this case, the actual strides on the main memory device can be calculated by the data control unit 13 as follows: 1 x 100 = 100 for dimension 2, 1 x 100 x 7 = 700 for dimension 3, etc. In this way, the data control unit 13 can load multiple short vectors from the main memory device 12 into the vector register 11 based on the strides of each dimension.

[0049] 7 shows an example of an 8-byte extended VLD instruction, but the number of bytes in the extended VLD instruction is not intended to be limited to 8 bytes, and the extended VLD instruction may be configured with any number of bytes other than 8. In the extended VLD instruction 60 shown in FIG. 7, each stride is specified with one byte, but the number of bytes or bits specified may be changed flexibly, for example, to 2 bytes, or 10 bits or 20 bits, rather than just byte specification, to increase the range of integers that can be specified for each stride. By changing the way the number of bits is specified, the maximum number of dimensions that can be specified by the extended VLD instruction 60 or other instructions may vary.

[0050] In addition to extending the VLD instruction, the vector length specification instruction for specifying VL (vector length), which indicates the length of each dimension of multidimensional data, is also extended to match the extended VLD instruction. A conventional vector length specification instruction uses a total of three bytes: one byte representing the opcode, one byte representing the length of each dimension, and one byte representing the address of the vector register where the corresponding data is stored, leaving five bytes of unused space. The extended vector length specification instruction of the first embodiment of the present invention can support dimensions equivalent to those of the extended VLD instruction by storing one byte representing the length of the vector in each dimension of the multidimensional data in four of the five unused bytes of the conventional vector length specification instruction.

[0051] In addition, other instructions that operate on vector registers similar to the VLD instruction, such as a vector store instruction, are also expanded in the same way as the operands of the expanded VLD instruction shown in FIG.

[0052] Next, the operation of the data control device according to the first embodiment of the present invention will be described. Fig. 8 is a flowchart showing the conventional process of the data control device 13 for storing vector data in a vector register according to the conventional technique.

[0053] 8, in the flowchart of the prior art, processing starts in step S801. In step S802, a conventional VLD instruction and a conventional vector length specification instruction are issued from the CPU 200 to the control unit 15 of the vector processor 10, and the control unit 15 of the vector processor 10 sends the conventional VLD instruction and the conventional vector length specification instruction to the data control unit 13. The conventional vector length specification instruction includes a vector length (VL).

[0054] In step S803, the data control device 13 transmits to the main memory device 12 the address of the data to be acquired.

[0055] In step S804, in order to retrieve data from the main memory device 12 to the vector register 11, the data control device 13 associates the data to be retrieved from the main memory device 12 with the vector register 11 as the storage destination.

[0056] In step S805, the data control device 13 stores the data in the vector register 11, and in step S806, it checks whether there is any data that has not been stored in the vector register 11. That is, when acquiring data, the data control device 13 counts the number of pieces of data stored in the vector register and checks whether acquisition of all data has been completed. If there is any data that has not been stored in the vector register 11 (step S806, Yes), the process returns to step S805 and the data is stored in the vector register 11.

[0057] In order to check whether all data has been acquired, the number of data to be counted is determined from the vector length (VL).

[0058] If there are no elements that have not been stored in the vector register (step S806, No), the process proceeds to step S807, and the control unit 15 is notified of the completion of the conventional VLD instruction.

[0059] The process of the conventional art flowchart ends at step S808.

[0060] FIG. 9 is a flowchart showing the processing of the data control device 13 for storing vector data in the vector register 11 according to the first embodiment of the present invention.

[0061] The processing of the first embodiment of the present invention shown in Figure 9 begins in step S901. In step S902, the CPU 200 issues an extended VLD instruction and an extended vector length specification instruction to the control unit 15 of the vector processor 10, and the control unit 15 of the vector processor 10 sends the extended VLD instruction and the extended vector length specification instruction to the data control unit 13. The extended vector length specification instruction is an instruction that specifies the vector length of each dimension of multidimensional data. That is, the extended vector length specification instruction determines the length of data in each dimension to be retrieved from the main memory, and the stride of the address where the data in each dimension is stored in the main memory 12 is determined according to the stride of each dimension of the operand of the extended VLD instruction.

[0062] In step S903, the data control unit 13 transmits the address of each short vector that the data control unit 13 wishes to acquire to the main memory unit 12 in order to acquire the data of each short vector from the main memory unit 12 to the vector register 11. That is, the data control unit 13 determines the address in the main memory unit 12 where the data constituting each short vector is stored, based on the main memory unit address 63 of the extended VLD instruction 60, the strides 64 to 68 of each dimension, and the vector length of each dimension of the extended vector length specification instruction, and transmits the address to the main memory unit 12.

[0063] Next, in step S904, the data control device 13 checks whether there are any short vectors whose addresses have not yet been transmitted. If there are any short vectors whose addresses have not yet been transmitted (step S904, Yes), the process returns to step S903 and transmits the address of the data of each short vector to be acquired to the main storage device 12. If there are no short vectors whose addresses have not yet been transmitted (step S904, No), the process proceeds to step S905.

[0064] In step S905, in order to retrieve data from the main memory device 12 to the vector register 11, the data control device 13 associates the data retrieved from the main memory device 12 with the vector register 11 as the storage destination.

[0065] In step S906, in accordance with the linking in step S905, the data control unit 13 stores the data of each short vector transmitted from the main memory device 12 corresponding to the address transmitted to the main memory device 12 in each block 0 to 63 of the register block 20 of the vector register 11 based on the distance, which is a power of 2 determined by the storage destination VR address 62 of the extended VLD instruction 60 and the vector length of each dimension of the extended vector length specification instruction. Also, in step S907, it is checked whether there is any data that has not been stored in the vector register 11. That is, when retrieving data, the data control unit 13 counts the number of pieces of data stored in the vector register 11 and checks whether retrieval of all data has been completed. If there is any data that has not been stored in the vector register (step S907, Yes), the process returns to step S906 and stores the data in the vector register 11.

[0066] If there is no data that has not been stored in the vector register 11 (step S907, No), the process proceeds to step S908, where the control unit 15 is notified of the completion of the extended VLD instruction. To determine whether data acquisition is complete, the data control unit 13 counts the number of pieces of data stored in the vector register 11 and confirms whether acquisition of all data has been completed. The number of pieces of data to be counted is determined by the product of the vector length (VL) of each short vector and the number of vectors.

[0067] As described above, according to the first embodiment of the present invention, when data is retrieved from main memory into a vector register using the extended VLD instruction for a multidimensional data structure in which short vectors are regularly arranged on main memory and stored, instead of retrieving a single short vector into a register block as in the past, dimensions from the second dimension onwards are expanded and retrieved into the register block, thereby improving the utilization efficiency of the vector register and the utilization efficiency of the arithmetic unit, and contributing to improving the throughput of the vector processor compared to conventional methods.

[0068] Therefore, according to the first embodiment of the present invention, it is possible to provide a vector processor, a control method for a vector processor, and a program that contribute to enabling multidimensional data including several short vectors (short vectors) stored in regular but non-contiguous addresses in a main memory to be efficiently acquired and stored in a vector register, thereby improving the utilization efficiency of the vector register and the efficiency of vector operations.

[0069] [Second embodiment] Next, a second embodiment of the present invention will be described.

[0070] In the first embodiment of the present application, an address and a stride are specified by the extended VLD instruction shown in Fig. 7, and the length of the vector to be acquired is specified by another instruction, for example. However, it is not intended to limit the method of acquiring data in a vector register to only the embodiment of such an instruction.

[0071] In the second embodiment of the present invention, as an example, the operands specifying the stride for each dimension of the extended VLD instruction shown in FIG. 7 may be reduced, and the freed operands may be used to specify the length of the vector, thereby enabling vector data to be obtained with only one instruction.

[0072] Therefore, according to the second embodiment of the present invention, it is possible to provide a vector processor, a control method for a vector processor, and a program that contribute to enabling multidimensional data including several short vectors (short vectors) stored in regular but non-contiguous addresses in a main memory to be efficiently acquired and stored in a vector register, thereby improving the utilization efficiency of the vector register and the efficiency of vector operations.

[0073] [Third embodiment] Next, a third embodiment of the present invention will be described.

[0074] 9 shows a flowchart of the processing of the first embodiment of the present invention, which is a flowchart of the data control device 13 for retrieving data from the main memory into a vector register using an extended VLD instruction. The flowchart of the processing of the first embodiment of the present invention describes how to repeatedly send addresses for the number of short vectors to collect data in order to retrieve multiple short vectors from the main memory. However, it is not intended that the method for retrieving short vectors from the main memory be limited to this method.

[0075] In the third embodiment of the present invention, as another example of a method, the data control device 13 may send to the main memory device 12 the acquisition address of the first short vector data of the short vector data to be acquired, the interval between each short vector, and the number of short vectors, and the control unit of the main memory device 12 may aggregate this data and send it to the vector register.

[0076] Therefore, according to the third embodiment of the present invention, it is possible to provide a vector processor, a control method for a vector processor, and a program that contribute to enabling multidimensional data including several short vectors (short vectors) stored in regular but non-contiguous addresses in a main memory to be efficiently acquired and stored in a vector register, thereby improving the utilization efficiency of the vector register and the efficiency of vector operations.

[0077] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and further modifications, substitutions, and adjustments can be made without departing from the basic technical concept of the present invention. For example, the network configurations, element configurations, and message expression formats shown in the drawings are examples to aid in understanding the present invention, and the present invention is not limited to the configurations shown in these drawings. Furthermore, "A and / or B" is used to mean at least either A or B.

[0078] Furthermore, the procedures shown in the first to third embodiments can be realized by a program that causes a computer (9000 in FIG. 10) that functions as the vector processor or data control device of a vector processor of the present invention to realize the functions of the vector processor or data control device of a vector processor. Such a computer is exemplified by a configuration including a CPU (Central Processing Unit) 9010, a communication interface 9020, a memory 9030, and an auxiliary storage device 9040 in FIG. 10. That is, the CPU 9010 in FIG. 10 executes a control program for the vector processor or the data control device of a vector processor, and performs an update process for each calculation parameter stored in the auxiliary storage device 9040, etc.

[0079] The memory 9030 is a RAM (Random Access Memory), a ROM (Read Only Memory), or the like.

[0080] In other words, each part (processing means, function) of the vector processor or the data control device of the vector processor shown in the above-mentioned first to third embodiments can be realized by a computer program that causes the processor of the above-mentioned computer to execute each of the above-mentioned processes using its hardware.

[0081] Finally, preferred embodiments of the present invention will be summarized. [First form] (See the first aspect of vector processors above) [Second form] In the vector processor according to the first aspect, a numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the extended vector load instruction; Preferably, the data control unit loads the plurality of short vectors from the main storage device into the vector register based on the main storage address interval represented by the numerical value. [Third Form] In the vector processor described in the first embodiment, it is preferable that when an extended vector length specification instruction specifying the vector length in each dimension direction of the multidimensional data is input, the data control device retrieves the multiple short vectors to be loaded into the vector register from the main memory device according to the vector length in each dimension direction. [Fourth Form] Preferably, the vector processor according to the first aspect further includes an arithmetic unit that processes the plurality of short vectors stored in the vector register as a single vector. [Fifth Form] (See the second aspect of vector processor control above.) [Sixth Form] In a fifth aspect of the control method for a vector processor, a numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the extended vector load instruction; Preferably, the data control unit loads the plurality of short vectors from the main storage device into the vector register based on the main storage address interval represented by the numerical value. [7th form] In the control method for a vector processor described in the fifth aspect, it is preferable that when an extended vector length specification instruction specifying the vector length in each dimension direction of the multidimensional data is input, the data control device retrieves the multiple short vectors to be loaded into the vector register from the main memory device according to the vector length in each dimension direction. [8th form] (See the third perspective program above) [9th Form] In the program according to an eighth aspect, a numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the extended vector load instruction; The computer, It is preferable to execute a process of loading the plurality of short vectors from the main storage device into the vector register based on the main storage address interval represented by the numerical value. [10th Form] The program according to the eighth aspect includes: It is preferable that when an extended vector length specification instruction specifying the vector length in each dimension direction of the multidimensional data is input, a process is executed to retrieve from the main memory the multiple short vectors to be loaded into the vector register according to the vector length in each dimension direction. The fifth and eighth forms can be expanded into the fourth form, just like the first form.

[0082] The disclosures of the above-cited patent documents are incorporated herein by reference. Modifications and adjustments of the embodiments and examples are possible within the scope of the entire disclosure of the present invention (including the claims), and further based on the basic technical concept thereof. Furthermore, various combinations and selections of the various disclosed elements (including each element of each claim, each element of each embodiment or example, each element of each drawing, etc.) are possible within the scope of the disclosure of the present invention. In other words, the present invention naturally embraces various modifications and alterations that would be possible by a person skilled in the art in accordance with the entire disclosure and technical concept, including the claims. In particular, with regard to the numerical ranges set forth herein, any numerical value or subrange within the range should be construed as specifically set forth, even if not otherwise specified. Furthermore, the disclosures of the above-cited documents, when used in part or in whole in combination with the disclosures herein as part of the disclosure of the present invention, in accordance with the spirit of the present invention, are also deemed to be included in the disclosures of this application. [Explanation of symbols]

[0083] 10 Vector Processors 11 Vector Registers 12 Main storage 13 Data control device 14 Arithmetic section 15 Control Unit 20 Register Blocks 30 Two-dimensional data structures 31 Elements that store valid data to be operated on 32 Elements that store data that is not the target of an operation 41 Valid Data 42, 43 Invalid data 44 Distance 60 Extended VLD Instruction 61 Opcode 62 Address of vector register 11 where data is stored 63 Address of main memory 12 where data is stored 64 Dimension 1 Stride 65 Dimension 2 Stride 66 Dimension 3 Stride 67 Dimension 4 Stride 68 Dimension 5 Stride 100 computers 200 CPU 9000 computers 9010 CPU 9020 Communication Interface 9030 Memory 9040 Auxiliary storage device

Claims

1. 1. A vector processor including a data control unit and vector registers, When an extended vector load instruction is input, the data control device loads a plurality of short vectors of multi-dimensional data regularly arranged in a main storage device into the vector register; A vector processor, wherein the address spacing within the vector register that stores the loaded short vectors is a power of two.

2. A numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the expanded vector load instruction, 2. The vector processor of claim 1, wherein said data control unit loads said plurality of short vectors from said main memory into said vector registers based on said main memory address interval represented by said numerical value.

3. 2. The vector processor according to claim 1, wherein when an extended vector length specification instruction that specifies a vector length in each dimension direction of the multidimensional data is input, the data control unit retrieves from the main memory the multiple short vectors to be loaded into the vector register in accordance with the vector length in each dimension direction.

4. 2. The vector processor of claim 1, further comprising an arithmetic unit that processes the plurality of short vectors stored in the vector register as a single vector.

5. 1. A vector processor including a data control unit and vector registers, When an extended vector load instruction is input, the data control device loads a plurality of short vectors of multi-dimensional data regularly arranged in a main storage device into the vector register; 11. A method for controlling a vector processor, comprising: storing a plurality of loaded short vectors in said vector register with an address spacing that is a power of two.

6. A numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the expanded vector load instruction, 6. The method of claim 5, wherein said data control unit loads said plurality of short vectors from said main memory into said vector register based on said main memory address interval represented by said numerical value.

7. 6. The method of controlling a vector processor according to claim 5, wherein when an extended vector length specification instruction that specifies the vector length in each dimension direction of the multidimensional data is input, the data control device retrieves from the main memory device the multiple short vectors to be loaded into the vector register in accordance with the vector length in each dimension direction.

8. On the computer, When an extended vector load instruction is input, a process is executed to load a plurality of short vectors of multi-dimensional data regularly arranged in a main memory into a vector register; A program, comprising: a vector register for storing the loaded short vectors, the address spacing of which is a power of two.

9. A numerical value representing a main memory address interval for storing each multidimensional data on the main memory is stored in an operand of the expanded vector load instruction, The computer includes:

9. The program of claim 8, further comprising a process of loading the plurality of short vectors from the main memory into the vector register based on the main memory address interval represented by the numerical value.

10. The computer includes:

9. The program according to claim 8, wherein when an extended vector length specification instruction that specifies the vector length in each dimension direction of the multidimensional data is input, a process is executed to retrieve from the main memory the multiple short vectors to be loaded into the vector register according to the vector length in each dimension direction.

Citation Information

Patent Citations

  • Electronic clock

    JP1983053786A

  • Vector processor and vector processing method

    JP2013182420A

  • Arithmetic processing device and control method for arithmetic processing device

    JP2018194946A

  • Partition Replicate Instruction

    JP2020501270A