WO2018139266A1 - 演算処理装置、情報処理装置、方法、およびプログラム - Google Patents

演算処理装置、情報処理装置、方法、およびプログラム Download PDF

Info

Publication number
WO2018139266A1
WO2018139266A1 PCT/JP2018/000988 JP2018000988W WO2018139266A1 WO 2018139266 A1 WO2018139266 A1 WO 2018139266A1 JP 2018000988 W JP2018000988 W JP 2018000988W WO 2018139266 A1 WO2018139266 A1 WO 2018139266A1
Authority
WO
WIPO (PCT)
Prior art keywords
statistical information
bit
data
fixed
processing apparatus
Prior art date
Application number
PCT/JP2018/000988
Other languages
English (en)
French (fr)
Inventor
真紀子 伊藤
充 伴野
輝雄 石原
勝洋 依田
隆弘 野津
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to EP18744586.1A priority Critical patent/EP3575952B1/en
Publication of WO2018139266A1 publication Critical patent/WO2018139266A1/ja
Priority to US16/515,110 priority patent/US11137981B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49942Significance control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/483Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F5/00Methods or arrangements for data conversion without changing the order or content of the data handled
    • G06F5/01Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
    • G06F5/012Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising in floating-point computations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/506Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages
    • G06F7/507Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages using selection between two conditionally calculated carry or sum values
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Definitions

  • the present invention relates to an arithmetic processing device, an information processing device including the arithmetic processing device, a method, and a program.
  • integer arithmetic using fixed-point numbers is performed without using floating-point numbers. It is possible to use it. This is because integer arithmetic can simplify the circuit configuration rather than floating point arithmetic.
  • FIG. 1 is a diagram illustrating the Q3.12 format.
  • the Q3.12 format defines 16-bit data with 1 sign bit, 3 digits in the integer part, and 12 digits after the decimal point.
  • the decimal point position that is, the number of digits in the integer part and the number of digits after the decimal point are different for each variable.
  • Dynamic Fixed Point dynamic fixed point number
  • the range of the variable is acquired during execution, and the decimal point position is reviewed at a fixed timing. Therefore, it can be said that the Mixed-> Fixed-> Point operation and the Dynamic-> Fixed-> Point operation add the aspect of the floating-point operation to the fixed-point operation that is easier to process than the floating-point operation.
  • DSP Digital Signal Processor
  • An operation instruction with a block shift designation performs an operation with a bit width larger than the bit width of the variable, shifts a value from the operation result, cuts out the value, and stores it in a variable register.
  • the shift amount S for example, ⁇ 128 to 127) for extracting a value from the operation result can be specified by an immediate value / general register.
  • S ⁇ the DSP arithmetically shifts the operation result to the right, that is, shifts the right by embedding the sign bit, and deletes the lower bits.
  • S ⁇ 0 the DSP shifts the arithmetic result to the arithmetic left, that is, shifts to the left while maintaining the sign bit, and deletes the lower bit in the complement.
  • BCLS output is a function in which the DSP takes “count” leading ”sign” of the operation result and writes the result into a register.
  • count leading sign means the position of the most significant bit 1 (the position of the most significant bit 0 in the negative number). For example, when the DSP executes max (block_count_leading_sign (in1 (operator) in2) -1), the position of bit 1 of the most significant positive number (the most significant bit in the negative number) is obtained from the operation result of the variable in1 The position of bit 0) is recorded in the register.
  • Figure 2 shows recognition when deep learning uses single-precision floating-point numbers (Single-Precision-Floating-Point), half-precision floating-point numbers (Half-Precision-Floating-Point), fixed-point numbers (Fixed-point), and Dynamic-Fixed-Point numbers.
  • the error rate is exemplified (see Non-Patent Document 1).
  • the data on the first line (Goodfellow et al. (2013)) are the evaluation results of other papers.
  • Prop indicates the bit width at the time of data propagation in recognition (forward direction) and learning (backward direction).
  • Up Indicates the bit width when updating the weighting coefficient.
  • PI MNIST, MNIST, CIFAR-10, and SVHN indicate data sets used for deep learning.
  • the presence / absence of an overflow is recorded for each computation or variable assignment, and the overflow rate (the number of overflowed operations with respect to the total number of operations, the overflowed assignment with respect to the total number of assignments). Number of times) is calculated.
  • the decimal point position of each variable is changed by the following procedures 1 and 2 for each predetermined period. (Procedure 1) When the overflow rate is larger than the specified value (rmax), the decimal point position is lowered by one. (Procedure 2) If the value twice the overflow rate is less than the specified value (rmax), the decimal point position is increased by one.
  • the recognition error rate does not increase significantly even in the result of the single precision floating point number, the half precision floating point number, the fixed point number, and the Dynamic Fixed Point number. .
  • an object of the present invention is to execute deep learning accurately with a fixed-point number so that the circuit scale and power consumption can be reduced.
  • the arithmetic processing unit includes an acquisition circuit that acquires statistical information about a distribution of bits in the fixed-point number data after execution of an instruction for the fixed-point number data, and an update that updates a decimal point position of the fixed-point number data A circuit.
  • FIG. 1 It is a figure which illustrates the structure of the hardware circuit of a statistical information aggregation part. It is a figure which illustrates the structure of the hardware circuit of a statistical information storage part. It is a modification of a statistics information gathering part. It is a figure which illustrates the structure of the hardware circuit of a statistical information storage part. It is a figure which illustrates the structure of the hardware circuit of a statistical information storage part. It is a figure which illustrates the structure of the statistical information storage part of a modification. It is a figure which illustrates the structure of the statistical information storage part of a modification. It is a figure which illustrates an instruction format. It is a figure which illustrates an instruction format.
  • the information processing apparatus performs deep learning. [Example of deep learning]
  • the neural network may be a hardware circuit, or may be a virtual network formed by software that connects layers that are virtually constructed on a computer program.
  • the neural network executes, for example, a forward direction process for recognizing and identifying an image and a backward direction process for determining a parameter used in the forward direction process. Note that the processing in the backward direction is referred to as Back Propagation (BP).
  • BP Back Propagation
  • FIG. 3 executes a convolution layer process and a pooling layer process on an input image, extracts image features, and identifies the image. That is, FIG. 3 illustrates the processing in the forward direction.
  • a convolution layer process and a pooling layer process are performed on an input image that is an Input Layer, and a 4-feature map, a 6-feature map, and the like are sequentially generated.
  • the feature map is, for example, data transmitted / received through different channels of the image, or data corresponding to R, G, B data of the image.
  • the neural network in FIG. 3 outputs the identification result in the final connected Fully connected multilayer perceptron (MLP).
  • MLP Fully connected multilayer perceptron
  • the pooling layer is also referred to as a sub-sampling layer.
  • the final layer is also referred to as a fully connected layer.
  • the arithmetic circuit portion that repeatedly executes the convolution layer processing up to the final layer and the pooling layer processing is called a feature extraction unit. That is, the feature extraction unit extracts the thinned image by repeatedly executing the convolution layer processing and the pooling layer processing on the input image.
  • the process of the convolution layer is also called a convolution operation.
  • the processing of the pooling layer is also called a pooling operation or a subsampling operation.
  • the feature extraction unit performs, for example, m ⁇ m weights w on information of an image having N ⁇ N pixels in a layer in the forward direction (layer 1-1).
  • the feature extraction unit executes this convolution operation to create information on the image of the next layer (lth layer) from the image of the currently processed layer (l-1th layer).
  • the area of m ⁇ m pixels is hereinafter referred to as a unit rectangular area.
  • the unit rectangular area is not limited to one feature map.
  • the convolution operation is performed using a plurality of feature maps. May be executed.
  • a pixel is also referred to as a cell.
  • Pooling calculation is a process of thinning an image having N ⁇ N pixels into an image having N / k ⁇ N / k pixels.
  • N ⁇ N pixels are divided into k ⁇ k partial images, and one pixel having the maximum pixel value among k ⁇ k pixels included in each partial image is obtained.
  • a process for selecting a pixel (hereinafter referred to as max pooling) can be exemplified.
  • a process of generating one pixel by an average value of k ⁇ k pixels can be exemplified.
  • the identification unit obtains an output value by applying a weight to each pixel and executing a convolution operation on all pixels in the thinned image.
  • the last layer of the feature extraction unit as the l-1 layer, each pixel value of the l-1 layer and y l-1 j, the operation results convolutions by a total binding and x l i, the weight w l Assuming ⁇ 1 ji , x l i can be expressed by the following (formula 3).
  • I l i is a bias component
  • FIG. 4 illustrates backward direction learning processing together with recognition processing and identification processing in the forward direction.
  • the recognition process in the forward direction is executed by a convolution layer that performs a convolution operation on the input image and a pooling layer that performs a thinning process.
  • the identification process for outputting the identification result is executed by all the coupling layers (denoted as Fully connected in FIG. 4).
  • the result of the identification processing by all the connected layers is compared with correct answer data, and a difference value as a comparison result is output as an error.
  • the error is used for the learning process.
  • the learning process is a process of calculating an error in each layer and a next weight in each layer in the convolutional layer and the fully connected layer in the forward direction from the error.
  • a current weight and one weight w i of the convolution layer (one layer), one weight w j in total binding layer (one layer) is exemplified.
  • one weight w i + 1 in the convolution layer (one layer) one weight w j + 1 is illustrated in all binding layer (one layer).
  • Equation 5 when the sum of squares of the difference values between the output value y i as the identification result and the correct answer data Ti is illustrated as an evaluation function, it can be defined as (Equation 5).
  • the learning process can be considered as a process of determining the weight w for minimizing the error evaluation function exemplified in (Equation 5).
  • Equation 5 (Equation 5) is partially differentiated by y l i , and the pixel value x l i of all coupling layers is one by the output value y l-1 j from the input-side layer (layer 1-1) (formula Considering the expression as 3), (Equation 10) is obtained.
  • Equation 1 When the pixel value x l i, j of the l-th layer is expressed by (Equation 1) by the output value y l-1 j from one input-side layer (l-1th layer), Equation (10) becomes (Equation 11).
  • the left side of (Expression 10) indicates the error of the l-th layer.
  • the right side of (Equation 10) is a total of the results of multiplying the error of the (l + 1) th layer by the weight variable w i, j between the pixel i of the lth layer and the pixel j of the (l + 1) th layer. This total is calculated for the pixel j of the (l + 1) th layer related to the pixel i of the lth layer.
  • (Formula 12) is obtained by partial differentiation of (Formula 5) with the weight w l ij , applying the transition rule, and further substituting (Formula 3).
  • (Equation 3) is the relationship between the output y from the 1-1 layer and the pixel value x of the l layer
  • (Equation 12) is the relationship between the output y from the first layer and the first layer. The relationship is the pixel value x of the l + 1 layer.
  • (Equation 12) shows the gradient of the error evaluation function E.
  • the product of the gradient of the error evaluation function E and the learning coefficient eta becomes the change amount of the weight W (the difference value between the current weight Wt and the next weight Wt + 1). Therefore, in the following description, the gradient of the error evaluation function E is defined as the update amount deltaW of the weight W.
  • (Expression 14) shows the relationship between the current weight Wt and the weight Wt + 1 in the next recognition process. Therefore, the second term on the right side of (Equation 14) is the increment value to the next weight. Further, the Greek letter eta in (Equation 14) is a coefficient for obtaining the increment value of the weight Wt from the gradient of the error evaluation function E, and can be set empirically and experimentally, for example. That is, in the learning process, the gradient according to (Equation 12) (or Equation 13) is obtained in each layer of the learning circuit, and the increment value of the second term of (Equation 14) is set in the direction in which the error evaluation function E becomes smaller. A process of calculating and obtaining the next weight Wt + 1 is executed. (B) Gradient of error evaluation function for each layer (calculation of update amount deltaW)
  • the second term of (Equation 14) is obtained by (Equation 12), the pixel value (y l i ) of each layer (lth layer), and one output side layer for each layer (lth layer) It is obtained from the product of the error of (layer 1 + 1) (the partial differential value by the pixel value x l + 1 j of the error evaluation function).
  • the relationship between the current layer (the (1-1) layer in (Equation 13)) and the layer on the one-layer fully-coupled layer side (the 1st layer in (Equation 13)) is a product-sum as in (Equation 1).
  • the update amount deltaW is expressed by (Equation 13).
  • the update amount deltaW contributes to the error from the pixel value x l i, j of the l- th layer related to the output value y l-1 i, j of the pixel of the current layer (l-1th layer). It has been tabulated. (C) Errors in each layer
  • the left side of (Expression 10) indicates an error (partial differential value based on the pixel value y l i of the error evaluation function) of each layer (the l-th layer).
  • the right side of (Equation 10) is an error of a layer on the output side (layer 1 + 1) with respect to the current layer (layer l) (partial differentiation based on the pixel value x l + 1 j of the error evaluation function). Value) and the weight variable wi, j between the pixel i in the l-th layer and the pixel j in the l + 1-th layer. This tabulation is for the pixel j of the (1 + 1) th layer related to the pixel i of the lth layer. [Comparative example]
  • FIG. 5 is a diagram illustrating a deep learning procedure according to the comparative example.
  • the information processing apparatus of the comparative example executes deep learning according to a computer program.
  • the information processing apparatus of the comparative example has a processor that can execute the processing of the number of Dynamic Fixed Points.
  • the deep learning of the comparative example includes the first convolution layer (Conv_1) and the pooling layer (Pool_1), the second convolution layer (Conv_2) and the pooling layer (Pool_2), and the fully connected layer 1 ( fc1) and the processing of all coupling layers 2 (fc2).
  • Deep learning is executed by being divided into processing units called mini-batch.
  • a mini-batch refers to a learning processing unit executed on such a set of individual input data (k data).
  • Ini input data (vector)
  • Ti correct answer data (vector).
  • the information processing apparatus of the comparative example acquires the number of overflows of each variable of each layer for each predetermined number of mini-batches during deep learning, accumulates them in variables in the computer program, and stores the variables used for deep learning as follows: Automatically adjust the fixed point position.
  • the information processing apparatus of the comparative example is, for example, a trial with a floating point number (such as one mini-batch), The initial decimal point position of each variable is determined by user designation, and learning is started (S1).
  • the information processing apparatus stores the number of overflows of each variable in each layer as statistical information while learning k mini-batches (S2). At this time, the information processing apparatus determines the presence / absence of an overflow, counts the number of times, and assigns it to a counter variable that holds the number of times each time an operation, assignment, or the like is performed on each variable in the program that executes learning.
  • the saturation process is a process of clipping to a positive maximum value when a positive number overflows and to a negative minimum value when a negative number overflows.
  • the information processing apparatus obtains the overflow rate from the overflow count accumulated in the counter variable after the mini-batch for k sets of data (after completion of k learning), and calculates the decimal point position of the fixed-point number based on the overflow rate. Adjust (S4). Then, the information processing apparatus returns to the process of S2 and proceeds with learning.
  • FIG. 6 is a diagram illustrating details of processing of each layer in FIG.
  • the first convolution layer (Conv_1) the pooling layer (Pool_1), and the all coupling layer 2 (fc2) are illustrated.
  • an activation function is calculated for z0, ..., zj, ..., etc., and u0, ..., uj, ..., etc. are calculated.
  • the information processing apparatus accumulates the number of overflows of the variables z0,..., Zj,... In the first convolution layer (Conv_1) in the counter variable Conv_1_z. Further, the information processing apparatus accumulates the number of overflows in the variables u0,..., Uj,... In the first convolution layer (Conv_1) in the counter variable Conv_1_u. For example, when the counter variable Conv_1_u is an array, the counter variable Conv_1_u (1) accumulates the number of overflowed variables among the variables u0,..., Uj,. In addition, the counter variable Conv_1_u (2) accumulates the number of variables that overflow when the variable u0,..., Uj,.
  • the calculation result in the first convolution layer (Conv_1) is propagated from the first pooling layer (Pool_1) to the upper layer.
  • the information processing apparatus executes the same calculation and accumulation of the number of overflows in the second and higher layers.
  • the information processing apparatus executes the above operation in the upper layer and further propagates the operation result to the upper layer.
  • the information processing apparatus finally obtains errors ⁇ 0 (7) ,..., ⁇ j (7) from the difference value between the obtained calculation result and the correct answer data Ti in all the coupling layers 2 (fc2). , ... are calculated.
  • the information processing apparatus executes reverse propagation based on the errors ⁇ 0 (7) ,..., ⁇ j (7) ,.
  • the information processing apparatus has errors ⁇ 0 (6) ,..., ⁇ j (6) ,... ⁇ n (6) and weights at the output of the lower hierarchy (for example, the coupling layer 1 (fc1)).
  • a difference value ⁇ Wij to the next weight of the variable Wij is calculated.
  • the information processing apparatus detects errors ⁇ 0 (7) , ..., ⁇ j (7) , ... and errors ⁇ 0 (6) , ..., ⁇ j (6) , ..., ⁇ n (6) Is stored in the counter variable fc2_ ⁇ . Further, the information processing apparatus accumulates the overflow count at the difference value ⁇ Wij in the counter variable fc2_ ⁇ W. Further, the information processing apparatus accumulates the number of overflows in the weight variable Wij in the counter variable fc2_W.
  • the information processing apparatus calculates the weight difference while propagating the error in the reverse manner from the total coupling layer 1 (fc1) to the first convolution layer (Conv_1).
  • the information processing apparatus repeats the forward propagation and the backward propagation as described above k times using k sets of input data.
  • the information processing apparatus updates the fixed-point position of each variable based on the number of overflows of the counter variable corresponding to each variable after the completion of such k mini-batches.
  • FIG. 7 illustrates a flowchart of learning processing by the information processing apparatus of the comparative example.
  • the information processing apparatus determines an initial decimal point position (C1). Then, the information processing apparatus initializes the number of times k with a value of 0. Then, the information processing apparatus determines whether or not the learning end condition is satisfied (C3). The learning ends when the error in all the coupling layers (fc2) is equal to or less than the reference value or when the number of learning reaches a specified maximum value.
  • the information processing apparatus executes the next mini-batch and counts up the variable k (C4).
  • the information processing apparatus accumulates the overflow count as statistical information in each counter variable (C5). That is, the information processing apparatus accumulates the number of overflowing variables and the number of overflowing variables when doubled in each layer.
  • the information processing apparatus determines whether or not the number of times k has reached the update interval (C6). If the number of times k has not reached the update interval, the information processing apparatus returns to the process of C3. On the other hand, when the number k reaches the update interval, the information processing apparatus updates the decimal point position according to the number of overflows of the variable. For example, as in Non-Patent Document 1, the information processing apparatus may obtain an overflow rate obtained by dividing the number of overflows by the number of executions of operations. When the overflow rate exceeds the specified value, the information processing apparatus may reduce the decimal point position of the corresponding variable by 1 and extend the integer part by 1 bit. When the value twice the overflow rate is equal to or less than the specified value, the information processing apparatus may increase the decimal point position by 1 and reduce the integer part by 1 bit. Then, the information processing apparatus 1 returns to the process of C3.
  • the information processing apparatus may obtain an overflow rate obtained by dividing the number of overflows by the number of executions of operations. When the
  • the above processing accumulates the number of overflows for each layer operation, and the fixed-point position is set when the overflow rate exceeds the default value and when the value twice the overflow rate is less than the default value.
  • This is a process of shifting by 1 bit.
  • This process is a fixed-point position update process based on the overflow count or overflow rate. It is difficult for the information processing apparatus to determine where the appropriate decimal point position is based on the overflow count or overflow rate.
  • the process of the comparative example is a procedure in which, when updating the fixed-point position, a proper position is tried by a process such as lowering or increasing the decimal point position, and further determination is made based on the result. For this reason, the decimal point position is updated a plurality of times before the information processing apparatus determines an appropriate decimal point position. For example, as described above, when the information processing apparatus determines the overflow rate every k mini-batches and updates the decimal point position bit by bit, In order to shift the decimal point position by N bits, N * k times (* is multiplication) of mini-batches are executed. For this reason, the learning process is repeated in a state where the decimal point position is inappropriate. That is, during learning, the fixed-point number data is saturated or underflowed at an undesired level, which may lead to deterioration in accuracy of the learning result and slow convergence.
  • the information processing apparatus of the comparative example simply acquires the number of overflows and executes the accumulation process in the deep learning program, the learning time may increase. That is, since the information processing apparatus does not have a function of providing information for determining an appropriate decimal point position to the program, a code for accumulating the number of overflows is incorporated in the program, which may increase the processing time.
  • the information processing apparatus 1, the information processing method executed by the information processing apparatus 1, and the program executed by the information processing apparatus 1 will be described with reference to FIGS. 8A to 32.
  • the present embodiment is an example, and the information processing apparatus 1 is not limited to the configuration of the present embodiment. ⁇ Statistical information>
  • the processor in the information processing apparatus 1 acquires statistical information, thereby reducing overhead in the program for acquiring statistical information.
  • the statistical information acquired by the processor is, for example, one of the following or a combination thereof.
  • the application program executed by the information processing apparatus 1 optimizes the decimal point position by acquiring statistical information from the processor.
  • the processor executes an instruction for Dynamic Fixed Point calculation. (1) Distribution of unsigned most significant bit positions
  • FIG. 8A illustrates the distribution data of the most significant bit positions that are not signed.
  • FIG. 8A shows an example of data in which an intermediate result of calculation is 40 bits and data is shifted to the right by 14 bits for alignment of a fixed-point number.
  • the unsigned most significant bit position refers to the most significant bit position where the bit is 1 for a positive number. For negative numbers, the most significant bit position of bit 0 is used. For example, when the bit sequence is changed from bit [39] which is the most significant bit to bit [0] which is the least significant bit, the most significant bit position which is unsigned is bit [k] which is different from the sign bit bit [39]. ] Has the largest index k. When the distribution of the most significant bit positions that are unsigned is obtained, the distribution range of values as absolute values can be grasped.
  • the vertical axis represents the number of appearances of the most significant bit positions that are unsigned, and the horizontal axis represents the position of the most significant bit Count Leading Sign (CLS).
  • CLS Count Leading Sign
  • the arithmetic circuit of the processor of the information processing apparatus 1 and the registers in the arithmetic circuit have a bit width (for example, 40 bits) that is equal to or greater than the number of bits (for example, 16 bits) of the register specified by the operand of the instruction. Have.
  • the bit width of the arithmetic circuit of the processor of the information processing apparatus 1 and the register in the arithmetic circuit is not limited to 40 bits.
  • the operation result is stored in a register (register specified by the operand of the instruction) having a bit width smaller than that of the operation circuit, such as a 16-bit register.
  • a register register specified by the operand of the instruction
  • the operation result (for example, 40 bits) is shifted by the shift amount specified by the operand, and bits corresponding to less than bit 0 are subjected to a predetermined rounding process and exceed the bit width of the register specified by the operand. Data (data exceeding bit 15) is subjected to saturation processing.
  • the numerical value given to the horizontal axis in FIG. 8A indicates a numerical value that can be expressed by a fixed point.
  • this fixed-point number For example, when the information processing apparatus 1 shifts this fixed-point number by -2 bits (shifted by 2 bits to the right), the most significant bit is shifted to the 14 position, the saturated area is expanded by 2 bits, and the underflow The region where 0 is generated and becomes 0 is reduced by 2 bits. That is, when the information processing apparatus 1 shifts the decimal point position to the left by 2 bits, the saturated area is extended by 2 bits, and the area where underflow occurs is reduced by 2 bits.
  • the information processing device shifts this fixed-point number by 2 bits in the positive direction (shifts left by 2 bits), the most significant bit is shifted to the 18 position, and the saturated area is reduced by 2 bits.
  • the area where underflow occurs is extended by 2 bits. That is, when the information processing apparatus 1 shifts the decimal point position to the right by 2 bits, the saturated area is reduced by 2 bits, and the area where the underflow occurs is extended by 2 bits.
  • the information processing apparatus 1 can immediately determine an appropriate shift amount in the Dynamic Fixed Point calculation, that is, an appropriate fixed-point position, by obtaining the distribution of the most significant bit position that is not signed during learning execution. For example, the information processing apparatus 1 may determine the fixed point position so that the data to be saturated is equal to or less than a specified ratio. That is, as an example, the information processing apparatus 1 can determine the fixed-point position in preference to the fact that the data saturation becomes a predetermined level rather than the data underflow becoming a predetermined level.
  • the distribution of the most significant bit positions that are unsigned is accumulated in a predetermined register (also referred to as a statistical information register) in the processor 10 (see FIG. 9) of the information processing apparatus 1.
  • the processor 10 executes instructions such as reading and writing of distribution data from the statistical information register and clearing of the statistical information register. Therefore, the statistical information register stores distribution data for one or more fixed-point numbers that have been subject to instruction execution from the previous execution of the clear instruction to the present.
  • the accumulated distribution data is read into the memory by a read command.
  • the processor 10 may execute a load instruction to the statistical information register instead of the clear instruction, and may load the value 0 into the statistical information register.
  • the distribution of the least significant bit positions that are unsigned refers to the least significant bit positions at which the bits are different from the sign. For example, when the bit sequence is a sequence from bit [39] which is the most significant bit to bit [0] which is the least significant bit, among the bits [k] different from the sign bit bit [39], the index k is The smallest thing.
  • the distribution of the least significant bit positions that are unsigned is expressed as shown in FIG. 8B. In addition, in the distribution of the least significant bit positions that are unsigned, the least significant bit including valid data is grasped. (3) Maximum value of the most significant bit position that is unsigned
  • the maximum value of the most significant bit position that is unsigned differs from the value of the sign bit for one or more fixed-point numbers subject to instruction execution from the time when the previous clear instruction was executed to the present. Of the most significant bit positions.
  • the information processing apparatus 1 uses the maximum value of the most significant bit position that is not signed as an appropriate shift amount in the Dynamic Fixed Point calculation, That is, it can be used to determine an appropriate decimal point position.
  • the processor executes instructions such as reading the maximum value from the statistical information register and clearing the statistical information register. Therefore, the maximum value from the execution of the previous clear instruction to the present is accumulated in the statistical information register, and the maximum value is read into the memory by the read instruction. (4) Minimum value of the least significant bit position that is unsigned
  • the minimum value of the least significant bit position that is unsigned is the minimum value of the least significant bit positions that differ from the sign for one or more fixed-point numbers from when the previous clear instruction was executed to the present. It is.
  • the information processing apparatus 1 can use the minimum value of the least significant bit position that is not signed to determine an appropriate shift amount in the Dynamic Fixed Point calculation, that is, an appropriate decimal point position.
  • the processor 10 executes instructions such as reading and clearing the minimum value from the statistical information register. Therefore, the minimum value from the execution of the previous clear instruction to the present is accumulated in the statistical information register, and is read into the memory by the read instruction. ⁇ Configuration>
  • FIG. 9 illustrates the configuration of the processor 10 of the information processing apparatus 1.
  • an instruction memory (IRAM) 21 and a data memory (DRAM) 22 are illustrated together with the processor 10.
  • the processor 10 is a single-instruction-multiple-data (SIMD) type arithmetic processing unit.
  • the processor 10 includes a program counter (PC) 111 and a decoder 112. , A register file 12, an arithmetic unit 131 for vector calculation, an arithmetic unit for scalar calculation (Arithmetic Logic Unit (ALU)) 141, and an accumulator 132 for adding the results of the arithmetic unit 131 for vector calculation. Further, the processor 10 includes a plurality of selectors 101 for selecting calculation results of the calculation unit 131 for vector calculation, the calculation unit 141 for scalar calculation, the accumulator 132, and the read result from the data memory 22. Yes. In the figure, a plurality of selectors are collectively referred to as a selector 101. A plurality of computing units for vector computation are collectively referred to as computing unit 131.
  • PC program counter
  • ALU Arimetic Logic Unit
  • the processor 10 includes a statistical information acquisition unit 102 that acquires statistical information from the data selected by the selector 101, and a statistical information storage unit 105 that stores the statistical information acquired by the statistical information acquisition unit 102.
  • the statistical information acquisition unit 102 and the statistical information storage unit 105 are an example of an acquisition circuit that acquires statistical information about the distribution of bits in fixed-point number data after execution of instructions for fixed-point number data.
  • a plurality of statistical information acquisition units are collectively referred to as a statistical information acquisition unit 102.
  • the processor 10 has a data conversion unit 103 that changes the fixed point position of the data selected by the selector 101.
  • a plurality of data conversion units are collectively referred to as a data conversion unit 103.
  • an instruction is fetched from the address of the instruction memory 21 pointed to by the program counter 111, and the decoder 112 decodes the fetched instruction.
  • an instruction fetch control unit for executing instruction fetch is omitted.
  • each part of the processor 10 is controlled according to the decoding result.
  • the decoding result is a vector operation instruction
  • the data of the vector register of the register file 12 is input to the operation unit 131 for vector operation, and the vector operation is executed.
  • the calculation result of the calculator 131 for vector calculation is supplied to the statistical information acquisition unit 102 and the data conversion unit 103 via the selector 101.
  • the calculation result of the vector calculation unit 131 is input to the accumulator 132, and the calculation result of the vector calculation unit 131 is added to, for example, a cascade.
  • the calculation result of the accumulator 132 is supplied to the statistical information acquisition unit 102 and the data conversion unit 103 via the selector 101.
  • the instruction is a scalar operation instruction as a result of decoding
  • the data of the scalar register of the register file 12 is input to the arithmetic unit 141 for scalar operation.
  • the calculation result of the calculator 141 is supplied to the statistical information acquisition unit 102 and the data conversion unit 103 via the selector 101, similarly to the calculation result of the accumulator 132.
  • the instruction is a load instruction as a result of decoding
  • data is read from the data memory 22 and supplied to the statistical information acquisition unit 102 and the data conversion unit 103 via the selector 101.
  • the result of data conversion by the data conversion unit 103 is stored in the register of the register file 12.
  • the decoder 112 instructs the data converter 103 to supply the shift amount.
  • the shift amount is acquired from, for example, the instruction operand (immediate value), the register specified by the operand, the data memory 22 at the address indicated by the address register specified by the operand, and supplied to the data conversion unit 103.
  • the process of FIG. 9 is an example in which the decoder acquires designation (shift amount) of the decimal point position of fixed-point number data from an instruction.
  • the data conversion unit 103 shifts the fixed-point number data obtained from the result of the vector operation, the result of the scalar operation, the operation result of the accumulator 132, or the read result from the data memory 22 by the specified shift amount S. To do. In addition, the data conversion unit 103 performs saturation processing of the upper bits and rounding of the lower bits together with the shift.
  • FIG. 12 illustrates a specific configuration of the data conversion unit.
  • the data conversion unit 103 includes, for example, a rounding processing unit that performs rounding with an input as a 40-bit calculation result and a lower S bit as a decimal part, a shifter that performs arithmetic shift, and a saturation processing unit that performs saturation processing.
  • the rounding unit rounds the lower S bit as a decimal part. If S is negative, the rounding unit does nothing. Examples of rounding include nearest rounding, rounding to 0, rounding to positive infinity, rounding to negative infinity, and random number rounding.
  • the shift amount is, for example, a shift amount that the decoder acquires from an instruction as illustrated in FIG.
  • the shift unit performs an S bit arithmetic right shift when S is positive, and an arithmetic left shift, that is, ⁇ S bit arithmetic left shift when S is negative.
  • the saturation part outputs 2E15 if the shift result is 2E15-1 (positive maximum value) or more, -2E15 if it is less than -2E15 (negative minimum value), and outputs the lower 16 bits of the input otherwise.
  • 2E15 represents 2 to the 15th power.
  • the data conversion unit 103 maintains the sign of the upper bits at the time of left shift, performs saturation processing other than the sign bits, that is, discards the upper bits and embeds 0 in the lower bits. In addition, the data conversion unit 103 embeds a sign bit in the upper bits (bits lower than the sign bits) during right shift. Then, the data conversion unit 103 outputs the data obtained by the rounding, shifting, and saturation processing as described above with the same bit width as that of the register of the register file 12 (for example, a 16-bit register).
  • the data conversion unit is an example of an update circuit that updates the decimal point position of fixed-point number data.
  • the processor 10 designates the shift amount in the operand of the instruction for executing the Dynamic Fixed Point operation, the processor 10 During program execution, the decimal point position of the fixed-point number is updated by the specified shift amount.
  • the statistical information acquisition unit 102 acquires the statistical information and stores it in the statistical information storage unit 105.
  • the statistical information includes (1) distribution of the most significant bit positions to be unsigned, (2) distribution of the least significant bit positions to be unsigned, and (3) the most significant to be unsigned. It is the maximum value of the upper bit position, (4) the minimum value of the least significant bit position that is unsigned, or a combination thereof.
  • FIG. 10 illustrates a circuit block of the processor 10 of FIG.
  • the processor 10 includes a control unit 11, a register file 12, a vector unit 13, and a scalar unit 14.
  • the control unit 11 includes a program counter 111 and a decoder 112.
  • the register file includes a vector register file, a vector operation accumulator register (Vector ACC), a scalar register file, and a scalar operation accumulator register (ACC).
  • the vector unit 13 includes a computing unit 131 for vector computation, a statistical information acquisition unit 102, and a data conversion unit 103.
  • the scalar unit 14 includes a calculator 141 for scalar calculation, a statistical information acquisition unit 102, and a data conversion unit 103.
  • a statistical information aggregation unit 104 that aggregates statistical information from a plurality of statistical information acquisition units 102 is added.
  • the statistical information storage unit 105 is a part of the register file 12.
  • the instruction memory 21 has a memory interface (Memory Connected to the control unit 11 via the I / F).
  • the data memory 22 is connected to the vector unit 13 and the scalar unit 14 via a memory interface (Memory I / F).
  • FIG. 11A illustrates details of the vector unit 13.
  • the vector unit 13 calculates the data in the vector registers Vector Reg0 and Vector Reg1 by the calculator 131-1 for vector calculation.
  • the calculation result of the vector calculation unit 131-1 is input to the product-sum calculation accumulator 132 and the vector calculation unit 131-2.
  • the accumulator 132 for product-sum operation performs a scalar addition on the operation result of the arithmetic unit 131-1 for vector operation and stores it in the accumulator register (ACC) for scalar operation.
  • the arithmetic unit 131-2 for vector operation is the operation result of the arithmetic unit 131-1 for vector operation, the data of the accumulator register for vector operation (Vector ACC), or those in accordance with the operation mode specified by the instruction.
  • the result of adding is output.
  • the selector 101 selects one of the output result of the computing unit 131-2 for vector calculation and the read result (Read Data 0,..., Read Data 0) from the data memory 22, and the statistical information acquisition unit 102 and The data is input to the data conversion unit 103.
  • the statistical information acquired by the statistical information acquisition unit 102 is input to the statistical information aggregation unit 104.
  • the data converted by the data converter 103 is stored in the data memory 22 (Write Data 0,..., Write Data n) or held in the vector register (Vector Reg2) via a selector (not shown).
  • FIG. 11B illustrates the configuration of the scalar unit 14.
  • the scalar unit 14 is a selector 142 for selecting one of the data obtained from the immediate operand and the data from the scalar register Scalar Reg1, and the scalar for calculating the selection result of the selector 142 and the data in the scalar register Scalar Reg0.
  • the computing unit 141 is provided.
  • the calculation result of the scalar calculator 141 is stored in the address (for example, Addr) of the data memory 22 via the memory interface (Memory I / F).
  • the calculation result of the scalar calculator 141 is input to the statistical information acquisition unit 102 and the data conversion unit 103 via the selector 101.
  • the selector 101 calculates the operation result of the arithmetic unit 141 for the scalar, the data of the scalar register Scalar Reg2, the data of the accumulator register for scalar operation (ACC), and the data read via the memory interface (Memory I / F). Select one of (Read Data).
  • the selector 101 inputs the selected data to the statistical information acquisition unit 102 and the data conversion unit 103.
  • the statistical information acquisition unit 102 acquires statistical information from the data input from the selector 101 and inputs the statistical information to the statistical information aggregation unit 104.
  • the statistical information acquisition unit 102 that acquires the most significant bit position that is an unsigned will be referred to as a statistical information acquisition unit 102A.
  • a unit that acquires the least significant bit position that is an unsigned will be referred to as a statistical information acquisition unit 102B.
  • the statistical information aggregating unit 104 what is acquired by the statistical information acquiring unit 102 and counts the bit positions and acquires the bit distribution with respect to the bit positions is referred to as a statistical information aggregating unit 104A.
  • a statistical information aggregating unit 104B that performs a logical OR operation on the bit position acquired by the statistical information acquiring unit 102 as a previous stage for acquiring the maximum value and the minimum value of the bit position is referred to as I will call it.
  • FIG. 13A exemplifies the process of the statistical information acquisition unit 102A that acquires the most significant bit position that is not signed.
  • processing by the unsigned most significant bit detector included in the statistical information acquisition unit 102A is illustrated.
  • the unsigned most significant bit detector is, for example, a logic circuit defined in the truth table of FIG. 13B.
  • the sign bit is 0, the bit at the position indicated as “the most significant bit position to be unsigned” is 1, all the bits on the upper side of this bit are 0, and the bits on the lower side of this bit
  • the input data (in (40 bits)) of b is illustrated.
  • b is either 0 or 1.
  • the statistical information acquisition unit 102A processes this input data, and generates output data (out (40 bits)) in which the most significant bit position that is unsigned is 1 and the other bit positions are 0. If the input data is all 0 bits or all 1 bits, 1 is output in the 39th bit and 0 is output in the 38th bit or less.
  • output data out (40 bits)
  • the data of the arithmetic circuit of the processor 10 is exemplified by 40-bit data, but the data of the arithmetic circuit of the processor 10 is not limited to 40 bits.
  • FIG. 13B illustrates a truth table of the unsigned most significant bit detector.
  • the unsigned most significant bit detector searches the bit in the lower bit direction from the bit in [38] and sets the number of the bit position that becomes 1 first to 2 Output in hexadecimal bit pattern.
  • the unsigned most significant bit detector for negative numbers, searches for bits from in [38] in the lower bit direction, and outputs the bit position number that first becomes 0 as a binary bit pattern. To do.
  • the unsigned most significant bit detector outputs 1 in the 39th bit and 0 in the 38th bit or less.
  • FIG. 14 illustrates the configuration of the hardware circuit of the statistical information acquisition unit 102A that acquires the most significant bit position that is an unsigned code.
  • exclusive OR EXOR
  • EXOR exclusive OR
  • the exclusive OR value of bits having the same value as the sign bit in [39] is 0, and the exclusive OR value of bits having a value different from the sign bit in [39] is 1.
  • out [38] of the output data becomes 1 by exclusive OR.
  • the exclusive OR value of in [39] and in [37] is input to the output data out [37] via an AND gate. Since one of the inputs of the AND gate receives a bit value obtained by inverting the exclusive OR value of in [39] and in [38], if in [39] and in [38] do not match, The output of the AND gate is 0 regardless of the exclusive OR value of in [39] and in [37].
  • the exclusive OR value of in [39] and in [36] is input to out [36] of the output data through an AND gate similar to the above.
  • One input of this AND gate has two exclusive OR values, that is, an exclusive OR value of in [39] and in [38] and an exclusive OR value of in [39] and in [37].
  • the bit value obtained by inverting the sum value (OR gate output) is input. For this reason, when in [39] and in [38] do not match, the output of the AND gate becomes 0 regardless of the exclusive OR value of in [39] and in [36]. Similarly, the output of the AND gate becomes 0 regardless of the exclusive OR value of in [39] and in [i] (i is 37 or less).
  • the circuit of FIG. 14 obtains output data out (40 bits) in which 1 is set in the most significant bit position to be unsigned and the other bits are set to 0.
  • the statistical information acquisition unit 102A that acquires the most significant bit position that is not signed in FIGS. 13 and 14 is a circuit that acquires the position of the most significant bit that does not match the sign bit in the fixed-point number data after the execution of the instruction. It is an example.
  • the position of the most significant bit that does not match the sign bit is the true value (1). It is an example of the bit string shown by.
  • FIG. 15A illustrates the processing of the statistical information acquisition unit 102B that acquires the least significant bit position that is an unsigned code.
  • processing by the unsigned least significant bit detector included in the statistical information acquisition unit 102B is illustrated.
  • the unsigned least significant bit detector is, for example, a logic circuit defined in the truth table of FIG. 15B.
  • the example of FIG. 15A also illustrates the processing with a positive number.
  • the bit (excluding the sign bit) is exemplified by b input data.
  • b is either 0 or 1
  • the input data is in (40 bits).
  • the statistical information acquisition unit 102B processes this input data and generates output data (out (40 bits)) in which the least significant bit position that is unsigned is 1 and the other bit positions are 0. If the input data is all 0 bits or all 1 bits, 1 is output in the 39th bit and 0 is output in the 38th bit or less.
  • FIG. 15B illustrates a truth table of the unsigned least significant bit detector.
  • the unsigned least significant bit detector searches for a bit from in [0] in the higher bit direction for a positive number, and the number of the bit position that becomes 1 first is a binary number. Output with the bit pattern.
  • the unsigned least significant bit detector also searches for bits from in [0] in the upper bit direction for negative numbers, and outputs the bit position number that first became 0 as a binary bit pattern. To do.
  • the unsigned least significant bit detector outputs 1 in the 39th bit and 0 in the 38th bit or less.
  • FIG. 16 illustrates the configuration of the hardware circuit of the statistical information acquisition unit 102B that acquires the least significant bit position to be unsigned.
  • the statistical information acquisition unit 102B may search for a bit position where the bit is 1 from the least significant bit in [0] toward the upper side.
  • the sign bit in [39] is 1, since the data is a complement, the statistical information acquisition unit 102B has 0 bits from the least significant bit in [0] toward the higher order. What is necessary is just to search a bit position.
  • an exclusive OR (EXOR) of the sign bit in [39] and other bits (in [0] to in [38]) is executed. Then, the exclusive OR value of bits having the same value as the sign bit in [39] is 0, and the exclusive OR value of bits having a value different from the sign bit in [39] is 1.
  • out [0] of the output data becomes 1 by exclusive OR.
  • the exclusive OR value of in [39] and in [1] is input to the output data out [1] through an AND gate.
  • a bit value obtained by inverting the exclusive OR value of in [39] and in [0] is input to one input of the AND gate. Therefore, when the exclusive OR value of in [39] and in [0] is 1, the output of the AND gate becomes 0 regardless of the exclusive OR value of in [39] and in [1].
  • the exclusive OR value of in [39] and in [2] is input to out [2] of the output data through the AND gate similar to the above.
  • One input of this AND gate has a logical OR of two exclusive OR values, the exclusive OR value of in [39] and in [0] and the exclusive OR value of in [39] and in [1].
  • a bit value obtained by inverting the value (output of the OR gate) is input. For this reason, if the exclusive OR value of in [39] and in [0] is 1, the output data out [2] is assigned a value regardless of the exclusive OR value of in [39] and in [2].
  • the output of the AND gate to output is 0.
  • the output of the AND gate that outputs a value to out [i] of the output data is 0 regardless of the exclusive OR value of in [39] and in [i] (i is 1 or more).
  • the circuit of FIG. 16 obtains output data out (40 bits) in which 1 is set at the least significant bit position that is not signed and the other bits are 0.
  • 15 and 16 is an example of a circuit that acquires the position of the least significant bit that does not match the sign bit.
  • the position of the least significant bit that does not match the sign bit is a true value (1). It is an example of the bit string shown by.
  • FIG. 17 is a diagram illustrating processing of the statistical information aggregation unit 104A that acquires the bit distribution from the data acquired by the statistical information acquisition unit 102.
  • a process of acquiring a bit distribution from SIMD data in which 8 pieces of 40-bit data are processed in parallel is illustrated.
  • the processing of the statistical information aggregation unit 104A which is a hardware circuit, is described in pseudo code.
  • the input data is exemplified by array data of 8 (rows) ⁇ 40 (bits).
  • the 40-bit input data of each row is the most significant bit position that is unsigned (output of the statistical information acquisition unit 102A in FIG. 14) or the least significant bit position that is unsigned (the statistical information acquisition unit 102B in FIG. 16). Output).
  • all the bits of the 40-bit output data out are cleared.
  • the output data (array element) out [j] is an integer of log2 (number of SIMD data) bits (3 bits in the example of FIG. 17). .
  • the number of SIMD data (the number of data processed in parallel) is 8, but the number of SIMD data is not limited to 8.
  • FIG. 18 illustrates the configuration of the hardware circuit of the statistical information aggregation unit 104A that acquires the bit distribution from the data acquired by the statistical information acquisition unit 102.
  • the input data is the non-signed most significant bit position acquired by the statistical information acquisition unit 102A (FIGS. 13 and 14).
  • the statistical information aggregating unit 104A counts the number of occurrences of '1' for each bit with respect to the most significant bit positions corresponding to the number of unsigned SIMD data acquired by the statistical information acquiring unit 102A. Count the number of occurrences of the upper bit position.
  • the statistical information aggregation unit 104A obtains the counting result from the output data out0. Store in out39 respectively.
  • the input data can also be the lowest bit position that is unsigned by the statistical information acquisition unit 102B (FIGS. 15 and 16).
  • the statistical information aggregating unit 104A counts the number of occurrences of '1' of each bit with respect to the least significant bit positions that are unsigned for the number of SIMD data acquired by the statistical information acquiring unit 102B, thereby generating the least significant bit. Count the number of occurrences of the position.
  • the statistical information aggregation unit 104A stores the count results in the output data out0 to out39, respectively. That is, the statistical information aggregating unit 104A can process either the most significant bit position that is unsigned or the least significant bit position that is unsigned.
  • the selector (SEL) selects the data acquired from the bit population count calculator ( ⁇ ) and the scalar unit 14. Data selected by the selector (SEL) is output from output data out0 to out39. Therefore, the data acquired by the statistical information acquisition unit 102 with the scalar unit 14 is output as it is from the output data out0 to out39 without being added in one operation of the scalar unit 14. Out0 to out39 are data delivered to the statistical information storage unit 105 (see input data in0 to in39 in 105A in FIG. 21 and 105B in FIG. 22).
  • the statistical information aggregating unit 104A in FIGS. 17 and 18 is also an example of a circuit that accumulates and counts the position of the least significant bit that does not match the sign bit for a plurality of fixed-point number data.
  • FIG. 19 is a diagram exemplifying processing of the statistical information aggregating unit 104B that aggregates the bit positions by logical sum operation as a premise of acquiring the maximum value and the minimum value of the bit positions from the data acquired by the statistical information acquisition unit 102. . 19 also illustrates SIMD data processing in which 8 pieces of 40-bit data are processed in parallel, as in FIG. In FIG. 19, the processing of the statistical information aggregation unit 104B, which is a hardware circuit, is described in pseudo code.
  • the result of OR operation (OR operation) is input for 7).
  • the bit position that first becomes 1 from the out [38] toward the lower bit direction is the maximum bit position.
  • the bit position that is first 1 from the out [0] toward the upper bit direction is the minimum bit position.
  • FIG. 20 exemplifies the configuration of the hardware circuit of the statistical information aggregating unit 104B that aggregates the bit positions by the logical sum operation as a premise of acquiring the maximum value and the minimum value of the bit position from the data acquired by the statistical information acquiring unit 102.
  • the data acquired by the statistical information acquisition unit 102 (here, statistical acquisition 0 to statistical acquisition SIMD data number ⁇ 1) is ORed by an OR gate (40 bits).
  • the selector (SEL) selects a logical sum operation (OR) and data acquired from the scalar unit 14.
  • the data selected by the selector (SEL) is output to the output data out. Therefore, the data acquired by the statistical information acquisition unit 102 by the scalar unit 14 is output as it is to the output data out without being subjected to a logical OR operation in one operation. out is data handed over to the statistical information storage unit 105.
  • Statistical information aggregating unit 104B that aggregates bit positions by logical sum operation is an example of a circuit that accumulates a bit string that indicates a true value of the position of the most significant bit that does not match a sign bit by logical sum operation for a plurality of fixed-point number data. It is.
  • the statistical information aggregating unit 104B that aggregates bit positions by logical sum operation is an example of a circuit that accumulates a bit string that indicates the position of the least significant bit that does not match the sign bit with a true value by logical sum operation for a plurality of fixed-point number data. But there is.
  • FIG. 21 illustrates a configuration of the statistical information storage unit 105A that stores the statistical information from the statistical information aggregation unit 104A in a dedicated register as a specific example of the statistical information storage unit 105 (see FIG. 10).
  • in39 to in0 indicate statistical information from the statistical information aggregation unit 104 corresponding to out39 to out0 in FIG.
  • sr39 to sr0 are register values for storing statistical information.
  • the processor 10 writes the initial values v39 to v0 to any one or more of the registers sr39 to sr0 via the selector SEL by a write command. However, the processor 10 may reset the registers sr39 to sr0 by a reset signal from the decoder.
  • the processor 10 Each time the instruction with the statistical information acquisition function is executed, the processor 10 accumulates statistical information using an adder and stores the statistical information in the registers sr39 to sr0.
  • the combination of the statistical information aggregating unit 104A (FIGS. 17 and 18) and the statistical information storage unit 105A (FIG. 21) that stores the statistical information from the statistical information aggregating unit 104A in a dedicated register is the most significant bit that does not match the sign bit. Is a circuit for accumulating and counting the positions of a plurality of fixed-point number data.
  • the processor 10 reads one or more values of any of the registers (sr39 to sr0) and stores them in the data memory specified by the read command, or stores them in the general-purpose register specified by the read command. To do.
  • FIG. 22 is a modified example of the statistical information aggregating unit 104, and is a configuration example of a circuit in which a statistical information storage destination is designated by an index from the decoder 112.
  • the processor 10 writes an initial value to one or a plurality of registers in the row j of the register file designated by the index via the selector SEL by a write command. However, the processor 10 may reset the line j of the register file specified by the index by a control signal from the decoder 112. Then, the processor 10 accumulates the statistical information from in39 to in0 with the adder and stores it in the row j of the register file designated by the index. Further, the processor 10 reads out the statistical information from the row j of the register file specified by the index by the control signal from the decoder 112. Further, the processor 10 reads one or more values of any one of the row j of the register file specified by the index, and saves it in the data memory specified by the read command, or is specified by the read command. Store in general-purpose registers.
  • FIG. 23 shows a statistical information storage unit 105C that accumulates statistical information of bit positions logically ORed by the statistical information aggregating unit 104B illustrated in FIGS. 19 and 20 and reads the maximum value of the bit positions of the accumulated statistical information. It is a figure which illustrates the structure of the hardware circuit.
  • the statistical information storage unit 105C includes a register (sr) that accumulates statistical information of bit positions logically ORed by the statistical information aggregation unit 104B.
  • the processor 10 can write an initial value to the register (sr) via the selector (SEL) by a write command (write). However, the processor 10 may be configured to reset the register (sr) by a reset signal.
  • the statistical information storage unit 105C performs a logical sum operation of the logical sum operation result (in) of the statistical information aggregation unit 104B and the statistical information already accumulated in the register (sr), via the selector (SEL). Accumulation result is stored in register (sr).
  • the processor 10 reads the value of the register (sr) via the selector (SEL) by the read command and stores it in the data memory specified by the read command or the general-purpose register specified by the read command.
  • the statistical information storage unit 105C may include Priority Encoder (MSB priority).
  • Priority Encoder (MSB priority) outputs “000001” (1). .
  • Priority Encoder (MSB priority) outputs “100110” (38).
  • the processor 10 can acquire the maximum value of the bit position as a binary value from the statistical information of the bit position logically ORed by the statistical information aggregating unit 104B via Priority Encoder (MSB priority).
  • the combination of the statistical information aggregating unit 104B (FIGS. 19 and 20) and the statistical information storage unit 105C that aggregate the bit positions by the logical sum operation of FIGS. It is an example of a circuit that accumulates a bit string indicated by a value by OR operation for a plurality of fixed-point number data and obtains the position of the highest true value in the accumulated bit string.
  • FIG. 24 shows a statistical information storage unit 105D that accumulates the statistical information of the bit positions logically calculated by the statistical information aggregating unit 104B illustrated in FIGS. 19 and 20 and reads the minimum value of the bit positions of the accumulated statistical information. It is a figure which illustrates the structure of the hardware circuit.
  • the statistical information storage unit 105D has a priority encoder (LSB priority) instead of the priority encoder (MSB priority) of the statistical information storage unit 105C. Since the configuration of the statistical information storage unit 105D other than the priority encoder (LSB priority) is the same as that of the statistical information storage unit 105C, the description thereof is omitted.
  • LSB priority priority encoder
  • Priority Encoder (LSB priority) outputs “100110” (38).
  • the processor 10 can acquire the minimum value of the bit position as a binary value from the statistical information of the bit position logically calculated by the statistical information aggregation unit 104B via the priority encoder (LSB priority).
  • the combination of the statistical information aggregating unit 104B (FIGS. 19 and 20) and the statistical information storage unit 105D (FIG. 24) that aggregate the bit positions by the logical sum operation is the true value of the position of the least significant bit that does not match the sign bit.
  • 2 is an example of a circuit that accumulates a bit string shown by a logical sum operation for a plurality of fixed-point number data and obtains the position of the lowest true value in the accumulated bit string.
  • FIG. 25 is a diagram illustrating a configuration of a statistical information storage unit 105E of a modified example in which the register (sr) of the statistical information storage unit 105C of FIG. 23 is a register file.
  • FIG. 26 is a diagram exemplifying a configuration of a statistical information storage unit 105F of a modified example in which the register (sr) of the statistical information storage unit 105D of FIG. 24 is used as a register file.
  • areas of sr0, sr1,..., Srj,... are secured, and a row j of the register file is designated by index.
  • the processor 10 sets an initial value to the line j of the register file designated by the control signal from the decoder 112 or index, stores statistical information (input data in), reads the statistical information from the line j, etc.
  • Execute. ⁇ Instruction with statistical information acquisition function> The configuration of the instruction with the statistical information acquisition function will be exemplified below.
  • method 1 and method 2 are exemplified as the instruction configuration method.
  • Method 1 an operation instruction for obtaining statistical information, a load instruction, and the like are individually added to the instruction set of the processor 10.
  • the configuration of the following instructions is an example, and the processor 10 is not limited to the following instructions. [Vmul_s instruction]
  • the vmul_s instruction is an instruction for the processor 10 to multiply the vector register vs and vt, shift imm bits, perform rounding / saturation, and store the result in the vector register vd.
  • the processor 10 acquires the statistical information before the shift of the multiplication result and accumulates it in the statistical information register.
  • vld_s ss, rt, rd Instruction structure: vld_s ss, rt, rd
  • the vld_s instruction is an instruction for the processor 10 to load vector data from an address obtained by adding the address registers rs and rt and store the vector data in the vector register rd.
  • the processor 10 acquires the statistical information of the loaded data and accumulates it in the statistical information register.
  • the read_acc_s instruction is an instruction for the processor 10 to shift the data of the accumulator register (40 bits) by imm bits, perform rounding / saturation, and store the result in the scalar register rd.
  • the processor 10 acquires the statistical information of the accumulator register and accumulates it in the statistical information register.
  • a register index (s) for storing statistical information may be added to the operand of the instruction so that the storage location of the statistical information can be designated.
  • the index (s) of this instruction is the same as that shown in FIGS. Specify the index of the statistical information register file. vmul_s vs, vt, vd, imm, s vld_s ss, st, vd, s read_acc sd, imm, s
  • FIG. 27 illustrates an instruction format according to Method 2.
  • the instruction format may be expanded to add a bit that specifies whether to acquire statistical information. For example, a statistical information acquisition function may be added for all instructions.
  • FIG. 28 illustrates an instruction format by a modification of Method 2.
  • the instruction format may be extended to specify a register index for storing statistical information.
  • the decoder 112 of FIG. 9 that decodes the instruction format of FIG. 28 and obtains the register index IDX is an example of a decoder that obtains designation of a storage location of statistical information.
  • the instruction with the statistical information acquisition function may be executed in a dedicated subroutine.
  • the compiler may incorporate an instruction with a statistical information acquisition function into an execution format.
  • the dedicated subroutine may be created in assembly language, and execution of an instruction with an acquisition function may be designated statistically. What is necessary is just to make it call the above exclusive subroutines in the computer program for the information processing apparatus 1 to execute deep learning.
  • FIG. 29 illustrates details of processing of each layer when the information processing apparatus 1 of the present embodiment performs deep learning.
  • the information processing apparatus 1 that executes the processing of FIG. 29 is an example of an information processing apparatus that executes deep learning by computation in one or more layers.
  • the first convolution layer (Conv_1), the pooling layer (Pool_1), and the all coupling layer 2 (fc2) are illustrated.
  • an activation function is calculated for z0, ..., zj, ..., etc., and u0, ..., uj, ..., etc. are calculated.
  • the information processing apparatus 1 uses the statistical information specified by the internal statistical information register or the register index in the variable z0, ..., zj, ..., etc. in the first convolution layer (Conv_1). Accumulate in information register file. If there is a shortage of statistical information registers or register files, the statistical information is saved in the memory after the calculation of each layer is completed, and the statistical information is restored before the next calculation is started. Similarly, the information processing apparatus 1 designates statistical information on the variables u0,..., Uj,...
  • the statistical information of the present embodiment is different from the overflow count as in the comparative example, as described above (1) distribution of the most significant bit positions that are unsigned, and (2) distribution of the least significant bit positions that are unsigned. (3) The maximum value of the most significant bit position to be unsigned, (4) The minimum value of the least significant bit position to be unsigned, or a combination of any two or more thereof.
  • the calculation result in the first convolution layer (Conv_1) is propagated from the first pooling layer (Pool_1) to the upper layer.
  • the information processing apparatus 1 executes the same calculation and accumulation of statistical information in the second and higher layers. Then, the information processing apparatus 1 determines the error variables ⁇ 0 (7) ,... From the difference value between the obtained calculation result and the correct answer data Ti in the total coupling layer 2 (fc2). . . , ⁇ j (7) ,. . . Is calculated. Then, the information processing apparatus 1 receives error variables ⁇ 0 (7) ,. . . , ⁇ j (7) ,. . . Based on the above, the reverse propagation process is executed.
  • the information processing apparatus 1 receives error variables ⁇ 0 (6) ,. . . , ⁇ j (6) ,. . . A difference value ⁇ Wij to ⁇ n (6) and the next weight of the weight variable Wij is calculated. At this time, the information processing apparatus 1 uses error variables ⁇ 0 (7) ,. . . , ⁇ j (7) ,. . . And error variables ⁇ 0 (6) ,. . . , ⁇ j (6) ,. . . , ⁇ n (6) is accumulated in the same manner as the first convolutional layer (Conv_1). The information processing apparatus 1 also accumulates statistical information with the difference value ⁇ Wij. Further, the information processing apparatus 1 accumulates statistical information on the weight variable Wij.
  • the information processing apparatus 1 then passes from the all coupling layer 1 (fc1) to the first convolution layer (Conv_1). The weight difference is calculated while propagating the error backward.
  • the information processing apparatus 1 repeats the forward propagation and the reverse propagation as described above k times using k sets of input data.
  • the information processing apparatus 1 updates the fixed point position of each variable based on the statistical information of each variable after the completion of such k mini-batches.
  • FIG. 30 illustrates a flowchart of learning processing by the information processing apparatus 1 of the present embodiment.
  • the information processing apparatus 1 determines the initial decimal point position (WE1).
  • the information processing apparatus 1 may determine the initial decimal point position of each variable based on past experimental values, actual values, or user designation.
  • the information processing apparatus 1 initializes the number of times k to 0. Further, the information processing apparatus 1 initializes a variable for storing statistical information in the program (WE2). Then, the information processing apparatus 1 determines whether or not the learning end condition is satisfied (WE3). The learning ends when the error in all the coupling layers (fc2) is equal to or less than the reference value or when the number of learning reaches a specified maximum value.
  • the information processing apparatus 1 executes the next mini-batch. At this time, the information processing apparatus 1 accumulates statistical information of each variable of each layer in the statistical information register or the statistical information register file. The accumulation of statistical information is performed by the hardware of the processor 10 as described above. Then, the information processing apparatus 1 counts up the variable k (WE4).
  • the information processing apparatus 1 determines whether or not the number of times k has reached the update interval (WE5). When the number of times k has not reached the update interval, the information processing apparatus 1 returns to the processing of WE3. On the other hand, when the number of times k reaches the update interval, the information processing apparatus 1 acquires the statistical information from the statistical information register, the statistical information register file, or the area where the statistical information is saved in the memory. read out. Then, the information processing apparatus 1 updates the decimal point position of each variable of each layer based on the read statistical information (WE6).
  • the information processing apparatus 1 may determine the decimal point position so that, for example, the ratio of the saturated data and the underflowed data to the total number of data satisfies the target condition. Further, the information processing apparatus 1 may prioritize one of both the ratio of saturated data to the entire data and the ratio of underflowed data to the entire data that satisfy the target condition. . In addition, the information processing apparatus 1 sets the decimal point position by positioning the average of the upper limit bit position where saturation does not occur and the lower limit bit position where valid data exists in the center of the range that can be expressed by a fixed-point number. May be. Furthermore, the information processing apparatus 1 initializes the number of times k to 0, and further resets a register for storing statistical information. Then, the information processing apparatus 1 returns to the process of C3.
  • Accumulating statistical information of each variable of each layer at WE4 and reading out statistical information from a register or register file in which various statistical information is stored at WE6 are performed in at least one of the one or more layers. This is an example of acquiring statistical information about the distribution of bits in fixed-point number data when executing an instruction including the instruction. Also, in WE6, updating the decimal point position of each variable of each layer based on the read statistical information means that the decimal point position of the fixed-point number data is updated based on the statistical information about the bit distribution. It is an example.
  • FIG. 31 shows an example of updating the decimal point position when the data does not fit in the fixed-point number range.
  • the figure shows, for example, the distribution of the most significant bit positions that are unsigned.
  • the fixed-point number is Q5.
  • an area A1 which is described by 10 (5 digits in the integer part and 10 digits after the decimal point) and is saturated, an area A2 that can be expressed, and an area A3 in which underflow occurs are formed.
  • the area A1 to be saturated and the area A3 in which underflow occurs are exemplified by white frequency distribution.
  • the expressible area is indicated by a hatched hatching pattern.
  • the frequency distribution in the region where the underflow occurs is higher than the frequency distribution in the saturated region, and the balance is poor.
  • the decimal point position is moved down by 2 bits and Q3.12 (3 digits for the integer part and 12 digits after the decimal point)
  • the value obtained by dividing the number of data in the saturated area by the total number of data is the target reference value. Less than. Therefore, the information processing apparatus 1 may reset the decimal point position from Q5.10 to Q3.12 and continue deep learning.
  • FIG. 32 and FIG. 33 show an example of updating the decimal point position when the data falls within the range of the fixed-point number.
  • FIG. 32 shows the distribution of the most significant bit positions that are unsigned, for example.
  • FIG. 33 shows the distribution of the least significant bits that are unsigned.
  • the data of the variable is within the range that can be expressed with the current bit precision (Q3.12 format).
  • FIG. 33 shows that there are valid values up to the -1 bit, and these values are rounded. Therefore, the information processing apparatus 1 has the 11th bit of the maximum value where the number of data is 1 or more in the most significant bit position distribution and the -1th bit of the minimum value where the number of data is 1 or more in the distribution of the least significant bit.
  • the information processing apparatus 1 accumulates statistical information of each variable of each layer in a register or a register file when executing a deep learning mini-batch. Then, the information processing apparatus 1 can update the decimal point position of each variable of each layer based on the accumulated statistical information. That is, the processor 10 acquires statistical information on the bit distribution.
  • the statistical information includes (1) the distribution of the most significant bit positions that are unsigned, (2) the distribution of the least significant bit positions that are unsigned, and (3) the most significant bit position that is not signed. (4) the minimum value of the least significant bit position to be unsigned, or a combination thereof. Therefore, when the information processing apparatus 1 executes deep learning, overhead in the deep learning program for acquiring statistical information of data is eliminated, and thus dynamic fixed point arithmetic can be realized in a practical time.
  • the processor 10 of the information processing apparatus 1 executes the instruction with the statistical information acquisition function, bit shifts the calculation result, performs rounding / saturation, and executes the instruction stored in the register. Therefore, the information processing apparatus 1 can reduce overhead for acquiring statistical information indicating the bit distribution. Also, an appropriate bit shift, that is, a decimal point position can be determined immediately from the statistical information indicating the bit distribution. In other words, unlike the information processing apparatus 1, the decimal point position is shifted by one bit at a time and an appropriate decimal point position is tried and the result is confirmed by the next calculation. Can be determined (FIGS. 31 and 32). Therefore, the information processing apparatus 1 is unlikely to repeat the learning process with an inappropriate decimal point position as in the comparative example. In addition, the information processing apparatus 1 is less likely to lead to deterioration in accuracy of learning results and to slow down the convergence of deep learning.
  • the information processing apparatus 1 can perform deep learning with a fixed-point number with high accuracy, the data transfer amount and the circuit scale of the arithmetic unit can be reduced. As a result, the information processing apparatus 1 can reduce power consumption.
  • the circuit scale that can be reduced can be calculated as follows. As an example, if the circuit that performs 32-bit floating-point number operations is limited to a circuit that performs 16-bit fixed-point number operations, the amount of data (memory and data transfer amount) is halved. In addition, the circuit scale in the product-sum operation is about half that of the arithmetic circuit scale (estimated by FPGA).
  • the processor 10 can acquire the position of the most significant bit that does not match the sign bit in the fixed-point number data after the instruction is executed by the statistical information acquisition unit 102A. Further, the processor 10 can accumulate and count the position of the most significant bit that does not match the sign bit by the statistical information aggregation unit 104A with respect to a plurality of fixed-point number data. Further, the processor 10 uses the statistical information aggregating unit 104B and the statistical information storage unit 105C (or 105E) to logically convert a bit string indicating the position of the most significant bit that does not match the sign bit with a true value for a plurality of fixed-point number data. Accumulate by sum operation. Then, the processor 10 can acquire the position of the highest true value in the accumulated bit string.
  • the processor 10 can acquire the position of the least significant bit that does not match the sign bit in the fixed-point number data after the instruction is executed by the statistical information acquisition unit 102B. Further, the processor 10 can accumulate and count the position of the least significant bit that does not match the sign bit by the statistical information aggregation unit 104A for a plurality of fixed-point number data. Further, the processor 10 uses the statistical information aggregating unit 104B and the statistical information storage unit 105D (or 105F) to generate a bit string that indicates the position of the least significant bit that does not match the sign bit as a true value for a plurality of fixed-point number data. Accumulate by sum operation. The processor 10 can acquire the position of the lowest true value in the accumulated bit string. With the configuration as described above, the processor 10 can acquire the statistical information. ⁇ About the information processing apparatus of this embodiment>
  • the information processing apparatus 1 includes a processor 10, an instruction memory 21, and a data memory 22.
  • the information processing apparatus 1 executes deep learning in accordance with a computer program that is executed in the instruction memory 21 in an executable manner.
  • the processor 10 is also called a central processing unit (CPU) or a microprocessor (MPU).
  • the processor 10 is not limited to a single processor, but may be a multiprocessor configuration.
  • a single processor 10 connected by a single socket may have a multi-core configuration.
  • At least a part of the processing of the information processing apparatus 1 that performs deep learning is performed by a device other than the processor 10, such as a digital signal processor (DSP), a graphics processing unit (GPU), a numerical operation processor, a vector processor, an image processing processor, or the like.
  • DSP digital signal processor
  • GPU graphics processing unit
  • numerical operation processor a vector processor
  • an image processing processor or the like.
  • the integrated circuit includes an LSI, an application specific integrated circuit (ASIC), and a programmable logic device (PLD).
  • the PLD includes, for example, a field-programmable gate array (FPGA).
  • MCU microcontroller
  • SoC System-on-a-chip
  • system LSI system LSI
  • chip set or the like.
  • a program that causes a computer or other machine or device (hereinafter referred to as a computer or the like) to realize any of the above functions can be recorded on a computer-readable recording medium.
  • the function can be provided by causing a computer or the like to read and execute the program of the recording medium.
  • a computer-readable recording medium is a recording medium that stores information such as data and programs by electrical, magnetic, optical, mechanical, or chemical action and can be read from a computer or the like.
  • Examples of such recording media that can be removed from a computer or the like include flexible disks, magneto-optical disks, Compact Disc (CD) -Read Only Memory (ROM), CD-Recordable (R), Digital Versatile Disk (DVD). ), Blu-ray Disc, Digital Audio Tape (DAT), 8 mm tape, flash memory, and other memory cards.
  • a recording medium fixed to a computer or the like there are a hard disk, a ROM (read only memory), and the like.
  • the Solid State Drive (SSD) can be used as a recording medium removable from a computer or the like, or as a recording medium fixed to the computer or the like.

Abstract

【課題】深層学習を固定小数点数で精度よく実行することで、回路規模と消費電力を削減する。 【解決手段】演算処理装置は、固定小数点数データに対する命令実行後の固定小数点数データ中のビットの分布についての統計情報を取得する取得回路と、固定小数点数データの小数点位置を更新する更新回路と、を備える。

Description

演算処理装置、情報処理装置、方法、およびプログラム
 本発明は、演算処理装置、この演算処理装置を含む情報処理装置、方法、およびプログラムに関する。
 今日、深層学習へのニーズが高まっている。深層学習においては、乗算、積和演算、ベクトル乗算を含む様々な演算が実行される。ところで、深層学習では、個々の演算精度への要求は、他のコンピュータ処理ほど厳密ではない。例えば、従来の信号処理等では、プログラマは極力桁あふれを発生させないようにコンピュータプログラムを開発する。一方、深層学習では、大きな値がある程度飽和することは許容される。深層学習では、複数の入力データを畳み込み演算するときの係数(重み)の調整が主な処理となり、入力データのうち、極端なデータは重視されないことが多いからである。また、大量のデータを繰り返し用いて係数を調整するため、一度飽和された値も、学習の進行に合わせて桁調整を行なうことで、飽和されずに係数調整に反映できるようになるためである。
 そこで、このような深層学習の特性を考慮し、深層学習用の演算処理装置のチップ面積の削減、電力性能の向上等を図るため、浮動小数点数を用いないで、固定小数点数による整数演算を用いることが考えられる。浮動小数点数演算よりも整数演算の方が回路構成を簡素にできるからである。
 しかしながら、固定小数点数は、ダイナミックレンジが狭いので、浮動小数点数より演算精度が劣化する場合がある。したがって、深層学習においても、小さな値を表現する精度、すなわち、有効桁数について、配慮が求められる。このため、固定小数点数を拡張した技術が提案されている。
 例えば、Mixed Fixed Pointによる処理では、プログラム全体として統一した小数点位置を使うのではなく、変数ごとに適した小数点位置(Qフォーマット)が用いられる。図1は、Q3.12フォーマットを例示する図である。Q3.12フォーマットは、符号ビット1桁、整数部3桁、小数点以下12桁の16ビットデータを定義する。Mixed Fixed Pointでは、変数ごとに、小数点位置、つまり、整数部の桁数と小数点以下の桁数が異なるものとして処理される。
 他の例として、Dynamic Fixed Point (動的固定小数点数)による処理では、実行中に変数の値域が取得され、一定のタイミングで小数点位置が見直される。したがって、Mixed Fixed Point演算、およびDynamic Fixed Point演算は、浮動小数点演算よりも処理が簡単な固定小数点演算に、浮動小数点演算の側面を加えたものと言える。
 さらに、Mixed Fixed Point演算、Dynamic Fixed Point演算による処理を実行するためのプログラム向けの機能を有するDigital Signal Processor(DSP)も提案されている。例えば、ブロック・シフト指定付きの演算命令を実行するDSPがある。ブロック・シフト指定付きの演算命令は、変数のビット幅より大きいビット幅で演算を実行し、演算結果から値をシフトして切り出して変数用のレジスタに格納する。この命令では、演算結果から値を切り出すときのシフト量 S (例えば、-128~127)が即値/汎用レジスタで指定可能である。例えば、DSPがResult = Saturate (((in1 (演算子) in2) >> S), 16)という命令を実行すると、演算結果を S ビットシフトし、下位16bit を残し、上位ビットを飽和処理する。S ≧0 の場合には、DSPは、演算結果を算術右シフトし、すなわち、符号ビットを埋め込んで右シフトし、下位ビットを削除する。一方、S < 0 の場合は、DSPは、演算結果を算術左シフト、すなわち、符号ビットを維持して左シフトし、補数での下位ビットを削除する。
 ブロック・カウント・リーディング・サイン(BCLS)出力を実行するDSPも提案されている。BCLS出力は、DSPが演算結果の count leading sign を取って、結果をレジスタに書き込む機能である。ここで、count leading signとは、正数最上位のビット1の位置(負数で最上位のビット0の位置)をいう。例えば、DSPが、max (block_count_leading_sign(in1 (演算子) in2) -1)を実行すると、変数in1 と変数in2の演算子による演算結果から、正数最上位のビット1の位置(負数で最上位のビット0の位置)がレジスタに記録される。
 図2は、深層学習において、単精度浮動小数点数(Single Precision Floating Point)、半精度浮動小数点数(Half Precision Floating Point)、固定小数点数(Fixed point)、Dynamic Fixed Point数を適用した場合の認識エラー率を例示する(非特許文献1参照)。なお、図2で、第1行目のデータ(Goodfellow et al.(2013))は、他の論文の評価結果である。また、図2の表で、Propは、認識(フォーワッド方向)および学習(バックワード方向)おけるデータ伝搬時のビット幅を示す。また、Up.は、重み係数アップデート時のビット幅を示す。さらに、PI MNIST、MNIST、CIFAR-10、およびSVHNは、深層学習に用いられたデータセットを示す。
 なお、非特許文献1によるDynamic Fixed Point数による処理では、演算または変数の
代入ごとに、オーバーフローの有無を記録し、オーバーフロー率(全演算回数に対するオーバーフローした演算の回数、全代入回数に対するオーバーフローした代入回数等)が算出される。そして、この処理では、所定の期間ごとに、各変数の小数点位置を以下の手順1、2で変更する。
(手順1)オーバーフロー率が規定値(rmax)より大きい場合、小数点位置を1つ下げる。
(手順2)オーバーフロー率の2倍の値が規定値(rmax)以下の場合、小数点位置を1つ上げる。
 図2に例示されるように、従来技術による処理では、単精度浮動小数点数、半精度浮動小数点数、固定小数点数、およびDynamic Fixed Point数による結果においても、認識エ
ラー率は大きく増加していない。
特開2016-33754号公報 特開2012-203566号公報 特開2010-112878号公報
Courbariaux et al.、 "TRAINING DEEP NEURAL NETWORKS WITH LOW PRECISION MULTIPLICATIONS" Accepted as a workshop contribution at ICLR 2015, International Conference on Learning Representations(ICLR),2015年9月23日,
 上述のように、従来技術のDynamic Fixed Point数による処理結果においても、認識エラー率が大きく増加しない。しかしながら、上記従来の技術においては、小数点位置をオーバーフロー率を基に1ビット調整するため学習結果の精度が劣化する。例えば、k個のデータの学習ごとに小数点位置を調整する場合、小数点位置が適正位置からn ビットずれている場合、小数点位置が適切な位置に調整されるまでに、(n * k)回の学習が進む。その結果、小数点位置が適正な位置になるまでに、飽和するデータやアンダーフローするデータが増え、学習が収束しない、あるいは、学習結果の精度劣化につながるおそれがある。
 1つの側面では本発明の目的は、深層学習を固定小数点数で精度よく実行し、回路規模と消費電力を削減できるようにすることである。
 本発明の一側面は、以下の演算処理装置によって例示される。すなわち、本演算処理装置は、固定小数点数データに対する命令実行後の前記固定小数点数データ中のビットの分布についての統計情報を取得する取得回路と、前記固定小数点数データの小数点位置を更新する更新回路と、を備える。
 本実施形態によれば、深層学習を固定小数点数で精度よく実行することで、回路規模と消費電力を削減することができる。
Q3.12フォーマットを例示する図である。 深層学習において、単精度浮動小数点数、半精度浮動小数点数、固定小数点数、Dynamic Fixed Point数を適用した場合の認識エラー率を例示する図である。 ニューラルネットワークにおける深層学習を例示する図である。 フォーワッド方向の認識処理および識別処理とともにバックワード方向の学習処理を例示する図である。 比較例に係る深層学習の手順を例示する図である。 各層の処理の詳細を例示する図である。 比較例の情報処理装置による学習処理のフローチャートを例示する図である。 非符号となる最上位ビット位置の分布データを例示する図である。 非符号となる最下位ビット位置の分布データを例示する図である。 プロセッサの構成を例示する図である。 プロセッサの回路ブロックを例示する図である。 ベクトルユニットの詳細を例示する図である。 スカラユニットの構成を例示する図である。 データ変換部の構成を例示する図である。 非符号となる最上位ビット位置を取得する統計情報取得部の処理を例示する図である。 非符号最上位ビット検出器の真理値表を例示する図である。 非符号となる最上位ビット位置を取得する統計情報取得部のハードウェア回路の構成を例示する図である。 非符号となる最下位ビット位置を取得する統計情報取得部の処理を例示する図である。 非符号最下位ビット検出器の真理値表を例示する図である。 非符号となる最下位ビット位置を取得する統計情報取得部のハードウェア回路の構成を例示する図である。 統計情報集約部の処理を例示する図である。 統計情報集約部のハードウェア回路の構成を例示する図である。 統計情報集約部の処理を例示する図である。 統計情報集約部のハードウェア回路の構成を例示する図である。 統計情報格納部のハードウェア回路の構成を例示する図である。 統計情報集約部の変形例である。 統計情報格納部のハードウェア回路の構成を例示する図である。 統計情報格納部のハードウェア回路の構成を例示する図である。 変形例の統計情報格納部の構成を例示する図である。 変形例の統計情報格納部の構成を例示する図である。 命令フォーマットを例示する図である。 命令フォーマットを例示する図である。 情報処理装置が深層学習を実行する場合の各層の処理の詳細を例示する図である。 情報処理装置による学習処理のフローチャートを例示する図である。 データが固定小数点数の範囲に収まらない場合の小数点位置更新例である。 データが固定小数点数の範囲に収まる場合の小数点位置更新例である。 非符号となる最下位ビットの分布である。
 以下、図面を参照して一実施形態に係る情報処理装置について説明する。本情報処理装置は、深層学習を実行する。
 [深層学習の実行例]
 まず、図3を参照して、ニューラルネットワークにおける深層学習を例示する。ニューラルネットワークは、ハードウェア回路であってもよいし、コンピュータプログラム上で仮想的に構築される階層間を接続するソフトウェアによる仮想的なネットワークであってもよい。ニューラルネットワークは、例えば、画像を認識し、識別するためのフォーワッド方向の処理と、フォーワッド方向の処理で使用するパラメータを決定するバックワード方向の処理を実行する。なお、バックワード方向の処理は、バックプロパゲーション(Back Propagation、BP)と呼ばれる。
 図3のニューラルネットワークは、入力画像に対して、畳み込み層(Convolution Layer)の処理と、プーリング層(Pooling Layer)の処理とを実行し、画像の特徴を抽出し、画像を識別する。すなわち、図3では、フォーワッド方向の処理が例示されている。図3では、Input Layerとされている入力画像に対して、畳み込み層の処理とプーリング層の処理が実行され、4フィーチャマップ、6フィーチャマップ等が順次生成される。ここでフィーチャマップは、例えば、画像の異なるチャンネルで授受されるデータ、あるいは、画像のうちのR,G,Bデータ等に相当するデータである。そして、図3のニューラルネットワークは、最終層であるFully Connected multilayer perceptron(MLP)において、識別結果を出力する。なお、プーリング層は、サブサンプリング層(Sub-sampling Layer)とも呼ばれる。最終層は、全結合層(Fully Connected Layer)とも呼ばれる。
 フォーワッド方向の処理のうち、最終層に至るまでの畳み込み層の処理と、プーリング層の処理を繰り返し実行する演算回路部分を特徴抽出部と呼ぶ。すなわち、特徴抽出部は、入力画像に対して、畳み込み層の処理と、プーリング層の処理を繰り返し実行することで、間引かれた画像を抽出する。畳み込み層の処理は、畳み込み演算とも呼ばれる。プーリング層の処理は、プーリング演算、あるいはサブサンプリング演算とも呼ばれる。
 より具体的には、特徴抽出部は、フォーワッド方向のある層(第l-1層)において、N個×N個の画素を有する画像の情報に対して、例えば、m×m個の重みwab(a,b=
0,...,m-1)のフィルタによる畳み込み演算を実行する。特徴抽出部は、この畳み込み演算を実行することで、現在処理中の層(第l-1層)の画像から、次の層(第l層)の画像の情報を作る。さらに、畳み込み演算による処理結果は、非線形活性化関数 y=sigma(x)によって変換され、発火と呼ばれるモデル化がなされる。非線形活性化関数は、例えば、sigma(x)=max(0,x)である。すなわち、非線形活性化関数 y=sigma(x)は、xが負の値の場合、sigm(x)=0であり、xが正の値の場合、sigma(x)=xの値をとる関数である。なお、重みwは畳み込み演算に用いられることから、係数ということもできる。
 <畳み込み層の計算>
 今、第l-1層における画素(i,j)からの出力をyl-1 i,jとし、第l層の画素(i,j)における畳み込み演算の処理結果をxl i,jとし、第l層における画素(i,j)の非線形活
性化関数 y=sigm(x)の演算結果をyl i,jとする。xl i,jとyl i,jは以下の(式1)、(式2)で表すことができる。ただし、(式2)において、関数sigmaは、ギリシャ文字で表している。
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
 式1の対象となる第l-1層の画像の情報のうち、m×m個の画素の領域を以下、単位矩形領域と呼ぶ。なお、単位矩形領域は1つのフィーチャマップに限定される訳ではなく、図1に例示した4フィーチャマップ、6フィーチャマップが畳み込み演算の対象となる場合に、複数のフィーチャマップを用いて、畳み込み演算が実行されてもよい。また、以下、画素をセルともよぶ。
 プーリング演算は、N個×N個の画素を有する画像をN/k個×N/k個の画素を有する画像に間引く処理である。間引き方としては、例えば、N個×N個の画素をk個×k個ずつの部分画像に区切り、各部分画像に含まれるk個×k個の画素中の最大の画素値を有する1つの画素を選択する処理(以下、max poolingと呼ぶ)が例示できる。また、他の例として、k個×k個の画素の平均値によって1つの画素を生成する処理が例示できる。
 識別部は、間引かれた画像中の全画素に対して、それぞれの画素に重みを適用し、畳み込み演算を実行することで、出力値を得る。今、特徴抽出部の最後の層を第l-1層として、第l-1層の各画素値をyl-1 jとし、全結合による畳み込み演算結果をxl iとし、重みをwl-1 jiとすると、xl iは以下の(式3)で表すことができる。
Figure JPOXMLDOC01-appb-M000003
 また、識別部における非線形活性化関数 y=sigma(x)の演算結果をyl iとすると、識別部の演算結果yl iは以下の(式4)で表すことができる。ただし、(式4)において、関数sigmaは、ギリシャ文字で表している。
Figure JPOXMLDOC01-appb-M000004
ここで、Il iはバイアス成分である。
 図4に、フォーワッド方向の認識処理および識別処理とともにバックワード方向の学習処理を例示する。図4のニューラルネットワークにおいても、フォーワッド方向の認識処理は、入力画像に畳み込み演算を実行する畳み込み層、間引き処理を実行するプーリング層によって実行される。また、識別結果を出力する識別処理は、全結合層(図4では、Fully connectedと記載)によって実行される。
 全結合層による識別処理の結果は、正解データを比較され、比較結果である差分値がエラーとして出力される。エラーは、学習処理に用いられる。学習処理は、エラーから、フォーワッド方向の畳み込み層および全結合層における各層でのエラーおよび各層での次の重みを計算する処理である。図2では、現在の重みとして、畳み込み層(1層)における1つの重みwiと、全結合層(1層)における1つの重みwjが例示されている。また、次の重みとして、畳み込み層(1層)における1つの重みwi+1と、全結合層(1層)における1つの重みwj+1が例示されている。
 今、例えば、エラーの評価関数として、識別結果である出力値yと正解データTiとの差分値の平方和を評価関数として例示すると、(式5)のように定義できる。学習処理は、(式5)で例示されるエラーの評価関数を最小にするための重みwを決定する処理と考えることができる。
Figure JPOXMLDOC01-appb-M000005
 次に、(式5)をyで偏微分すると(式6)となり、右辺は出力値yと正解データTiとの差である誤差値となる。エラーの評価関数を(式5)から一般化した場合も、エラーの評価関数を出力値yで偏微分すると、出力値yと正解データTiとの差である誤差値となると考えることができる。
Figure JPOXMLDOC01-appb-M000006
 さらに、(式5)をxiで偏微分し、(式7)の推移律を適用し、さらに、yiに式4を代入すると、(式8)が得られる。なお、画素値xと、非線形活性化関数の出力yとの関係を(式2)で表す場合には、(式9)が得られる。
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
Figure JPOXMLDOC01-appb-M000009
一方、(式5)をyl iで偏微分し、全結合層の画素値xl iが1つ入力側の層(第l-1層)からの出力値yl-1 jによって(式3)のように表されることを考慮すると、(式10)が得られる。なお、第l層の画素値xl i,jが1つ入力側の層(第l-1層)からの出力値yl-1 jによって(式1)で表される場合には、(式10)は、(式11)のようになる。
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
 (式10)の左辺は、第l層の誤差を示す。また、(式10)の右辺は、第l+1層の誤差に、第l層の画素iと第l+1層の画素jとの間の重みの変数wi,jを乗算した結果
の集計である。この集計は、第l層の画素iに関係する第l+1層の画素jについて集計したものである。
 また、(式5)を重みwl ijで偏微分し、推移律を適用し、さらに、(式3)を代入すると、(式12)が得られる。ただし、(式3)は、第1-1層からの出力yと、第l層の画素値xの関係となっているが、(式12)は、第1層からの出力yと、第l+1層の画素値xの関係となっている。(式12)は、エラーの評価関数Eの勾配を示す。最勾降下法によるニューラルネットワークの学習処理においては、エラーの評価関数Eの勾配と、学習係数イータの積が重みWの変化量(現在の重みWtと次の重みWt+1の差分値)となる。したがって、以下の記述において、エラーの評価関数Eの勾配を重みWの更新量deltaWと定義する。なお、画素値xとyの関係が(式1)で表される場合には、(式12)は、(式13)のようになる。以上から、エラーの評価関数Eに最勾降下法を適用すると、(式14)が得られる。なお、(式14)では、演算がM回繰り返される式となっているが、M=1でもよい。
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000013
Figure JPOXMLDOC01-appb-M000014
(A)各層の重み
 (式14)は、現在の重みWtと次回認識処理での重みWt+1との関係を示している。したがって、(式14)の右辺の第2項が次回の重みへの増分値となる。また、(式14)でギリシャ文字イータは、エラーの評価関数Eの勾配から重みWtの増分値を得るための係数であり、例えば、経験的実験的に設定できる。すなわち、学習処理においては、学習回路の各層において、(式12)(あるいは式13)による勾配を求め、エラーの評価関数Eが小さくなる方向に、(式14)の第2項の増分値を算出し、次回の重みWt+1を求める処理を実行する。
(B)各層のエラーの評価関数の勾配(更新量deltaWの計算)
 ここで、(式14)の第2項は、(式12)により、各層(第l層)の画素値(yl i)と、各層(第l層)に対して1つ出力側の層(第l+1層)のエラー(エラーの評価関数の画素値xl+1 jによる偏微分値)との積から得られる。ただし、現在の層((式13)では第l-1層)と、1層全結合層側の層((式13)では第l層)との関係が(式1)のように積和演算で表される場合、更新量deltaWは、(式13)で表される。すなわち、更新量deltaWは、現在の層(第l-1層)の画素の出力値yl-1 i,jと関係する第l層の画素値xl i,jからのエラーへの寄与を集計したものとなっている。
(C)各層のエラー
 一方、(式10)の左辺は、各層(第l層)のエラー(エラーの評価関数の画素値yl iによる偏微分値)を示す。また、(式10)の右辺は、現在の層(第l層)に対して1つ出力側の層(第l+1層)のエラー(エラーの評価関数の画素値xl+1 jによる偏微分値)と、第l層の画素iと第l+1層の画素jとの間の重みの変数wi,jとの積の集計である
。この集計は、第l層の画素iに関係する第l+1層の画素jについての集計である。
[比較例]
 図5から図7を参照して、比較例に係る情報処理装置での深層学習について説明する。
図5は、比較例に係る深層学習の手順を例示する図である。比較例の情報処理装置は、コンピュータプログラムにしたがって深層学習を実行する。比較例の情報処理装置は、Dynamic Fixed Point数の処理を実行可能なプロセッサを有している。
 図5のように、比較例の深層学習は、1層目の畳み込み層(Conv_1)とプーリング層(Pool_1)、2層目の畳み込み層(Conv_2)とプーリング層(Pool_2)、全結合層1(fc1)、および
全結合層2(fc2)の処理により実行される。深層学習は、ミニバッチと呼ばれる処理の単
位に区切られて実行される。ここで、ミニバッチとは、学習の対象となる入力データの集合{(Ini,Ti),i=1~N}を複数組(例えば、k個のデータのM組、N=k*M)に分割したk個のデータの組み合わせをいう。また、ミニバッチは、このような個々の入力データの組(k個のデータ)で実行される学習の処理単位のことをいう。ここで、Iniは、入力データ(ベクトル)、Tiは正解データ(ベクトル)である。比較例の情報処理装置は、以下のように、深層学習中の所定数のミニバッチごとに、各層の各変数のオーバーフロー回数を取得してコンピュータプログラム中の変数に蓄積し、深層学習に用いる変数の固定小数点位置を自動調整する。
 比較例の情報処理装置は、例えば、浮動小数点数による試行(ミニバッチ1回など)や、
ユーザ指定により各変数の初期小数点位置を決定し、学習を開始する(S1)。そして、情報処理装置は、k回のミニバッチを学習中に、各層の各変数のオーバーフローの回数を
統計情報として保存する(S2)。このとき、情報処理装置は、学習を実行するプログラム中の各変数に対する演算、代入等がなされる毎に、オーバーフローの有無を判定し、回数を計数し、回数を保持するカウンタ変数に代入する。
 ミニバッチを学習中に変数にオーバーフローが発生した場合は、変数に対する飽和処理を行ない、学習を続行する(S3)。ここで、飽和処理とは、正の数がオーバーフローした際には正の最大値に、負の数がオーバーフローした際は負の最小値にクリップする処理である。
 そして、情報処理装置は、k組のデータに対するミニバッチ終了後(k回の学習終了後
)、カウンタ変数に蓄積したオーバーフロー回数からオーバーフロー率を求め、オーバーフロー率を基に、固定小数点数の小数点位置を調整する(S4)。そして、情報処理装置は、S2の処理に戻り、学習を進める。
 図6は、図5における各層の処理の詳細を例示する図である。図では、1層目の畳み込み層(Conv_1)、プーリング層(Pool_1)、および全結合層2(fc2)が例示されている。この
例では、1層目の畳み込み層(Conv_1)において、入力データini=(x0,...,xn)と、重み(Wij)との間で、畳み込み演算が実行され、z0,...,zj,...等が計算される。また、z0,...,zj,...等に対して、活性化関数が演算され、u0,...,uj,...等が計算される。情報処理装置
は、この1層目の畳み込み層(Conv_1)での変数z0,...,zj,...のオーバーフロー回数をカ
ウンタ変数Conv_1_zに蓄積する。また、情報処理装置は、この1層目の畳み込み層(Conv_1)での変数u0,...,uj,...等でのオーバーフロー回数をカウンタ変数Conv_1_uに蓄積する
。例えば、カウンタ変数Conv_1_uが配列の場合、カウンタ変数Conv_1_u(1)には、変数u0,...,uj,...のうち、オーバーフローした変数の個数が累積される。また、カウンタ変
数Conv_1_u(2)には、変数u0,...,uj,...のうち、2倍するとオーバーフローする変数
の個数が累積される。
 1層目の畳み込み層(Conv_1)での演算結果は、1層目のプーリング層(Pool_1)から、さらに上位層へ伝播される。このとき、情報処理装置は、2層目以上の層でも同様の演算と、オーバーフロー回数の蓄積を実行する。情報処理装置は、以上のような演算を上位層においても実行して演算結果をさらに上位層へ伝播させる。そして、情報処理装置は、最終的には、全結合層2(fc2)において、得られた演算結果と、正解データTiとの差分値からエラーδ0(7),...,δj(7),...を算出する。そして、情報処理装置は、エラーδ0(7),...,δj(7),...を基に、逆方向の伝播を実行する。その結果、情報処理装置は、下位の階層(例えば、結合層1(fc1))の出力でのエラーδ0(6),...,δj(6),...δn(6)と重みの変数Wijの次回の重みへの差分値ΔWijを算出する。このとき、情報処理装置は、エラーδ0(7),...,δj(7),...およびエラーδ0(6),...,δj(6),...,δn(6)でのオーバーフロー回数をカウンタ変数fc2_δに蓄積する。また、情報処理装置は、差分値ΔWijでのオーバーフロー回数をカウンタ変数fc2_ΔWに蓄積する。また、情報処理装置は、重みの変数Wijでのオーバーフロー回数をカウンタ変数fc2_Wに蓄積する。
 そして、情報処理装置は、全結合層1(fc1)から1層目の畳み込み層(Conv_1)まで、エ
ラーを逆方法に伝播させながら、重みの差分を計算する。情報処理装置は、以上のような順伝播と逆伝播をk組の入力データを用いて、k回繰り返す。情報処理装置は、このようなk回のミニバッチ終了後、各変数に対応するカウンタ変数のオーバーフロー回数を基に、各変数の固定小数点位置を更新する。
 図7に、比較例の情報処理装置による学習処理のフローチャートを例示する。この処理では、情報処理装置は、初期小数点位置を決定する(C1)。そして、情報処理装置は、回数kを値0で初期化する。そして、情報処理装置は学習終了の条件が充足されたか否か
を判定する(C3)。学習が終了するのは、全結合層(fc2)でのエラーが基準値以下とな
るか、または、学習回数が規定の最大値に達した場合である。
 学習終了の条件が充足されない場合、情報処理装置は、次のミニバッチを実行し、変数kをカウントアップする(C4)。そして、情報処理装置は、統計情報としてオーバーフロー回数を各カウンタ変数に蓄積する(C5)。すなわち、情報処理装置は、各層において、オーバーフローした変数の個数、2倍するとオーバーフローする変数の個数を累積する。
 そして、情報処理装置は、回数kが更新間隔に達したか否かを判定する(C6)。回数kが更新間隔に達していない場合、情報処理装置は、C3の処理に戻る。一方、回数kが更新間隔に達した場合、情報処理装置は、変数のオーバーフロー回数にしたがって、小数点位置を更新する。例えば、情報処理装置は、非特許文献1と同様、オーバーフロー回数を演算の実行回数で除算したオーバーフロー率を求めればよい。そして、オーバーフロー率が規定値を超えた場合に、情報処理装置は、該当する変数の小数点位置を1つ下げ、整数部を1ビット拡張すればよい。また、オーバーフロー率の2倍の値が規定値以下の場合、情報処理装置は、小数点位置を1つ上げ、整数部を1ビット削減すればよい。そして、情報処理装置1は、C3の処理に戻る。
 しかし、以上の処理は、各層の演算ごとにオーバーフロー回数を累積し、オーバーフロー率が既定値を越えた場合、および、オーバーフロー率の2倍の値が既定値未満となった場合に固定小数点位置を1ビットずらす処理である。この処理は、オーバーフロー回数あるいはオーバーフロー率に基づく固定小数点位置の更新処理である。情報処理装置は、オーバーフロー回数あるいはオーバーフロー率からは、適正な小数点位置がどこであるかを判断することが困難である。
 したがって、比較例の処理は、固定小数点位置の更新時、小数点位置を1つ下げる、あるいは上げる等の処理で、適正な位置を試行し、その結果からさらに判断を重ねていくという手順となる。このため、情報処理装置が適正な小数点位置を決定するまでに、小数点位置が複数回更新されることになる。例えば、上記のように、情報処理装置がk回のミニバッチごとにオーバーフロー率を判定し、1ビットずつ小数点位置を更新する場合には、
小数点位置をNビットずらすために、N*k回(*は乗算)分のミニバッチが実行される。こ
のため、小数点位置が不適切な状態で学習処理が繰り返される。つまり、学習中に、望ましくないレベルで固定小数点数データの飽和、あるいは、アンダーフローが発生し、学習結果の精度劣化につながり、収束が遅くなる恐れがある。
 また、比較例の情報処理装置は、単にオーバーフロー回数を取得し、蓄積する処理を深層学習のプログラム中で実行するため、学習時間が増大する可能性がある。つまり、情報処理装置は、適正な小数点位置を決定するための情報をプログラムに提供する機能がないため、プログラムにオーバーフロー回数を累積するコードが組み込まれ、処理時間が増加する恐れがある。
 [実施形態]
 以下、図8Aから図32により、一実施形態に係る情報処理装置1、情報処理装置1が実行する情報処理方法、および情報処理装置1で実行されるプログラムについて説明する。本実施形態は、一例であり、情報処理装置1は、本実施形態の構成に限定される訳ではない。
 <統計情報>
 本実施形態では、情報処理装置1のプロセッサが統計情報を取得することで、統計情報取得のためのプログラム中のオーバーヘッドが削減される。ここで、プロセッサが取得する統計情報は、例えば、以下のいずれか、または、これらの組み合わせをいう。情報処理装置1が実行するアプリケーションプログラムは、プロセッサから統計情報を取得することで、小数点位置を最適化する。アプリケーションプログラムの処理にしたがってプロセッサは、Dynamic Fixed Point演算のための命令を実行する。
(1)非符号となる最上位ビット位置の分布
 図8Aに、非符号となる最上位ビット位置の分布データを例示する。図8Aは演算の途中結果が40bitで、固定小数点数の桁あわせのために14bit右シフトされるデータに対する例である。非符号となる最上位ビット位置とは、正数に対しては、ビットが1となっている最上位のビット位置をいう。また、負数に対しては、ビット0となっている最上位のビット位置をいう。非符号となる最上位ビット位置は、例えば、ビットの並びを最上位ビットであるbit[39]から最下位ビットであるbit[0]としたとき、符号ビットbit[39]と異なるbit[k]のうち、インデックスkが最大のものをいう。非符号となる最上位ビット位置の分布が得られると、絶対値としての値の分布範囲が把握可能となる。
 図8Aで、縦軸は、非符号となる最上位ビット位置の出現個数であり、横軸は最上位のビットの位置 Count Leading Sign(CLS)である。図8Aでは、ビット0の右側に小数点があると仮定する。本実施形態では、情報処理装置1のプロセッサの演算回路および演算回路内のレジスタは、命令のオペランドで指定されるレジスタのビット数(例えば、16ビット)以上のビット幅(例えば、40ビット)を有する。ただし、情報処理装置1のプロセッサの演算回路および演算回路内のレジスタのビット幅が40ビットに限定される訳ではない。また、演算結果は、例えば、16ビットのレジスタ等、演算回路よりも少ないビット幅のレジスタ(命令のオペランドで指定されるレジスタ)に格納される。その結果、演算結果は(例えば、40ビット)、オペランドで指定されるシフト量でシフトし、ビット0未満に該当するビットは所定の丸め処理がなされ、オペランドで指定されるレジスタのビット幅を越えるデータ(ビット15を越えるデータ)は、飽和処理される。
 また、図8Aの横軸に付与された数値は、固定小数点で表現可能な数値を示す。例えば、情報処理装置1がこの固定小数点数を-2ビットだけシフト(右方向に2ビットシフト)すると、最上位ビットが14の位置にシフトし、飽和される領域が2ビット拡張され、アンダーフローが発生して0となる領域が2ビット減少する。すなわち、情報処理装置1が小数点位置を2ビット左にシフトすると、飽和される領域が2ビット拡張され、アンダーフローが発生する領域が2ビット減少する。また、例えば、情報処理装置がこの固定小数点数を2ビットだけ正方向にシフト(左方向に2ビットシフト)すると、最上位ビットが18の位置にシフトし、飽和される領域が2ビット減少し、アンダーフローが発生する領域が2ビット拡張される。すなわち、情報処理装置1が小数点位置を2ビット右にシフトすると、飽和される領域が2ビット減少し、アンダーフローが発生する領域が2ビット拡張される。
 情報処理装置1は、学習実行中に、非符号となる最上位のビット位置の分布を得ることで、Dynamic Fixed Point演算における適正なシフト量、つまり、適切な固定小数点位置
を直ちに決定できる。例えば、情報処理装置1は、飽和されるデータが指定の割合以下になるように固定小数点位置を決定すればよい。つまり、一例としては、情報処理装置1は、データのアンダーフローが所定の程度となることよりもデータの飽和が所定の程度となること優先して、固定小数点位置を決定できる。
 非符号となる最上位ビット位置の分布は、情報処理装置1のプロセッサ10(図9参照)内の所定のレジスタ(統計情報レジスタともいう)内に積算される。プロセッサ10は、当該統計情報レジスタからの分布データの読み出し、書き込み、統計情報レジスタのクリア等の命令を実行する。したがって、統計情報レジスタには、前回のクリア命令の実行から現在までに命令実行の対象となった1以上の固定小数点数についての分布データが蓄積される。蓄積された分布データは、読み出し命令によってメモリに読み出される。なお、プロセッサ10は、クリア命令に代えて、統計情報レジスタへのロード命令の実行を可能とし、値0を統計情報レジスタにロードできるようにしてもよい。
(2)非符号となる最下位ビット位置の分布
 非符号となる最下位ビット位置の分布とは、ビットが符号と異なる値となる最下位のビット位置をいう。例えば、ビットの並びを最上位ビットであるbit[39]から最下位ビットであるbit[0]までの並びとしたとき、符号ビットbit[39]と異なるbit[k]のうち、インデックスkが最小のものをいう。非符号となる最下位ビット位置の分布は図8Bのように表現される。また、非符号となる最下位ビット位置の分布では、有効なデータが含まれる最下位ビットが把握される。
(3)非符号となる最上位ビット位置の最大値
 非符号となる最上位ビット位置の最大値は、前回クリア命令が実行されたときから現在に至るまでに、命令実行の対象となった1以上の固定小数点数について符号ビットの値と異なる値となる最上位のビット位置のうちの最大値である。情報処理装置1は、非符号となる最上位のビット位置の最大値をDynamic Fixed Point演算における適正なシフト量、
つまり、適切な小数点位置の決定に利用できる。
 プロセッサは、上記統計情報レジスタからの上記最大値の読み出し、統計情報レジスタのクリア等の命令を実行する。したがって、統計情報レジスタには、前回のクリア命令の実行から現在までの最大値が蓄積され、読み出し命令によって最大値がメモリに読み出される。
(4)非符号となる最下位ビット位置の最小値
 非符号となる最下位ビット位置の最小値は、前回クリア命令が実行されたときから現在に至るまでの1以上の固定小数点数について符号と異なる値となる最下位のビット位置のうちの最小値である。情報処理装置1は、非符号となる最下位ビット位置の最小値をDynamic Fixed Point演算における適正なシフト量、つまり、適切な小数点位置の決定に利用
できる。
 プロセッサ10は、統計情報レジスタからの上記最小値の読み出し、クリア等の命令を実行する。したがって、統計情報レジスタには、前回のクリア命令の実行から現在までの上記最小値が蓄積され、読み出し命令によってメモリに読み出される。
<構成>
 図9に、情報処理装置1のプロセッサ10の構成を例示する。図9では、プロセッサ10とともに、命令用メモリ(IRAM)21およびデータ用メモリ(DRAM)22も例示されている。プロセッサ10は、single instruction multiple data(SIMD)型の演算処理装置である。
 プロセッサ10は、プログラムカウンタ(PC)111、デコーダ(Decoder)112
、レジスタファイル12、ベクトル演算用の演算器131、スカラ演算用の演算器(Arithmetic Logic Unit(ALU))141、およびベクトル演算用の演算器131の結果を
加算するアキュムレータ132を有している。また、プロセッサ10は、ベクトル演算用の演算器131、スカラ演算用の演算器141、アキュムレータ132等の演算結果、および、データ用メモリ22からの読み出し結果を選択する複数のセレクタ101を有している。なお、図では、複数のセレクタを総称してセレクタ101と呼ぶ。また、複数のベクトル演算用の演算器を総称して演算器131と呼ぶ。
 さらに、プロセッサ10は、セレクタ101によって選択されたデータからの統計情報を取得する統計情報取得部102、統計情報取得部102によって取得された統計情報を格納する統計情報格納部105を有している。統計情報取得部102と統計情報格納部105は、固定小数点数データに対する命令実行後の固定小数点数データ中のビットの分布についての統計情報を取得する取得回路の一例である。なお、図では、複数の統計情報取得部を総称して統計情報取得部102と呼ぶ。
 さらに、プロセッサ10は、セレクタ101によって選択されたデータの固定小数点位置を変更するデータ変換部103を有している。また、図では、複数のデータ変換部を総称してデータ変換部103と呼ぶ。
 図のように、プログラムカウンタ111の指す命令用メモリ21のアドレスから、命令がフェッチされ、デコーダ112がフェッチされた命令をデコードする。なお、図では、命令のフェッチを実行する命令フェッチの制御部が省略されている。
 デコーダ112が命令をデコードすると、デコード結果に応じて、プロセッサ10の各部が制御される。例えば、デコードの結果がベクトル演算命令であった場合、レジスタファイル12のベクタレジスタのデータがベクトル演算用の演算器131に入力され、ベクトル演算が実行される。ベクトル演算用の演算器131の演算結果は、セレクタ101を介して統計情報取得部102およびデータ変換部103に供給される。また、ベクトル演算用の演算器131の演算結果は、アキュムレータ132に入力され、ベクトル演算用の演算器131の演算結果が例えば、カスケードに加算される。アキュムレータ132の演算結果は、セレクタ101を介して、統計情報取得部102およびデータ変換部103に供給される。
 また、例えば、デコードの結果、命令がスカラ演算命令であった場合には、レジスタファイル12のスカラ・レジスタのデータがスカラ演算用の演算器141に入力される。演算器141の演算結果は、アキュムレータ132の演算結果と同様、セレクタ101を介して統計情報取得部102およびデータ変換部103に供給される。
 さらに、例えば、デコードの結果、命令がロード命令であった場合には、データ用メモリ22からデータが読み出され、セレクタ101を介して、統計情報取得部102およびデータ変換部103に供給される。データ変換部103でデータ変換された結果は、レジスタファイル12のレジスタに格納される。
 また、デコードの結果、命令がDynamic Fixed Point演算を実行する命令であった場合
、デコーダ112は、シフト量がデータ変換部103に供給されるように指示する。シフト量は、例えば、命令のオペランド(即値)、オペランドで指定されたレジスタ、オペランドで指定されたアドレス・レジスタの示すアドレスのデータ用メモリ22等から取得され、データ変換部103に供給される。図9の処理は、デコーダが命令から、固定小数点数データの小数点位置の指定(シフト量)を取得することの一例である。
 データ変換部103は、ベクトル演算の結果、スカラ演算の結果、アキュムレータ132の演算結果、あるいは、データ用メモリ22からの読み出し結果等で得られる固定小数点数データを、指定されたシフト量Sだけシフトする。また、データ変換部103は、シ
フトとともに、上位ビットの飽和処理および下位ビットの丸めを実行する。図12にデータ変換部の具体的構成を例示する。データ変換部103は、例えば入力を40ビットの演算結果とし、下位Sビットを小数部として丸めを行な丸め処理部と、算術シフトを実行す
るシフタと飽和処理を行なう飽和処理部を有する。
 丸め処理部は、下位S bitを小数部として丸めを行なう。Sが負の場合には、丸め処理部は、何も行なわない。丸めとしては、最近接丸め、0への丸め、正の無限大への丸め、負
の無限大への丸め、乱数丸めなどが例示される。図でシフト量は、例えば、図9に例示されるように、デコーダが命令から取得するシフト量である。
 シフト部は、Sが正の場合はS bit算術右シフト、Sが負の場合は、算術左シフト、すな
わち、-S bit算術左シフトを行なう。飽和部は、シフト結果が 2E15-1(正の最大値)以
上の場合は 2E15、-2E15(負の最小値)以下の場合は -2E15、それ以外は入力の下位16bitを出力する。ここで、2E15は、2の15乗を表す。
 そして、データ変換部103は、左シフト時上位ビットの符号を維持し、符号ビット以外を飽和処理、すなわち、上位ビット廃棄し、下位ビットに0を埋め込む。また、データ変換部103は、右シフト時、上位ビット(符号ビットより下位のビット)に符号ビットを埋め込む。そして、データ変換部103は、上記のように丸め、シフト、飽和処理によって得られるデータを、レジスタファイル12のレジスタ等と同一のビット幅(例えば、16ビットのレジスタ)で出力する。データ変換部は固定小数点数データの小数点位置を更新する更新回路の一例である。
 したがって、プロセッサ10で実行されるコンピュータプログラムがDynamic Fixed Point演算を実行する命令のオペランドにシフト量を指定することで、プロセッサ10は、
プログラム実行中に、固定小数点数の小数点位置を指定されたシフト量だけ更新する。
 また、デコードの結果、命令が統計情報取得を指示する命令(統計情報取得機能付き命令という)である場合、統計情報取得部102において、統計情報が取得され統計情報格納部105に格納される。ここで、統計情報は、上記で述べたように、(1)非符号となる最上位ビット位置の分布、(2)非符号となる最下位ビット位置の分布、(3)非符号となる最上位ビット位置の最大値、(4)非符号となる最下位ビット位置の最小値、またはこれらの組み合わせである。
 図10に、図9のプロセッサ10の回路ブロックを例示する。プロセッサ10は、制御
ユニット11、レジスタファイル12、ベクトルユニット13、スカラユニット14を含む。制御ユニット11は、プログラムカウンタ111とデコーダ112を含む。レジスタファイルは、ベクトルレジスタファイル、ベクトル演算用アキュムレータレジスタ(Vector ACC)、スカラレジスタファイル、スカラ演算用アキュムレータレジスタ(ACC)を含
む。ベクトルユニット13は、ベクトル演算用の演算器131、統計情報取得部102、データ変換部103を含む。スカラユニット14は、スカラ演算用の演算器141、統計情報取得部102、データ変換部103を含む。
 また、図10の構成例では、複数の統計情報取得部102からの統計情報を集約する統計情報集約部104が追加されている。また、統計情報格納部105はレジスタファイル12の一部となっている。また、命令用メモリ21は、メモリインターフェース(Memory
 I/F)を介して制御ユニット11に接続される。また、データ用メモリ22は、メモリインターフェース(Memory I/F)を介してベクトルユニット13およびスカラユニット14に接続される。
 図11Aにベクトルユニット13の詳細を例示する。図では、統計情報集約部104も例示されている。ベクトルユニット13は、ベクトル・レジスタVector Reg0、Vector Reg1のデータをベクトル演算用の演算器131-1で演算する。ベクトル演算用の演算器131-1の演算結果は、積和演算用のアキュムレータ132と、ベクトル演算用の演算器131-2に入力される。
 積和演算用のアキュムレータ132は、ベクトル演算用の演算器131-1の演算結果をスカラ加算し、スカラ演算用アキュムレータレジスタ(ACC)に格納する。ベクトル演
算用の演算器131-2は、命令によって指定される演算モードに従って、ベクトル演算用の演算器131-1の演算結果、あるいは、ベクトル演算用アキュムレータレジスタ(Vector ACC)のデータ、あるいは、それらを加算した結果を出力する。
 セレクタ101は、ベクトル演算用の演算器131-2の出力結果と、データ用メモリ22からの読み出し結果(Read Data 0,…, Read Data 0)のいずれかを選択し、統計情
報取得部102およびデータ変換部103に入力する。統計情報取得部102で取得された統計情報は、統計情報集約部104に入力される。また、データ変換部103でデータ変換されたデータは、図示しないセレクタを介して、データ用メモリ22(Write Data0,…, Write Data n)にストアされるか、ベクトルレジスタ(Vector Reg2)に保持される
 図11Bにスカラユニット14の構成を例示する。スカラユニット14は、即値(Immediate)オペランドで得られるデータとスカラ・レジスタScalar Reg1からのデータの一方を選択するセレクタ142と、セレクタ142の選択結果とスカラ・レジスタScalar Reg0のデータを演算するスカラ用の演算器141を有する。スカラ用の演算器141の演算
結果は、メモリインターフェース(Memory I/F)を介してデータ用メモリ22のアドレス(例えば、Addr)にストアされる。また、スカラ用の演算器141の演算結果は、セレクタ101を介して、統計情報取得部102およびデータ変換部103に入力される。
 セレクタ101は、スカラ用の演算器141の演算結果、スカラ・レジスタScalar Reg2のデータ、スカラ演算用アキュムレータレジスタ(ACC)のデータ、およびメモリインターフェース(Memory I/F)を介して読み出されたデータ(Read Data)の1つを選択する。セレクタ101は、選択したデータを、統計情報取得部102およびデータ変換部103に入力する。統計情報取得部102は、セレクタ101から入力されたデータから統計情報を取得し、統計情報集約部104に入力する。
 以下、統計情報取得部102のうち、非符号となる最上位ビット位置を取得するものを統計情報取得部102Aと呼ぶことにする。また、統計情報取得部102のうち、非符号となる最下位ビット位置を取得するものを統計情報取得部102Bと呼ぶことにする。また、統計情報集約部104のうち、統計情報取得部102によって取得されてビット位置を計数してビット位置に対するビットの分布を取得するものを統計情報集約部104Aと呼ぶことにする。また、統計情報集約部104のうち、ビット位置の最大値と最小値を取得するための前段階として統計情報取得部102によって取得されてビット位置を論理和演算するものを統計情報集約部104Bと呼ぶことにする。
 図13Aに、非符号となる最上位ビット位置を取得する統計情報取得部102Aの処理を例示する。図では、統計情報取得部102Aに含まれる非符号最上位ビット検出器による処理が例示されている。非符号最上位ビット検出器は、例えば、図13Bの真理値表で定義される論理回路である。図13Aの例では、符号ビットが0、「非符号となる最上位ビット位置」として示される位置のビットが1、このビットより上位側のビットがすべて0、かつ、このビットより下位側のビットはbの入力データ(in(40bit))が例示されて
いる。ここで、bは0または1のいずれかである。統計情報取得部102Aは、この入力データを処理し、非符号となる最上位ビット位置を1とし、他のビット位置を0とする出力データ(out(40bit))を生成する。入力データが全ビット0、または、全ビット1の場合は、39bit目に1を、38bit以下に0を出力する。なお、以下の説明では、プロセッサ10の演算回路のデータは40ビットのデータで例示されるが、プロセッサ10の演算回路のデータが40ビットに限定される訳ではない。
 図13Bに非符号最上位ビット検出器の真理値表を例示する。図13Bのように、非符号最上位ビット検出器は、正数に対しては、ビットin[38]から下位ビット方向にビットをサーチして、最初に1になったビット位置の番号を2進数のビットパターンで出力する。また、非符号最上位ビット検出器は、負数に対しては、in[38]から下位ビット方向にビットをサーチして、最初に0になったビット位置の番号を2進数のビットパターンで出力する。また、入力データが全ビット0、または、全ビット1の場合は、非符号最上位ビット検出器は、39bit目に1を、38bit以下に0を出力する。
 図14に、非符号となる最上位ビット位置を取得する統計情報取得部102Aのハードウェア回路の構成を例示する。この回路では、符号ビットin[39]と他のビット(in[38]からin[0])との排他論理和(EXOR)が実行される。そうすると、符号ビットin[39]と同じ
値を有するビットによる排他論理和値は0となり、符号ビットin[39]と異なる値を有するビットによる排他論理和値は1となる。
 今、仮にin[38]がin[39]と異なる値であった場合、排他論理和によって出力データのout[38]は1となる。一方、出力データのout[37]には、in[39]とin[37]の排他論理和値がANDゲートを介して入力される。このANDゲートの一方の入力には、in[39]とin[38]の排他論理和値を反転したビット値が入力されるため、in[39]とin[38]とが不一致の場合、in[39]とin[37]の排他論理和値によらず、ANDゲートの出力は0となる。
 同様に、出力データのout[36]には、in[39]とin[36]の排他論理和値が上記と同様のANDゲートを介して入力される。このANDゲートの一方の入力には、in[39]とin[38]の排他論理和値と、in[39]とin[37]との排他論理和値という2つの排他論理和値の論理和値(ORゲートの出力)を反転したビット値が入力される。このため、in[39]とin[38]とが不一致の場合、in[39]とin[36]の排他論理和値によらず、ANDゲートの出力は0となる。以下、同様に、in[39]とin[i](iは37以下)の排他論理和値によらず、ANDゲートの出力は0となる。
 一方、仮にin[38]がin[39]と同じ値であった場合、in[39]とin[38]の排他論理和値は0となり、出力データのout[38]は0となる。このため、in[39]とin[37]の排他論理和値が入力されるANDゲートは、in[39]とin[37]の排他論理和値に依存して、1または0を出力す
る。以下、同様に、out[i](iは37以下)が出力されるANDゲートの論理否定付き入力は、in[39]とin[j](jはi+1以上、38以下)の排他的論理和が全て0の場合に0となり、in[39]とin[i](iは37以下)の排他論理和値が1になると、out[i]には1が設定される。そのビット
位置(i)より下位のビットでは、out[i]が出力されるANDゲートの論理否定付き入力が1
となるため、out[i]には0が設定される。したがって、図14の回路によって、非符号となる最上位ビット位置に1が設定され、他のビットが0に設定された出力データout(40bit)が取得される。図13、図14の非符号となる最上位ビット位置を取得する統計情報取得部102Aは、命令実行後の固定小数点数データ中の符号ビットと一致しない最上位のビットの位置を取得する回路の一例である。また、非符号となる最上位ビット位置に1が設定され、他のビットが0に設定された出力データout(40bit)は、符号ビットと一致しない最上位のビットの位置を真値(1)で示すビット列の一例である。
 図15Aに、非符号となる最下位ビット位置を取得する統計情報取得部102Bの処理を例示する。図では、統計情報取得部102Bに含まれる非符号最下位ビット検出器による処理が例示されている。非符号最下位ビット検出器は、例えば、図15Bの真理値表で定義される論理回路である。図15Aの例でも、正数での処理が例示される。この例では、符号ビットin[39]=0、「非符号となる最下位ビット位置」として示される位置のビットが1、このビットよりより下位側のビットがすべて0、このビットより上位側のビット(符号ビットを除く)はbの入力データが例示されている。ここで、bは0または1のいずれかであり、入力データは、in(40bit)である。統計情報取得部102Bは、この入力データを処理し非符号となる最下位ビット位置を1とし、他のビット位置を0とする出力データ(out(40bit))を生成する。入力データが全ビット0、または、全ビット1の場合は、39bit目に1を、38bit以下に0を出力する。
 図15Bに非符号最下位ビット検出器の真理値表を例示する。図15Bのように、非符号最下位ビット検出器は、正数に対しては、in[0]から上位ビット方向にビットをサーチ
して、最初に1になったビット位置の番号を2進数のビットパターンで出力する。また、非符号最下位ビット検出器は、負数に対しては、in[0]から上位ビット方向にビットをサ
ーチして、最初に0になったビット位置の番号を2進数のビットパターンで出力する。また、また、入力データが全ビット0、または、全ビット1の場合は、非符号最下位ビット検出器は、39bit目に1を、38bit以下に0を出力する。
 図16に、非符号となる最下位ビット位置を取得する統計情報取得部102Bのハードウェア回路の構成を例示する。符号ビットin[39]が0の場合には、統計情報取得部102Bは、最下位ビットin[0]から上位側に向かって、ビットが1であるビット位置を探索す
ればよい。一方、符号ビットin[39]が1の場合には、データは補数となっているので、統
計情報取得部102Bは、最下位ビットin[0]から上位側に向かって、ビットが0である
ビット位置を探索すればよい。
 すなわち、この回路では、符号ビットin[39]と他のビット(in[0]からin[38])との排
他論理和(EXOR)が実行される。そうすると、符号ビットin[39]と同じ値を有するビットによる排他論理和値は0となり、符号ビットin[39]と異なる値を有するビットによる排他論理和値は1となる。
 今、仮にin[0]がin[39]と異なる値であった場合、排他論理和によって出力データのout[0]は1となる。一方、出力データのout[1]には、in[39]とin[1]の排他論理和値がANDゲ
ートを介して入力される。このANDゲートの一方の入力には、in[39]とin[0]の排他論理和
値を反転したビット値が入力される。このため、in[39]とin[0]の排他論理和値が1の場
合、in[39]とin[1]の排他論理和値によらず、ANDゲートの出力は0となる。
 同様に、出力データのout[2]には、in[39]とin[2]の排他論理和値が上記と同様のANDゲートを介して入力される。このANDゲートの一方の入力には、in[39]とin[0]の排他論理和値と、in[39]とin[1]の排他論理和値という2つの排他論理和値の論理和値(ORゲートの出力)を反転したビット値が入力される。このため、in[39]とin[0]の排他論理和値が1の場合、in[39]とin[2]の排他論理和値によらず、出力データのout[2]に値を出力するANDゲートの出力は0となる。以下、同様に、in[39]とin[i](iは1以上)の排他論理和値によらず、出力データのout[i]に値を出力するANDゲートの出力は0となる。
 一方、仮にin[0]がin[39]と同じ値であった場合、排他論理和によって出力データのout[0]は0となるため、in[39]とin[1]の排他論理和値が入力されるANDゲートは、in[39]とin[1]の排他論理和値に依存して、1または0を出力する。以下、同様に、out[i](iは1以上)が出力されるANDゲートの論理否定付き入力は、in[39]とin[j](jは0以上、i-1以下)の排他的論理和が全て0の場合に0となり、in[39]とin[i](iは1以上)の排他論理和値が1になると、out[i]には1が設定される。また、そのビットより上位の出力データout[i]には0が設定される。したがって、図16の回路によって、非符号となる最下位ビット位置に1が設定され、他のビットが0の出力データout(40bit)が取得される。図15、図16の非符号となる最下位ビット位置を取得する統計情報取得部102Bは、符号ビットと一致しない最下位のビットの位置を取得する回路の一例である。また、非符号となる最下位ビット位置に1が設定され、他のビットが0に設定された出力データout(40bit)は、符号ビットと一致しない最下位のビットの位置を真値(1)で示すビット列の一例である。
 図17は、統計情報取得部102が取得したデータからビットの分布を取得する統計情報集約部104Aの処理を例示する図である。図では、40ビットのデータが8個並列に処理されるSIMDデータからビットの分布を取得する処理が例示される。図17では、ハードウェア回路である統計情報集約部104Aの処理が、擬似コードで記述されている。
 すなわち、入力データは、8(行)×40(ビット)の配列データで例示されている。また、各行の40ビットの入力データは、非符号となる最上位ビット位置(図14の統計情報取得部102Aの出力)または非符号となる最下位ビット位置(図16の統計情報取得部102Bの出力)である。この処理では、40ビットの出力データoutについて、まず、全ビットがクリアされる。次に、入力データの配列in[j][i]の各列iの要素の値が、すべての行(j=0から7)に対して加算される。したがって、図13、図15とは異なり、図17の擬似コードでは、出力データ(配列要素)out[j]は、log2(SIMDデータ数)ビット(図17の例では3ビット)の整数である。なお、図17では、SIMDデータ数(並列処理されるデータ数)は8であると想定したが、SIMDデータ数が8に限定される訳ではない。
 図18に、統計情報取得部102が取得したデータからビットの分布を取得する統計情報集約部104Aのハードウェア回路の構成を例示する。統計情報取得部102が取得したデータ(ここでは、統計取得0から統計取得(SIMDデータ数-1))がbit population count演算によって、8個の統計情報のiビット目(i=0から39)における1の個数がそれぞれカウントされる。入力データは、統計情報取得部102A(図13、図14)によって取得された非符号となる最上位ビット位置である。したがって、統計情報集約部104Aは、統計情報取得部102Aによって取得された非符号となるSIMDデータ個数分の最上位ビット位置に対して、各ビットの’1’の発生回数をカウントすることで最上位ビット
位置の発生回数を計数する。統計情報集約部104Aは、計数結果を出力データout0から
out39にそれぞれ格納する。
 また、入力データは、統計情報取得部102B(図15、図16)による非符号となる最下位ビット位置とすることもできる。統計情報集約部104Aは、統計情報取得部102Bによって取得されたSIMDデータ個数分の非符号となる最下位ビット位置に対して、各ビットの’1’の発生回数をカウントすることで最下位ビット位置の発生回数を計数する
。統計情報集約部104Aは、計数結果を出力データout0からout39にそれぞれ格納する
。すなわち、統計情報集約部104Aは、非符号となる最上位ビット位置または非符号となる最下位ビット位置のいずれをも処理可能である。
 また、図18でセレクタ(SEL)は、bit population count演算器(Σ)と、スカラユニット14から取得されるデータを選択する。セレクタ(SEL)に選択されたデータが、出力データout0からout39に出力される。したがって、統計情報取得部102がスカ
ラユニット14で取得したデータは、一回のスカラユニット14の演算においては、加算されることなくそのまま出力データout0からout39に出力される。out0からout39は、統計情報格納部105に引き渡すデータ(図21の105A、図22の105Bの入力データin0からin39参照)である。図17、図18の統計情報集約部104Aは符号ビットと一
致しない最上位のビットの位置を複数の固定小数点数データに対して累積して計数する回路の一例である。図17、図18の統計情報集約部104Aは符号ビットと一致しない最下位のビットの位置を複数の固定小数点数データに対して累積して計数する回路の一例でもある。
 図19は、統計情報取得部102が取得したデータからビット位置の最大値と最小値を取得する前提として、論理和演算によってビット位置を集約する統計情報集約部104Bの処理を例示する図である。図19においても、図17と同様、40ビットのデータが8個並列に処理されるSIMDデータを処理が例示される。図19では、ハードウェア回路である統計情報集約部104Bの処理が、擬似コードで記述されている。
 この処理では、40ビットの出力データout[i](i=0,…,39)には、入力データの配列in[j][i]の各列をすべての行(j=0,…,7)について論理和演算(OR演算)した結果が入力される。したがって、図19の擬似コードでは、図17とは異なり、出力データ(配列要素)out[i](i=0,…,39)はビット列である。以上の処理の結果、出力データout[i](i=0,…,39)では、out[38]から下位ビット方向に向かって最初に1となるビット位置が最大ビット位置である。また、out[0]から上位ビット方向に向かって最初に1となるビット位置が最小ビット位置である。
 図20に、統計情報取得部102が取得したデータからビット位置の最大値と最小値を取得する前提として、論理和演算によってビット位置を集約する統計情報集約部104Bのハードウェア回路の構成を例示する。統計情報取得部102が取得したデータ(ここでは、統計取得0から統計取得SIMDデータ数-1)がORゲート(40ビット)によってOR演算される。また、図18でセレクタ(SEL)は、論理和演算(OR)と、スカラユニット14から取得されるデータを選択する。セレクタ(SEL)されたデータが、出力データoutに出力される。したがって、統計情報取得部102がスカラユニット14で
取得したデータは、一回の演算においては、論理和演算されることなくそのまま出力データoutに出力される。outは、統計情報格納部105に引き渡すデータである。
 論理和演算によってビット位置を集約する統計情報集約部104Bは、符号ビットと一致しない最上位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積する回路の一例である。論理和演算によってビット位置を集約する統計情報集約部104Bは、符号ビットと一致しない最下位のビットの位置を真値で
示すビット列を複数の固定小数点数データについて論理和演算によって累積する回路の一例でもある。
 図21に、統計情報格納部105(図10参照)の具体例として、統計情報集約部104Aからの統計情報を専用レジスタに格納する統計情報格納部105Aの構成を例示する。図で、in39からin0は、図18のout39からout0に相当する統計情報集約部104からの統計情報を示す。また、sr39からsr0は、統計情報を格納するレジスタ値である。プロセッサ10は、書き込み命令によってセレクタSELを介して、レジスタsr39からsr0のいずれか1つあるいは複数に初期値v39からv0を書き込む。ただし、プロセッサ10は、デコーダからのリセット信号によってレジスタsr39からsr0をリセットしても良い。プロセッサ10は、統計情報取得機能付き命令の実行ごとに、加算器を用いて統計情報を蓄積し、レジスタsr39からsr0に格納する。統計情報集約部104A(図17、図18)と、統計情報集約部104Aからの統計情報を専用レジスタに格納する統計情報格納部105A(図21)の組み合わせは符号ビットと一致しない最上位のビットの位置を複数の固定小数点数データに対して累積して計数する回路の一例である。統計情報集約部104A(図17、図18)と、統計情報集約部104Aからの統計情報を専用レジスタに格納する統計情報格納部105A(図21)の組み合わせは符号ビットと一致しない最下位のビットの位置を複数の固定小数点数データに対して累積して計数する回路の一例でもある。また、プロセッサ10は、レジスタ(sr39からsr0)のいずれかの1つあるいは複数の値を読み出し、読み出し命令で指定されたデータ用メモリに保存する、あるいは、読み出し命令で指定された汎用レジスタに格納する。
 図22は、統計情報集約部104の変形例であり、統計情報の格納先がデコーダ112からのインデックスで指定される回路の構成例である。図では、例えば、sr[j][i](j=0,
…,k, i=0,…,39)の領域が確保され、indexによって、レジスタファイルの行jが指定される。
 プロセッサ10は、書き込み命令によってセレクタSELを介して、indexによって指定されるレジスタファイルの行jの1つあるいは複数のレジスタに初期値を書き込む。ただし、プロセッサ10はデコーダ112からの制御信号により、indexによって指定されるレジ
スタファイルの行jをリセットしても良い。そして、プロセッサ10は、in39からin0の統計情報を加算器で蓄積し、indexによって指定されるレジスタファイルの行jに格納する。また、プロセッサ10は、デコーダ112からの制御信号により、indexによって指定さ
れるレジスタファイルの行jから統計情報を読み出す。また、プロセッサ10は、indexによって指定されるレジスタファイルの行jのいずれかの1つあるいは複数の値を読み出し、読み出し命令で指定されたデータ用メモリに保存する、あるいは、読み出し命令で指定された汎用レジスタに格納する。
 図23は、図19、図20で例示した統計情報集約部104Bによって論理和演算されたビット位置の統計情報を蓄積するとともに蓄積された統計情報のビット位置の最大値を読み出す統計情報格納部105Cのハードウェア回路の構成を例示する図である。統計情報格納部105Cは、統計情報集約部104Bによって論理和演算されたビット位置の統計情報を蓄積するレジスタ(sr)を有している。プロセッサ10は、書き込み命令(write)によってセレクタ(SEL)を介してレジスタ(sr)に初期値を書き込み可能である
。ただし、プロセッサ10は、リセット信号によってレジスタ(sr)をリセットできるようにしてもよい。
 また、統計情報格納部105Cは、統計情報集約部104Bの論理和演算結果(in)と、すでにレジスタ(sr)に蓄積された統計情報の論理和演算を実行し、セレクタ(SEL)を介してレジスタ(sr)に論理和演算の結果を蓄積する。
 また、プロセッサ10は、読み出し命令によってセレクタ(SEL)を介してレジスタ(sr)の値を読み出し、読み出し命令で指定されたデータ用メモリあるいは読み出し命令で指定された汎用レジスタに保存する。また、統計情報格納部105Cは、Priority Encoder(MSB優先)を有してもよい。Priority Encoder(MSB優先)は、レジスタ(sr)に蓄積されたビット列中の最上位のビット1の位置(-1から38)を2進数で出力する。例えば、入力データinとして全ビット0が入力されると、Priority Encoder(MSB優先)は、”111111”(-1)を出力する。また、入力データinとしてin0=1、他のビットがすべて0のデータが入力されると、Priority Encoder(MSB優先)は、”000000”(0)を出力する。また、入力データinとしてin0=x(0または1)、in1=1、他のビットがすべて0のデータが入力されると、Priority Encoder(MSB優先)は、”000001”(1)を出力する。同様に、入力データinとしてin0~in37がx(0または1)、in38=1のデータが入力されると、Priority Encoder(MSB優先)は、”100110”(38)を出力する。プロセッサ10は、Priority Encoder(MSB優先)を介して、統計情報集約部104Bによって論理和演算されたビット位置の統計情報からビット位置の最大値を2進数値で取得できる。図19、図20の論理和演算によってビット位置を集約する統計情報集約部104B(図19、図20)と統計情報格納部105Cの組み合わせは、符号ビットと一致しない最上位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積し、累積したビット列中の最上位の真値の位置を取得する回路の一例である。
 図24は、図19、図20で例示した統計情報集約部104Bによって論理和演算されたビット位置の統計情報を蓄積するとともに蓄積された統計情報のビット位置の最小値を読み出す統計情報格納部105Dのハードウェア回路の構成を例示する図である。統計情報格納部105Dは、統計情報格納部105CのPriority Encoder(MSB優先)に代えてPriority Encoder(LSB優先)を有している。Priority Encoder(LSB優先)以外の統計情報格納
部105Dの構成は、統計情報格納部105Cと同様であるから説明を省略する。
 Priority Encoder(MSB優先)は、レジスタ(sr)に蓄積されたビット列中の最下位のビ
ット1の位置(-1から38)を2進数で出力する。例えば、入力データinとして全ビット0が入力されると、Priority Encoder(LSB優先)は、”111111”(-1)を出力する。
また、入力データinとしてin0=1、他のビットがx(0または1)のデータが入力されると、Priority Encoder(LSB優先)は、”000000”(0)を出力する。また、入力データinとし
てin0=0、in1=1、他のビット(in2からin38)がx(0または1)のデータが入力されると、Priority Encoder(LSB優先)は、”000001”(1)を出力する。同様に、入力データinと
してin0~in37が0、in38=1のデータが入力されると、Priority Encoder(LSB優先)は、”100110”(38)を出力する。プロセッサ10は、Priority Encoder(LSB優先)を介して、統計情報集約部104Bによって論理和演算されたビット位置の統計情報からビット位置の最小値を2進数値で取得できる。論理和演算によってビット位置を集約する統計情報集約部104B(図19、図20)と統計情報格納部105D(図24)の組み合わせは、符号ビットと一致しない最下位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積し、累積したビット列中の最下位の真値の位置を取得する回路の一例である。
 図25は、図23の統計情報格納部105Cのレジスタ(sr)をレジスタファイルとした変形例の統計情報格納部105Eの構成を例示する図である。また、図26は、図24の統計情報格納部105Dのレジスタ(sr)をレジスタファイルとする変形例の統計情報格納部105Fの構成を例示する図である。図25、図26では、例えば、sr0,sr1,…,srj,…の領域が確保され、indexによって、レジスタファイルの行jが指定される。プロセ
ッサ10は、デコーダ112からの制御信号により、あるいは、indexによって指定され
るレジスタファイルの行jへの初期値の設定、統計情報(入力データin)の蓄積、行jから
の統計情報の読み出し等を実行する。
 <統計情報取得機能付き命令>
 以下、統計情報取得機能付き命令の構成を例示する。ここでは、命令の構成方法として、方法1、方法2を例示する。
 (方法1)方法1では、プロセッサ10の命令セットに、統計情報を取得する演算命令
、ロード命令などが個別に追加される。以下の命令の構成は例示であり、プロセッサ10が下記命令に限定される訳ではない。
 [vmul_s命令]
命令の構成:vmul_s vs, vt, vd, imm
vmul_s命令は、プロセッサ10がベクトル・レジスタ vs と vt を乗算し imm ビットシフトし、丸め・飽和を行なって ベクトル・レジスタvd に格納するための命令である。プロセッサ10は、乗算結果のシフト前の統計情報を取得し、統計情報レジスタに累積する。統計情報レジスタは、例えば、図21のsr0からsr39、図22の統計情報レジスタファイルのsrj_i(j=0,1,.., i=0,1,…)、図23、図24のレジスタ(sr)、図25、図26の統計情報レジスタファイルのレジスタsr0,sr1,…等である。統計情報レジスタについては以下同様である。
 なお、プロセッサ10が内部のレジスタとデータ用メモリ22との間で統計情報を授受するためのread / write, load / store 命令も別途用意する。また、プロセッサ10が
内部のレジスタをリセットするためのリセット命令を別途用意してもよい。以下、同様である。
 [vld_s命令]
命令の構成:vld_s ss, rt, rd
vld_s命令は、プロセッサ10がアドレス・レジスタ rs とrt を加算したアドレスからベクトルデータをロードして、ベクトル・レジスタ rd に格納するための命令である。プロセッサ10は、ロードしたデータの統計情報を取得し統計情報レジスタに累積する。
 [read_acc_s命令]
命令の構成:read_acc_s, rd, imm
read_acc_s命令は、プロセッサ10がアキュムレータ・レジスタ(40bit)のデータに対し
て、imm ビットシフトし、丸め・飽和を行なってスカラ・レジスタ rd に格納するための命令である。プロセッサ10は、アキュムレータレジスタの統計情報を取得し統計情報レジスタに累積する。
 (方法1の変形)上記方法1に加え、命令のオペランドに、統計情報を格納するレジス
タ・インデックス(s)を追加し、統計情報の格納先が指定できるようにしてもよい。以
下、命令の構成を例示する。この命令のインデックス(s)は、図22、図25,図26
等の統計情報レジスタファイルのindexを指定する。
vmul_s vs, vt, vd, imm, s
vld_s ss, st, vd, s
read_acc sd, imm, s
 (方法2)図27に方法2による命令フォーマットを例示する。命令フォーマットを拡張し、統計情報を取得するか否かを指定するビットを追加するようにしてもよい。例えば、全命令について統計情報取得機能を追加してもよい。図25に、拡張された命令フォーマットを例示する。図のように、FLG=1は、統計情報の取得を指定する。一方、FLG=0は、統計情報の取得を指定せず、従来と同じ命令を示す。
 (方法2の変形)図28に方法2の変形による命令フォーマットを例示する。命令フォーマットを拡張し、統計情報を格納するレジスタ・インデックスを指定するようにしてもよい。図でIDXは、レジスタ・インデックス(図22、図25,図26等のindex)を示す。ただし、IDX=000 の場合には、プロセッサ10は統計情報を取得しない。図28の命令フォーマットをデコードし、レジスタ・インデックスIDXを取得する図9のデコーダ112は、統計情報の格納先の指定を取得するデコーダの一例である。
 情報処理装置1が以上のような統計情報取得機能付き命令を実行するため、統計情報取得機能付き命令を専用サブルーチンで実行するようにすればよい。コンパイラは、専用サブルーチンをコンパイルするときに、統計情報取得機能付き命令を実行形式に組み込めばよい。また、専用サブルーチンは、アセンブリ言語で作成され、統計上取得機能付き命令の実行が指定されるようにしてもよい。情報処理装置1が深層学習を実行するためのコンピュータプログラムにおいて、以上のような専用サブルーチンが呼び出されるようにすればよい。
<実行手順>
 図29に、本実施形態の情報処理装置1が深層学習を実行する場合の各層の処理の詳細を例示する。図29の処理を実行する情報処理装置1は1以上の層での演算により深層学習を実行する情報処理装置の一例である。図では、1層目の畳み込み層(Conv_1)、プーリング層(Pool_1)、および全結合層2(fc2)が例示されている。この例でも、比較例の図6
と同様、1層目の畳み込み層(Conv_1)において、入力データini=(x0,...,xn)と、重み(Wij)との間で、畳み込み演算が実行され、z0,...,zj,...等が計算される。また、z0,...,zj,...等に対して、活性化関数が演算され、u0,...,uj,...等が計算される。情報処理装置1は、この1層目の畳み込み層(Conv_1)での変数z0,...,zj,...等での統計
情報を内部の統計情報レジスタまたはレジスタ・インデックスで指定される統計情報レジスタファイルに蓄積する。なお、統計情報レジスタあるいはレジスタファイルが不足する場合は、各層の演算終了後に統計情報をメモリに退避し、次回の演算開始前に統計情報を復帰させる。また、情報処理装置1は、同様に、この1層目の畳み込み層(Conv_1)での変数u0,...,uj,...等での統計情報を内部のレジスタまたはレジスタ・インデックスで指定
される統計情報レジスタファイルに蓄積する。本実施形態の統計情報は、比較例のようなオーバーフロー回数とは異なり、上記で説明した(1)非符号となる最上位ビット位置の分布、(2)非符号となる最下位ビット位置の分布、(3)非符号となる最上位ビット位置の最大値、(4)非符号となる最下位ビット位置の最小値、または、これらのいずれか2以上の組み合わせである。
 1層目の畳み込み層(Conv_1)での演算結果は、1層目のプーリング層(Pool_1)から、さらに上位層へ伝播される。このとき、情報処理装置1は、2層目以上の層でも同様の演算と、統計情報の蓄積を実行する。そして、情報処理装置1は、全結合層2(fc2)において、得られた演算結果と、正解データTiとの差分値からエラーの変数δ0(7),...,δj(7),...を算出する。そして、情報処理装置1は、エラーの変数δ0(7),...,δj(7),...を基に、逆方向の伝播処理を実行する。すなわち、情報処理装置1は、下位の階層(例えば、結合層1(fc1))の出力でのエラーの変数δ0(6),...,δj(6),...δn(6)と重みの変数Wijの次の重みへの差分値ΔWijを算出する。このとき、情報処理装置1は、エラー変数δ0(7),...,δj(7),...およびエラーの変数δ0(6),...,δj(6),...,δn(6)での統計情報を1層目の畳み込み層(Conv_1)と同様に蓄積する。また、情報処理装置1は、差分値ΔWijでの統計情報も蓄積する。また、情報処理装置1は、重みの変数Wijでの統計情報を蓄積する。
 そして、情報処理装置1は、全結合層1(fc1)から1層目の畳み込み層(Conv_1)まで、
エラーを逆方法に伝播させながら、重みの差分を計算する。情報処理装置1は、以上のような順伝播と逆伝播をk組の入力データを用いて、k回繰り返す。情報処理装置1は、このようなk回のミニバッチ終了後、各変数の統計情報を基に、各変数の固定小数点位置を更新する。
 図30に、本実施形態の情報処理装置1による学習処理のフローチャートを例示する。この処理では、情報処理装置1は、初期小数点位置を決定する(WE1)。情報処理装置1は、過去の実験値、実績値、あるいは、ユーザ指定により各変数の初期小数点位置を決定すればよい。
 そして、情報処理装置1は、回数kを0に初期化する。また、情報処理装置1は、プログラム内の統計情報を格納する変数を初期化する(WE2)。そして、情報処理装置1は学習終了の条件が充足されたか否かを判定する(WE3)。学習が終了するのは、全結合層(fc2)でのエラーが基準値以下となるか、または、学習回数が規定の最大値に達した場合
である。
 学習終了の条件が充足されない場合、情報処理装置1は、次のミニバッチを実行する。このとき、情報処理装置1は、各レイヤの各変数の統計情報を統計情報レジスタあるいは統計情報レジスタファイルに累積する。統計情報を累積は、上記で説明したように、プロセッサ10のハードウェアで実行される。そして、情報処理装置1は、変数kをカウントアップする(WE4)。
 そして、情報処理装置1は、回数kが更新間隔に達したか否かを判定する(WE5)。回数kが更新間隔に達していない場合、情報処理装置1は、WE3の処理に戻る。一方、回数kが更新間隔に達した場合、情報処理装置1は、各種の統計情報が蓄積された統計情報を統計情報レジスタあるいは統計情報レジスタファイルあるいは統計情報をメモリに退避した領域から統計情報を読み出す。そして、情報処理装置1は、読み出された統計情報を基に各レイヤの各変数の小数点位置を更新する(WE6)。
 このとき、情報処理装置1は、例えば、飽和するデータとアンダーフローするデータの全体のデータ数に対する比率が目標条件を充足するように、小数点位置を決定すればよい。また、情報処理装置1は、飽和するデータの全体のデータに対する比率とアンダーフローするデータの全体のデータに対する比率の両方が目標条件を充足することが困難である場合、一方を優先してもよい。また、情報処理装置1は、飽和が発生しない上限のビット位置と、有効なデータが存在する下限のビット位置の平均を、固定小数点数で表現可能な範囲の中央を位置づけて、小数点位置を設定してもよい。さらに、情報処理装置1は、回数kを0に初期化し、さらに統計情報を格納するレジスタをリセットする。そして、情報処理装置1は、C3の処理に戻る。
 WE4で各レイヤの各変数の統計情報を累積することと、WE6で各種の統計情報が蓄積されたレジスタあるいはレジスタファイルから統計情報を読み出すことは、1以上の層の少なくとも1つの層において前記演算の命令を含む命令実行時の固定小数点数データ中のビットの分布についての統計情報を取得することの一例である。また、WE6で、読み出された統計情報を基に各レイヤの各変数の小数点位置を更新することは、ビットの分布についての統計情報に基づいて固定小数点数データの小数点位置を更新することの一例である。
 図31に、データが固定小数点数の範囲に収まらない場合の小数点位置更新例を示す。図は、例えば、非符号となる最上位ビット位置の分布である。今、固定小数点数がQ5.
10(整数部5桁、小数点以下10桁)で記述され、飽和される領域A1、表現可能な領域A2、および、アンダーフローが発生する領域A3が形成されているとする。この例では、飽和される領域A1とアンダーフローが発生する領域A3は、白抜きの度数分布で例示されている。また、表現可能な領域は斜線のハッチングパターンで示されている。また、この例では、アンダーフローが発生する領域の度数分布が飽和する領域の度数分布より高く、バランスが悪い。一方、小数点位置を2ビット下側に移動し、Q3.12(整数部3桁、小数点以下12桁)としても、飽和する領域のデータ数を全データ数で除算した値は、目標の基準値未満となる。そこで、情報処理装置1は、小数点位置をQ5.10からQ3.12設定しなおし、深層学習を継続すればよい。
 図32および図33に、データが固定小数点数の範囲に収まる場合の小数点位置更新例を示す。図32も図31と同様、例えば、非符号となる最上位ビット位置の分布である。また、図33は非符号となる最下位ビットの分布である。図32では、現在のビット精度(Q3.12フォーマット)で表現可能な範囲に当該変数のデータが収まっている。しかしながら、図33では-1ビット目まで有効な値があり、これらの値が丸められていることがわかる。そこで、情報処理装置1は、最上位ビット位置分布でデータ個数が1以上とな
る最大値の11ビット目と、最下位ビットの分布でデータ個数が1以上となる最小値の-1ビ
ット目までが、表現可能な範囲の中心となるよう、小数点位置をQ3.12からQ1.14設定しなおし、深層学習を継続すればよい。
 <実施形態の効果>
 情報処理装置1は、深層学習のミニバッチ実行時、各レイヤの各変数の統計情報をレジスタあるいはレジスタファイルに累積する。そして、情報処理装置1は、蓄積された統計情報を基に各レイヤの各変数の小数点位置を更新することができる。すなわち、プロセッサ10が、ビット分布の統計上情報を取得する。ここで、統計情報は、命令実行時の(1)非符号となる最上位ビット位置の分布、(2)非符号となる最下位ビット位置の分布、(3)非符号となる最上位ビット位置の最大値、(4)非符号となる最下位ビット位置の最小値、またはこれらの組み合わせ等である。したがって、情報処理装置1が深層学習実行時に、データの統計情報取得のための深層学習プログラム中のオーバーヘッドがなくなるため、実用的な時間で動的固定小数点演算を実現可能となる。
 すなわち、本実施形態では、情報処理装置1のプロセッサ10が統計情報取得機能付き命令を実行するとともに、演算結果をビットシフトし、丸め・飽和を行なってレジスタに格納する命令を実行する。したがって、情報処理装置1はビット分布を示す統計情報を取得するオーバーヘッドを少なくできる。また、ビット分布を示す統計情報から直ちに適正なビットシフト、すなわち、小数点位置を決定できる。つまり、情報処理装置1のように、小数点位置を1ビットずつずらして適正な小数点位置を試行し、次の演算で結果を確認するという手順ではなく、ビット分布を示す統計情報から、直ちに小数点位置を決定できる(図31、図32)。したがって、情報処理装置1は、比較例のような小数点位置が不適切な状態で学習処理が繰り返される恐れがすくない。また、情報処理装置1は、学習結果の精度劣化につながり、深層学習の収束が遅くなる恐れが少ない。
 また、情報処理装置1は、深層学習を固定小数点数で精度良く実行できるので、データ転送量や演算器の回路規模が削減できる。その結果として、情報処理装置1は、消費電力を削減できる。削減できる回路規模は以下のように試算できる。例として32bit浮動小数
点数演算を実行する回路を、16bit固定小数点数演算を実行する回路に限定した場合、デ
ータ量( メモリ、および、データ転送量)が半減される。また、演算回路規模としては
、 積和演算での回路規模は約半分となる(FPGAで試算)。
 また、プロセッサ10は、統計情報取得部102Aによって命令実行後の固定小数点数
データ中の符号ビットと一致しない最上位のビットの位置を取得できる。また、プロセッサ10は、統計情報集約部104Aによって符号ビットと一致しない最上位のビットの位置を複数の固定小数点数データに対して累積して計数することができる。また、プロセッサ10は、統計情報集約部104Bと、統計情報格納部105C(あるいは105E)によって、符号ビットと一致しない最上位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積する。そして、プロセッサ10は、累積したビット列中の最上位の真値の位置を取得することができる。
 また、プロセッサ10は、統計情報取得部102Bによって命令実行後の固定小数点数データ中の符号ビットと一致しない最下位のビットの位置を取得できる。また、プロセッサ10は、統計情報集約部104Aによって符号ビットと一致しない最下位のビットの位置を複数の固定小数点数データに対して累積して計数することができる。また、プロセッサ10は、統計情報集約部104Bと、統計情報格納部105D(あるいは105F)によって、符号ビットと一致しない最下位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積する。そして、プロセッサ10は、累積したビット列中の最下位の真値の位置を取得することができる。以上のような構成により、プロセッサ10は、上記統計情報を取得できる。
 <本実施形態の情報処理装置について>
 情報処理装置1は、プロセッサ10、命令用メモリ21、およびデータ用メモリ22を備える。情報処理装置1は、命令用メモリ21に実行可能に展開されたコンピュータプログラムにしたがって深層学習を実行する。プロセッサ10は、Central Processing Unit(CPU)、Microprocessor(MPU)とも呼ばれる。プロセッサ10は、は、単一のプロセッサに限定される訳ではなく、マルチプロセッサ構成であってもよい。また、単一のソケットで接続される単一のプロセッサ10がマルチコア構成を有していても良い。深層学習を実行する情報処理装置1の少なくとも一部の処理は、プロセッサ10以外の装置、例えば、Digital Signal Processor(DSP)、Graphics Processing Unit(GPU)、数値演算プロセッサ、ベクトルプロセッサ、画像処理プロセッサ等の専用プロセッサで行われても良い。また、深層学習を実行する情報処理装置1の少なくとも一部の処理は、集積回路(IC)、その他のディジタル回路であっても良い。また、深層学習を実行する情報処理装置1の少なくとも一部には、アナログ回路が含まれても良い。集積回路は、LSI,Application Specific Integrated Circuit(ASIC),プログラマブルロジックデバイス(PLD)を含む。PLDは、例えば、Field-Programmable Gate Array(FPGA)を含む。上記各部は、プロセッサと集積回路との組み合わせであっても良い。組み合わせは、例えば、マイクロコントローラ(MCU)、SoC(System-on-a-chip)、システムLSI、チップセットなどと呼ばれる。
 <記録媒体>
 コンピュータその他の機械、装置(以下、コンピュータ等)に上記いずれかの機能を実現させるプログラムをコンピュータ等が読み取り可能な記録媒体に記録することができる。そして、コンピュータ等に、この記録媒体のプログラムを読み込ませて実行させることにより、その機能を提供させることができる。
 ここで、コンピュータ等が読み取り可能な記録媒体とは、データやプログラム等の情報を電気的、磁気的、光学的、機械的、または化学的作用によって蓄積し、コンピュータ等から読み取ることができる記録媒体をいう。このような記録媒体のうちコンピュータ等から取り外し可能なものとしては、例えばフレキシブルディスク、光磁気ディスク、Compact Disc(CD)-Read Only Memory(ROM)、CD-Recordable(R)、Digital Versatile Disk(DVD)、ブルーレイディスク、Digital Audio Tape(DAT)、8mmテープ、フラッシュメモリなどのメモリカード等がある。また、コンピュータ等に固定された記録媒体としてハードディスク、ROM(リードオンリーメモリ)等がある。さらに、Solid State Drive(SSD)は、コンピュータ等から取り外し可能な記録媒体としても、コンピュータ等に固定された記録媒体としても利用可能である。
   1  情報処理装置
  10  プロセッサ
  11  制御ユニット
  12  レジスタファイル
  13  ベクトルユニット
  14  スカラユニット
  21  命令用メモリ
  22  データ用メモリ
 101  セレクタ
 102  統計情報取得部
 103  データ変換部
 104  統計情報集約部
 105  統計情報格納部
 111  プログラムカウンタ
 112  デコーダ
 131  ベクトル演算用の演算器
 132  積和演算用のアキュムレータ
 141  スカラ用の演算器

Claims (12)

  1.  固定小数点数データに対する命令実行後の前記固定小数点数データ中のビットの分布についての統計情報を取得する取得回路と、
     前記固定小数点数データの小数点位置を更新する更新回路と、を備える演算処理装置。
  2.  前記取得回路は、前記命令実行後の固定小数点数データ中の符号ビットと一致しない最上位のビットの位置を取得する回路を有する請求項1に記載の演算処理装置。
  3.  前記取得回路は、前記符号ビットと一致しない最上位のビットの位置を複数の固定小数点数データに対して累積して計数する回路を有する請求項2に記載の演算処理装置。
  4.  前記取得回路は、前記符号ビットと一致しない最上位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積し、累積したビット列中の最上位の真値の位置を取得する回路を有する請求項2または3に記載の演算処理装置。
  5.  前記取得回路は、前記符号ビットと一致しない最下位のビットの位置を取得する回路を有する請求項1から4のいずれか1項に記載の演算処理装置。
  6.  前記取得回路は、前記符号ビットと一致しない最下位のビットの位置を複数の固定小数点数データに対して累積して計数する回路を有する請求項5に記載の演算処理装置。
  7.  前記取得回路は、前記符号ビットと一致しない最下位のビットの位置を真値で示すビット列を複数の固定小数点数データについて論理和演算によって累積し、累積したビット列中の最下位の真値の位置を取得する回路を有する請求項5または6に記載の演算処理装置。
  8.  前記命令から、前記統計情報の格納先の指定を取得するデコーダをさらに備える請求項1から7のいずれか1項に記載の演算処理装置。
  9.  前記デコーダは、前記命令から、前記固定小数点数データの小数点位置の指定を取得する請求項8に記載の演算処理装置。
  10.  1以上の層での演算により深層学習を実行する情報処理装置であって、
     前記1以上の層の少なくとも1つの層において前記演算の命令を含む命令実行時の固定小数点数データ中のビットの分布についての統計情報を取得することと、
     前記ビットの分布についての統計情報に基づいて前記固定小数点数データの小数点位置を更新することと、を実行する演算処理装置を備える情報処理装置。
  11.  1以上の層での演算により深層学習を実行するコンピュータが
     前記1以上の層の少なくとも1つの層において前記演算の命令を含む命令実行時の固定小数点数データ中のビットの分布についての統計情報を取得することと、
     前記ビットの分布についての統計情報に基づいて前記固定小数点数データの小数点位置を更新することと、を実行する情報処理方法。
  12.  1以上の層での演算により深層学習をコンピュータに実行させるためのプログラムであって、
     前記1以上の層の少なくとも1つの層において前記演算の命令を含む命令実行時の固定小数点数データ中のビットの分布についての統計情報を取得することと、
     前記ビットの分布についての統計情報に基づいて前記固定小数点数データの小数点位置を更新することと、を実行させるためのプログラム。
PCT/JP2018/000988 2017-01-30 2018-01-16 演算処理装置、情報処理装置、方法、およびプログラム WO2018139266A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18744586.1A EP3575952B1 (en) 2017-01-30 2018-01-16 Arithmetic processing device, information processing device, method and program
US16/515,110 US11137981B2 (en) 2017-01-30 2019-07-18 Operation processing device, information processing device, and information processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-014780 2017-01-30
JP2017014780A JP6540725B2 (ja) 2017-01-30 2017-01-30 演算処理装置、方法、およびプログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/515,110 Continuation US11137981B2 (en) 2017-01-30 2019-07-18 Operation processing device, information processing device, and information processing method

Publications (1)

Publication Number Publication Date
WO2018139266A1 true WO2018139266A1 (ja) 2018-08-02

Family

ID=62979297

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/000988 WO2018139266A1 (ja) 2017-01-30 2018-01-16 演算処理装置、情報処理装置、方法、およびプログラム

Country Status (4)

Country Link
US (1) US11137981B2 (ja)
EP (1) EP3575952B1 (ja)
JP (1) JP6540725B2 (ja)
WO (1) WO2018139266A1 (ja)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3617954A1 (en) * 2018-08-22 2020-03-04 INTEL Corporation Iterative normalization for machine learning applications
WO2020065874A1 (ja) * 2018-09-27 2020-04-02 株式会社ソシオネクスト ネットワーク量子化方法、推論方法及びネットワーク量子化装置
CN111160550A (zh) * 2018-11-07 2020-05-15 富士通株式会社 训练方法、信息处理设备和非暂态计算机可读存储介质
EP3671432A1 (en) 2018-12-18 2020-06-24 Fujitsu Limited Arithmetic processing device and method of controlling arithmetic processing device
CN111612123A (zh) * 2019-02-26 2020-09-01 富士通株式会社 信息处理装置及其控制方法和计算机可读介质
EP3716043A1 (en) * 2019-03-29 2020-09-30 Fujitsu Limited Information processor, information processing method, and program
EP3748491A1 (en) * 2019-06-07 2020-12-09 Fujitsu Limited Arithmetic processing apparatus and control program
US11043962B2 (en) * 2018-02-26 2021-06-22 Fujitsu Limited Information processing apparatus, information processing method, and recording medium
EP4109352A1 (en) 2021-06-23 2022-12-28 Fujitsu Limited Computer-readable recording medium, information processing method, and information processing apparatus
US11811427B2 (en) 2019-09-13 2023-11-07 Fujitsu Limited Information processing apparatus, method of processing information, and non-transitory computer-readable storage medium for storing information processing program
WO2024004221A1 (ja) * 2022-07-01 2024-01-04 日本電信電話株式会社 演算処理装置、演算処理方法、及び演算処理プログラム

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3640863B1 (en) * 2018-02-13 2021-10-27 Shanghai Cambricon Information Technology Co., Ltd Computation device and method
JP6540841B1 (ja) * 2018-02-27 2019-07-10 富士通株式会社 演算処理装置、情報処理装置、情報処理方法、およびプログラム
KR20200043169A (ko) * 2018-10-17 2020-04-27 삼성전자주식회사 뉴럴 네트워크의 파라미터를 양자화하는 방법 및 장치
JP7036224B2 (ja) * 2018-10-24 2022-03-15 富士通株式会社 演算処理装置及び演算処理装置の制御方法
JP7137067B2 (ja) * 2018-10-25 2022-09-14 富士通株式会社 演算処理装置、学習プログラム及び学習方法
KR20200086581A (ko) 2019-01-09 2020-07-17 삼성전자주식회사 뉴럴 네트워크 양자화를 위한 방법 및 장치
JP2020135549A (ja) 2019-02-21 2020-08-31 富士通株式会社 演算処理装置、情報処理装置および演算処理方法
AU2019449126B2 (en) * 2019-06-07 2022-10-27 Nippon Telegraph And Telephone Corporation Secure conjugate gradient method computation system, secure computation apparatus, conjugate gradient method computation apparatus, secure conjugate gradient method computation method, conjugate gradient method computation method, and program
JP7243498B2 (ja) 2019-07-11 2023-03-22 富士通株式会社 演算処理装置、制御プログラム、及び制御方法
JP7354736B2 (ja) 2019-09-30 2023-10-03 富士通株式会社 情報処理装置、情報処理方法、情報処理プログラム
US20210150306A1 (en) * 2019-11-14 2021-05-20 Qualcomm Incorporated Phase selective convolution with dynamic weight selection
JP7371499B2 (ja) 2020-01-07 2023-10-31 富士通株式会社 演算処理装置、演算処理装置の制御方法及び演算処理プログラム
JP2021111081A (ja) 2020-01-09 2021-08-02 富士通株式会社 情報処理装置、ニューラルネットワークの演算プログラム及びニューラルネットワークの演算方法
GB2591106B (en) * 2020-01-15 2022-02-23 Graphcore Ltd Control of data transfer between processors
JP2021124849A (ja) 2020-02-04 2021-08-30 富士通株式会社 演算処理装置、演算処理装置の制御方法及び演算処理プログラム
JP7367595B2 (ja) 2020-04-07 2023-10-24 富士通株式会社 情報処理装置及び情報処理方法
JPWO2022003855A1 (ja) * 2020-07-01 2022-01-06
JP2022034897A (ja) 2020-08-19 2022-03-04 富士通株式会社 情報処理装置、機械学習方法及び機械学習プログラム
JP2022094508A (ja) 2020-12-15 2022-06-27 富士通株式会社 演算処理装置、演算処理方法および演算処理プログラム
EP4270252A1 (en) * 2020-12-28 2023-11-01 Nippon Telegraph And Telephone Corporation Data processing device, data processing method, and data processing program
JPWO2022249316A1 (ja) * 2021-05-26 2022-12-01

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006048590A (ja) * 2004-08-09 2006-02-16 Matsushita Electric Ind Co Ltd 正規化処理装置及び正規化処理方法
JP2006155102A (ja) * 2004-11-26 2006-06-15 Asahi Kasei Microsystems Kk 演算処理装置
JP2010112878A (ja) 2008-11-07 2010-05-20 Mitsui Eng & Shipbuild Co Ltd 非揮発性有機ハロゲン化合物の検出方法
JP2012203566A (ja) 2011-03-24 2012-10-22 Seiko Epson Corp 状態推定装置、電子機器及びプログラム
JP2016033754A (ja) 2014-07-31 2016-03-10 キヤノン株式会社 画像処理装置、画像処理方法及びプログラム
JP2016062404A (ja) * 2014-09-19 2016-04-25 サンケン電気株式会社 演算処理方法及び演算処理装置
JP2016539407A (ja) * 2013-10-29 2016-12-15 クゥアルコム・インコーポレイテッドQualcomm Incorporated 因果顕著性時間推論

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0784975A (ja) * 1993-09-10 1995-03-31 Hitachi Ltd 情報処理装置および学習演算処理方法
JP3252954B2 (ja) * 1997-04-01 2002-02-04 松下電器産業株式会社 乗算方法および乗算回路
US20170061279A1 (en) * 2015-01-14 2017-03-02 Intel Corporation Updating an artificial neural network using flexible fixed point representation
US10621486B2 (en) * 2016-08-12 2020-04-14 Beijing Deephi Intelligent Technology Co., Ltd. Method for optimizing an artificial neural network (ANN)
US20180107451A1 (en) * 2016-10-14 2018-04-19 International Business Machines Corporation Automatic scaling for fixed point implementation of deep neural networks
CN107688849B (zh) * 2017-07-28 2021-04-13 赛灵思电子科技(北京)有限公司 一种动态策略定点化训练方法及装置
KR20190044878A (ko) * 2017-10-23 2019-05-02 삼성전자주식회사 뉴럴 네트워크에서 파라미터를 처리하는 방법 및 장치
KR20200043169A (ko) * 2018-10-17 2020-04-27 삼성전자주식회사 뉴럴 네트워크의 파라미터를 양자화하는 방법 및 장치

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006048590A (ja) * 2004-08-09 2006-02-16 Matsushita Electric Ind Co Ltd 正規化処理装置及び正規化処理方法
JP2006155102A (ja) * 2004-11-26 2006-06-15 Asahi Kasei Microsystems Kk 演算処理装置
JP2010112878A (ja) 2008-11-07 2010-05-20 Mitsui Eng & Shipbuild Co Ltd 非揮発性有機ハロゲン化合物の検出方法
JP2012203566A (ja) 2011-03-24 2012-10-22 Seiko Epson Corp 状態推定装置、電子機器及びプログラム
JP2016539407A (ja) * 2013-10-29 2016-12-15 クゥアルコム・インコーポレイテッドQualcomm Incorporated 因果顕著性時間推論
JP2016033754A (ja) 2014-07-31 2016-03-10 キヤノン株式会社 画像処理装置、画像処理方法及びプログラム
JP2016062404A (ja) * 2014-09-19 2016-04-25 サンケン電気株式会社 演算処理方法及び演算処理装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
COURBARIAUX ET AL.: "TRAINING DEEP NEURAL NETWORKS WITH LOW PRECISION MULTIPLICATIONS", ACCEPTED AS A WORKSHOP CONTRIBUTION AT ICLR 2015, INTERNATIONAL CONFERENCE ON LEARNING REPRESENTATIONS(ICLR, 23 September 2015 (2015-09-23)
See also references of EP3575952A4

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11043962B2 (en) * 2018-02-26 2021-06-22 Fujitsu Limited Information processing apparatus, information processing method, and recording medium
EP3617954A1 (en) * 2018-08-22 2020-03-04 INTEL Corporation Iterative normalization for machine learning applications
US11636319B2 (en) 2018-08-22 2023-04-25 Intel Corporation Iterative normalization for machine learning applications
WO2020065874A1 (ja) * 2018-09-27 2020-04-02 株式会社ソシオネクスト ネットワーク量子化方法、推論方法及びネットワーク量子化装置
JP7180680B2 (ja) 2018-09-27 2022-11-30 株式会社ソシオネクスト ネットワーク量子化方法、推論方法及びネットワーク量子化装置
JPWO2020065874A1 (ja) * 2018-09-27 2021-08-30 株式会社ソシオネクスト ネットワーク量子化方法、推論方法及びネットワーク量子化装置
CN111160550A (zh) * 2018-11-07 2020-05-15 富士通株式会社 训练方法、信息处理设备和非暂态计算机可读存储介质
EP3671432A1 (en) 2018-12-18 2020-06-24 Fujitsu Limited Arithmetic processing device and method of controlling arithmetic processing device
CN111612123A (zh) * 2019-02-26 2020-09-01 富士通株式会社 信息处理装置及其控制方法和计算机可读介质
CN111753951A (zh) * 2019-03-29 2020-10-09 富士通株式会社 信息处理器、信息处理方法和存储介质
US11551087B2 (en) 2019-03-29 2023-01-10 Fujitsu Limited Information processor, information processing method, and storage medium
EP3716043A1 (en) * 2019-03-29 2020-09-30 Fujitsu Limited Information processor, information processing method, and program
EP3748491A1 (en) * 2019-06-07 2020-12-09 Fujitsu Limited Arithmetic processing apparatus and control program
US11514320B2 (en) 2019-06-07 2022-11-29 Fujitsu Limited Arithmetic processing apparatus, control method, and non-transitory computer-readable recording medium having stored therein control program
US11811427B2 (en) 2019-09-13 2023-11-07 Fujitsu Limited Information processing apparatus, method of processing information, and non-transitory computer-readable storage medium for storing information processing program
EP4109352A1 (en) 2021-06-23 2022-12-28 Fujitsu Limited Computer-readable recording medium, information processing method, and information processing apparatus
WO2024004221A1 (ja) * 2022-07-01 2024-01-04 日本電信電話株式会社 演算処理装置、演算処理方法、及び演算処理プログラム

Also Published As

Publication number Publication date
EP3575952B1 (en) 2021-05-26
US20190339939A1 (en) 2019-11-07
EP3575952A4 (en) 2020-01-08
EP3575952A1 (en) 2019-12-04
US11137981B2 (en) 2021-10-05
JP2018124681A (ja) 2018-08-09
JP6540725B2 (ja) 2019-07-10

Similar Documents

Publication Publication Date Title
WO2018139266A1 (ja) 演算処理装置、情報処理装置、方法、およびプログラム
JP7056225B2 (ja) 演算処理装置、情報処理装置、情報処理方法、およびプログラム
EP3474132B1 (en) Arithmetic processor, arithmetic processing apparatus including arithmetic processor, information processing apparatus including arithmetic processing apparatus, and control method for arithmetic processing apparatus
JP6540841B1 (ja) 演算処理装置、情報処理装置、情報処理方法、およびプログラム
CN107608715B (zh) 用于执行人工神经网络正向运算的装置及方法
US11222254B2 (en) Optimized neuron circuit, and architecture and method for executing neural networks
CN110413255B (zh) 人工神经网络调整方法和装置
JP2019139338A (ja) 情報処理装置、情報処理方法、およびプログラム
CN101452571A (zh) 积和熔加功能单元
JP2019057249A (ja) 演算処理装置および演算処理方法
JPH0863353A (ja) 掛け算累算命令を使用したデータ処理
EP3709225A1 (en) System and method for efficient utilization of multipliers in neural-network computations
US11551087B2 (en) Information processor, information processing method, and storage medium
JP2020135549A (ja) 演算処理装置、情報処理装置および演算処理方法
CN111445016B (zh) 加速非线性数学计算的系统及方法
EP3671432B1 (en) Arithmetic processing device and method of controlling arithmetic processing device
US20230161555A1 (en) System and method performing floating-point operations
JP7243498B2 (ja) 演算処理装置、制御プログラム、及び制御方法
JP2020067897A (ja) 演算処理装置、学習プログラム及び学習方法
US20240036822A1 (en) Enhanced Block Floating Point Number Multiplier
JP7371499B2 (ja) 演算処理装置、演算処理装置の制御方法及び演算処理プログラム
CN116795324A (zh) 混合精度浮点乘法装置和混合精度浮点数处理方法
JP2003243988A (ja) データ処理装置
JPH0637592A (ja) ディジタルフィルタ設計法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18744586

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018744586

Country of ref document: EP

Effective date: 20190830