Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7747585B2 - arithmetic device - Google Patents
[go: Go Back, main page]

JP7747585B2 - arithmetic device - Google Patents

arithmetic device

Info

Publication number
JP7747585B2
JP7747585B2 JP2022092138A JP2022092138A JP7747585B2 JP 7747585 B2 JP7747585 B2 JP 7747585B2 JP 2022092138 A JP2022092138 A JP 2022092138A JP 2022092138 A JP2022092138 A JP 2022092138A JP 7747585 B2 JP7747585 B2 JP 7747585B2
Authority
JP
Japan
Prior art keywords
weight
unit
bit weight
neural network
high bit
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2022092138A
Other languages
Japanese (ja)
Other versions
JP2023179078A (en
Inventor
文哉 向井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Toyota Motor Corp
Mirise Technologies Corp
Original Assignee
Denso Corp
Toyota Motor Corp
Mirise Technologies Corp
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 Denso Corp, Toyota Motor Corp, Mirise Technologies Corp filed Critical Denso Corp
Priority to JP2022092138A priority Critical patent/JP7747585B2/en
Publication of JP2023179078A publication Critical patent/JP2023179078A/en
Application granted granted Critical
Publication of JP7747585B2 publication Critical patent/JP7747585B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)

Description

本開示は、演算装置に関する。 This disclosure relates to a computing device.

ニューラルネットワークモデルを実行する演算処理を行う演算装置として、演算負荷がかかると、消費電力が増加することが知られている。電圧やクロック周波数を制御することで消費電力を抑制するDVFS(Dynamic Voltage and Frequency Scaling)制御が知られている。また、特許文献1には、浮動小数点によって表される16~32ビットである高ビット重みパラメータを用いて演算を行う構造のニューラルネットワークモデルを実行した際の消費電力よりも、1ビットである低ビット重みパラメータを用いて演算を行う構造のニューラルネットワークモデルを実行した際の消費電力の方が低いことが開示されている。 It is known that the power consumption of a computing device that performs arithmetic processing to execute a neural network model increases when the computational load is increased. DVFS (Dynamic Voltage and Frequency Scaling) control is known, which reduces power consumption by controlling voltage and clock frequency. Patent Document 1 also discloses that the power consumption when executing a neural network model that performs calculations using a low-bit weight parameter (1 bit) is lower than the power consumption when executing a neural network model that performs calculations using a high-bit weight parameter (16 to 32 bits) represented by floating point.

特開2021-103441号公報Japanese Patent Application Laid-Open No. 2021-103441 特開2020-74099号公報Japanese Patent Application Laid-Open No. 2020-74099 特開2022-507704号公報Japanese Patent Application Laid-Open No. 2022-507704

DVFS制御を用いて消費電力を抑制する場合、ニューラルネットワークモデルの演算にかかる時間が大きく増加する場合がある。低ビット重みパラメータを用いるニューラルネットワークモデルは、演算にかかる時間が増加することを抑制しつつ消費電力を抑制できるものの、ニューラルネットワークモデルの構造がハードウェアの構成を決定付けるため、容易にニューラルネットワークモデルを切り替える事ができない、という課題があった。 When using DVFS control to reduce power consumption, the time required for neural network model calculations can increase significantly. Neural network models using low bit-weight parameters can reduce power consumption while minimizing increases in calculation time, but the structure of the neural network model dictates the hardware configuration, making it difficult to easily switch neural network models.

本開示の一形態によれば、演算装置(100、100B、100C、100D)が提供される。演算装置は、ニューラルネットワークモデルを実行して演算処理を行う演算部(10)と、前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部(20)と、前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部(30、30B)と、前記高ビット重みと前記低ビット重みを予め記憶する記憶部(40)と、を備える。前記切替部は、前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替える。
本開示の他の形態によれば、演算装置が提供される。演算装置は、ニューラルネットワークモデルを実行して演算処理を行う演算部と、前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、前記高ビット重みを記憶する記憶部と、を備える。前記切替部は、前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え、前記高ビット重みに対して量子化を実行して前記低ビット重みに切り替える。
本開示の他の形態によれば、演算装置が提供される。演算装置は、ニューラルネットワークモデルを実行して演算処理を行う演算部と、前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、を備える。前記演算部は、前記高ビット重みの第1ニューラルネットワークモデルを実行する第1演算処理と、前記低ビット重みの第2ニューラルネットワークモデルを実行する第2演算処理とを並行して行い、前記切替部は、前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え、前記第1ニューラルネットワークモデルの前記重みを前記高ビット重みから前記低ビット重みに切り替える。
本開示の他の形態によれば、演算装置が提供される。演算装置は、ニューラルネットワークモデルを実行して演算処理を行う演算部と、前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、を備える。前記切替部は、前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え、前記判定値が前記第1閾値よりも低い予め定められた第3閾値以下の場合に、前記重みを前記低ビット重みから前記高ビット重みに切り替える。
According to one embodiment of the present disclosure, there is provided a computing device (100, 100B, 100C, 100D). The computing device includes: a computing unit (10) that executes a neural network model to perform computation; an acquisition unit (20) that acquires, as a determination value, one or more of the power consumption of the computing device, the temperature of the computing device, and the availability rate of the computing unit; a switching unit (30, 30B) that can switch the weight of the neural network model used in the computation between a high bit weight and a low bit weight having a lower number of bits than the high bit weight; and a storage unit (40) that stores the high bit weight and the low bit weight in advance . The switching unit switches the weight from the high bit weight to the low bit weight when the determination value is equal to or greater than a predetermined first threshold.
According to another aspect of the present disclosure, there is provided a computing device including: a computing unit that executes a neural network model to perform a computation process; an acquisition unit that acquires, as a determination value, one or more of the power consumption of the computing unit, the temperature of the computing unit, and an availability rate of the computing unit; a switching unit that can switch a weight of the neural network model used in the computation process between a high bit weight and a low bit weight having a bit number lower than the high bit weight; and a storage unit that stores the high bit weight. When the determination value is equal to or greater than a predetermined first threshold, the switching unit switches the weight from the high bit weight to the low bit weight and quantizes the high bit weight to switch it to the low bit weight.
According to another aspect of the present disclosure, there is provided a computing device including: a computing unit that executes a neural network model to perform a computation; an acquisition unit that acquires, as a determination value, one or more of the power consumption of the computing unit, the temperature of the computing unit, and an availability rate of the computing unit; and a switching unit that can switch a weight of the neural network model used in the computation between a high bit weight and a low bit weight having a bit number lower than the high bit weight. The computing unit performs, in parallel, a first computation process that executes a first neural network model with the high bit weight and a second computation process that executes a second neural network model with the low bit weight, and the switching unit switches the weight from the high bit weight to the low bit weight and switches the weight of the first neural network model from the high bit weight to the low bit weight when the determination value is equal to or greater than a predetermined first threshold.
According to another aspect of the present disclosure, there is provided a computing device including: a computing unit that executes a neural network model to perform computational processing; an acquisition unit that acquires, as a determination value, one or more of the power consumption of the computing unit, the temperature of the computing unit, and an availability rate of the computing unit; and a switching unit that can switch a weight of the neural network model used in the computational processing between a high bit weight and a low bit weight having a bit number lower than the high bit weight. The switching unit switches the weight from the high bit weight to the low bit weight when the determination value is equal to or greater than a predetermined first threshold, and switches the weight from the low bit weight to the high bit weight when the determination value is equal to or less than a predetermined third threshold that is lower than the first threshold.

この形態の演算装置によれば、切替部は、消費電力等に応じて、ニューラルネットワークモデルの重みを高ビット重みと低ビット重みとで切り替えることができる。そのため、通常は所望の精度で演算をすることができ、消費電力等が増大した場合には、演算にかかる時間が増加することを抑制しつつ消費電力を抑制できる。 With this type of computing device, the switching unit can switch the weights of the neural network model between high-bit weights and low-bit weights depending on power consumption, etc. This allows calculations to be performed with the desired accuracy, and when power consumption, etc. increases, power consumption can be reduced while preventing an increase in the time required for calculations.

演算装置の構成の概要を示す説明図である。FIG. 2 is an explanatory diagram showing an outline of the configuration of a computing device. ニューラルネットワークモデルによる演算処理についての説明図である。FIG. 10 is an explanatory diagram of a calculation process using a neural network model. 演算処理の一例を示したフローチャートである。10 is a flowchart showing an example of a calculation process. 第2実施形態における演算装置の構成の概要を示す説明図である。FIG. 10 is an explanatory diagram illustrating an outline of the configuration of a calculation device according to a second embodiment. 第2実施形態における演算処理の一例を示したフローチャートである。10 is a flowchart illustrating an example of a calculation process in the second embodiment. 第3実施形態における演算装置の構成の概要を示す説明図である。FIG. 10 is an explanatory diagram illustrating an outline of the configuration of a calculation device according to a third embodiment. 第4実施形態における演算装置の構成の概要を示す説明図である。FIG. 10 is an explanatory diagram illustrating an outline of the configuration of a calculation device according to a fourth embodiment.

A.第1実施形態:
図1に示すように、演算装置100は、演算部10と、取得部20と、切替部30と、記憶部40と、を備える。演算装置100は、ニューラルネットワークモデルを実行して演算処理を行う装置である。演算装置100は、中央処理装置(CPU)や、RAM、ROMにより構成されたマイクロコンピュータ等からなり、予めインストールされたプログラムをマイクロコンピュータが実行することによって、これらの各部の機能を実現する。本実施形態において、演算装置100は、SoC(System On a Chip)である。演算装置100は、例えば、車両に搭載され、画像解析のための演算処理を行う。演算装置100は、クラウド上に実装されていてもよい。
A. First embodiment:
As shown in FIG. 1 , the arithmetic device 100 includes a calculation unit 10, an acquisition unit 20, a switching unit 30, and a storage unit 40. The arithmetic device 100 is a device that executes a neural network model to perform arithmetic processing. The arithmetic device 100 includes a microcomputer configured with a central processing unit (CPU), RAM, and ROM, and realizes the functions of each of these units by the microcomputer executing a pre-installed program. In this embodiment, the arithmetic device 100 is a SoC (System on a Chip). The arithmetic device 100 is mounted on, for example, a vehicle and performs arithmetic processing for image analysis. The arithmetic device 100 may also be implemented on a cloud.

演算部10は、ニューラルネットワークモデルを実行して演算処理を行う。図2に示すように、ニューラルネットワークは、入力層L1と、複数の中間層L2と、出力層L3とを備える。中間層L2の数は任意に定める事ができる。入力層L1は、情報が入力される層である。中間層L2は、入力層L1から伝達される情報に基づいて特徴量の算出を行う層である。出力層L3は、中間層L2から伝達される情報に基づいて結果を出力する層である。各層には、複数のノードが含まれる。隣接する層のノードとノードとを繋ぐエッジは、重み付けされている。演算部10は、例えば、ノードN1に重みW11を掛け合わせ、ノードN2に重みW12を掛け合わせ、ノードN3に重みW13を掛け合わせ、これらを足し合わせてノードN4の値を求める積和演算を含む演算を行う。 The calculation unit 10 executes a neural network model to perform calculations. As shown in FIG. 2, the neural network comprises an input layer L1, multiple intermediate layers L2, and an output layer L3. The number of intermediate layers L2 can be determined arbitrarily. The input layer L1 is a layer to which information is input. The intermediate layer L2 is a layer that calculates feature values based on information transmitted from the input layer L1. The output layer L3 is a layer that outputs results based on information transmitted from the intermediate layer L2. Each layer includes multiple nodes. Edges connecting nodes in adjacent layers are weighted. The calculation unit 10 performs calculations including a product-sum operation, for example, to multiply node N1 by weight W11, multiply node N2 by weight W12, and multiply node N3 by weight W13, and then add these results together to find the value of node N4.

記憶部40(図1参照)は、ニューラルネットワークモデルにおける、ノードに入力される値に乗算される重みを記憶する。本実施形態において、記憶部40は、予め定められた高ビット重みWhと、高ビット重みWhのビット数よりも低いビット数である、予め定められた低ビット重みWlとを記憶する。本実施形態において、記憶部40は、高ビット重みWhとして、最適化された32bitの浮動小数点型のデータを記憶し、低ビット重みWlとして4bitの整数型のデータを記憶する。また、高ビット重みWhと低ビット重みWlとは、それぞれ、最適化されている。 The storage unit 40 (see Figure 1) stores weights by which values input to nodes in the neural network model are multiplied. In this embodiment, the storage unit 40 stores a predetermined high bit weight Wh and a predetermined low bit weight Wl, which has a lower number of bits than the high bit weight Wh. In this embodiment, the storage unit 40 stores optimized 32-bit floating-point data as the high bit weight Wh, and 4-bit integer data as the low bit weight Wl. The high bit weight Wh and the low bit weight Wl are each optimized.

取得部20は、演算装置100の消費電力に関する判定値を取得する。本実施形態において、取得部20は、演算装置100の温度の値を判定値としてセンサ200から取得する。取得部20は、演算装置100の温度が高いほど、演算装置100の消費電力が高いと推定できる。 The acquisition unit 20 acquires a judgment value related to the power consumption of the calculation device 100. In this embodiment, the acquisition unit 20 acquires the temperature value of the calculation device 100 from the sensor 200 as the judgment value. The acquisition unit 20 can estimate that the higher the temperature of the calculation device 100, the higher the power consumption of the calculation device 100.

切替部30は、演算処理において用いられるニューラルネットワークモデルの重みを切り替える。切替部30は、ニューラルネットワークモデルの重みを高ビット重みWhと、低ビット重みWlとで切り替え可能である。 The switching unit 30 switches the weights of the neural network model used in the calculation process. The switching unit 30 can switch the weights of the neural network model between high-bit weight Wh and low-bit weight Wl.

図3に示す切替処理は、切替部30がニューラルネットワークモデルの重みを切り替える処理である。この処理は、演算部10が演算処理を実行する際に繰り返し実行される。ステップS100において、取得部20は、判定値を取得する。 The switching process shown in Figure 3 is a process in which the switching unit 30 switches the weights of the neural network model. This process is repeatedly executed when the calculation unit 10 executes calculation processing. In step S100, the acquisition unit 20 acquires a judgment value.

ステップS110において、切替部30は、ステップS100で取得した判定値が第1閾値以上か否かを判定する。判定値が第1閾値以上の場合、切替部30は、ステップS120の処理に進み、重みを高ビット重みWhから低ビット重みWlに切り替える。一方、判定値が第1閾値未満の場合、切替部30は、重みを切り替えずに、演算処理を終了する。 In step S110, the switching unit 30 determines whether the judgment value acquired in step S100 is equal to or greater than the first threshold. If the judgment value is equal to or greater than the first threshold, the switching unit 30 proceeds to step S120 and switches the weight from the high bit weight Wh to the low bit weight Wl. On the other hand, if the judgment value is less than the first threshold, the switching unit 30 ends the calculation process without switching the weight.

以上で説明した本実施形態の演算装置100によれば、切替部30は、消費電力等に応じて、ニューラルネットワークモデルの重みを高ビット重みWhと低ビット重みWlとで切り替えることができる。そのため、通常は所望の精度で演算をすることができ、消費電力等が増大した場合には、演算にかかる時間が増加することを抑制しつつ消費電力を抑制できる。 According to the computing device 100 of this embodiment described above, the switching unit 30 can switch the weights of the neural network model between high bit weight Wh and low bit weight Wl depending on power consumption, etc. As a result, computations can normally be performed with the desired accuracy, and when power consumption, etc. increases, power consumption can be reduced while preventing an increase in the time required for computation.

また、切替部30は、既に最適化された低ビット重みWlに切り替えるため、最適化されていない低ビット重みWlに切り替える場合に比べて、低ビット重みWlを用いた演算の精度を高くできる。 In addition, because the switching unit 30 switches to an already optimized low bit weight Wl, the accuracy of calculations using the low bit weight Wl can be improved compared to when switching to an unoptimized low bit weight Wl.

B.第2実施形態:
図4に示す第2実施形態の演算装置100Bは、記憶部40が、高ビット重みWhのみを記憶する点が、第1実施形態と異なり、他の構成は同一である。図5に示す第2実施形態における切り替え処理は、ステップS125において切替部30Bが、高ビット重みWhに対して事後量子化を実行して低ビット重みに切り替える点が、第1実施形態と異なり、ステップS100およびステップS110の工程は同一である。
B. Second embodiment:
The arithmetic device 100B of the second embodiment shown in Fig. 4 differs from the first embodiment in that the storage unit 40 stores only the high bit weight Wh, but the other configurations are the same. The switching process in the second embodiment shown in Fig. 5 differs from the first embodiment in that the switching unit 30B performs post-quantization on the high bit weight Wh to switch it to a low bit weight in step S125, but the processes in steps S100 and S110 are the same.

切替部30Bは、ステップS125で高ビット重みWhに対して事後量子化を実行して低ビット重みに切り替える。より具体的には、切替部30Bは、32bitの高ビット重みWhのうちの23bitで表される仮数部のビット数を、7bitに減らして、16bitの浮動小数点データの低ビット重みに切り替える。 In step S125, the switching unit 30B performs post-quantization on the high bit weight Wh to switch it to a low bit weight. More specifically, the switching unit 30B reduces the number of bits of the mantissa represented by 23 bits of the 32-bit high bit weight Wh to 7 bits, switching it to a low bit weight of 16-bit floating-point data.

以上で説明した第2実施形態の演算装置100によれば、切替部30Bは、高ビット重みWhに対して事後量子化を実行して低ビット重みに切り替えるため、低ビット重のビット数を任意に定めることができる。 According to the arithmetic device 100 of the second embodiment described above, the switching unit 30B performs post-quantization on the high bit weight Wh and switches it to a low bit weight, so the number of bits for the low bit weight can be determined arbitrarily.

C.第3実施形態:
図6に示す第3実施形態の演算装置100Cは、制御部50を備えている点が、第1実施形態と異なり、他の構成は同一である。第3実施形態は、制御部50が、演算装置100の電圧とクロック周波数とを制御する点が第1実施形態と異なる。
C. Third embodiment:
6 is different from the first embodiment in that it includes a control unit 50. The third embodiment differs from the first embodiment in that the control unit 50 controls the voltage and clock frequency of the calculation device 100.

制御部50は、判定値が予め定められた第2閾値以上に上昇した場合に、判定値が第2閾値未満の場合よりも演算装置100の電圧とクロック周波数とを大きくするよう制御する。第2閾値は、第1閾値よりも小さい値である。すなわち、制御部50は、DVFS制御を実行する。 When the judgment value rises above a predetermined second threshold, the control unit 50 controls the voltage and clock frequency of the calculation device 100 to be higher than when the judgment value is below the second threshold. The second threshold is a value smaller than the first threshold. In other words, the control unit 50 performs DVFS control.

以上で説明した第3実施形態の演算装置100Cによれば、制御部50が、判定値が第2閾値以上の上昇した場合に、判定値が第2閾値未満の場合よりも演算装置100の電圧とクロック周波数とを大きくするよう制御するため、消費電力を抑制することができる。 According to the arithmetic device 100C of the third embodiment described above, when the judgment value rises above the second threshold, the control unit 50 controls the voltage and clock frequency of the arithmetic device 100 to be higher than when the judgment value is below the second threshold, thereby reducing power consumption.

D.第4実施形態:
図7に示す第4実施形態の演算装置100Dは、推定部60を備えている点が、第1実施形態と異なり、他の構成は同一である。第4実施形態は、切替部30が、推定部60が推定した演算量が予め定められた閾値以上である場合にも、重みを高ビット重みWhから低ビット重みWlに切り替える点が第1実施形態と異なる。
D. Fourth embodiment:
7 is different from the first embodiment in that it includes an estimation unit 60. The fourth embodiment is different from the first embodiment in that the switching unit 30 switches the weight from the high bit weight Wh to the low bit weight Wl even when the amount of calculation estimated by the estimation unit 60 is equal to or greater than a predetermined threshold.

推定部60は、要求された演算処理における演算量を推定する。 The estimation unit 60 estimates the amount of calculation required for the requested calculation process.

本実施形態において、切替部30は、演算量が予め定められた閾値以上である場合に、ニューラルネットワークモデルの重みを高ビット重みWhから低ビット重みWlに切り替える。なお、判定値が第1閾値以上であり、既にニューラルネットワークモデルの重みを高ビット重みWhから低ビット重みWlに切り替えている場合には、切替部30は、更にビット数の低い重みに切り替えてもよい。 In this embodiment, the switching unit 30 switches the weight of the neural network model from a high bit weight Wh to a low bit weight Wl when the amount of calculation is equal to or greater than a predetermined threshold. Note that if the judgment value is equal to or greater than a first threshold and the weight of the neural network model has already been switched from a high bit weight Wh to a low bit weight Wl, the switching unit 30 may switch to a weight with an even lower number of bits.

以上で説明した第4実施形態の演算装置100Dによれば、高演算量が必要な演算処理を実行する際に、消費電力を抑制することができる。 The computing device 100D of the fourth embodiment described above can reduce power consumption when performing computational processing that requires a large amount of computation.

E.第5実施形態:
第5実施形態は、演算部10が、複数のニューラルネットワークモデルを実行して並行して演算処理を行う点が、第1実施形態と異なる。第5実施形態の演算装置100の構成は、第2実施形態の演算装置100の構成と同一であるため、演算装置100の構成の説明は省略する。この第5実施形態も、第2実施形態とほぼ同様の効果を有する。
E. Fifth embodiment:
The fifth embodiment differs from the first embodiment in that the calculation unit 10 executes a plurality of neural network models to perform calculation processing in parallel. The configuration of the calculation device 100 of the fifth embodiment is the same as the configuration of the calculation device 100 of the second embodiment, so a description of the configuration of the calculation device 100 will be omitted. The fifth embodiment also has substantially the same effects as the second embodiment.

演算部10は、高ビット重みWhの第1ニューラルネットワークモデルを実行する第1演算処理と、低ビット重みWlの第2ニューラルネットワークモデルを実行する第2演算処理とを並列して行う。すなわち、演算部10は、冗長化構成を有する。演算装置100は、通常、演算部10が第1ニューラルネットワークモデルを実行して求めた演算結果を、演算部10の演算結果として用いる。 The calculation unit 10 performs a first calculation process in parallel, which executes a first neural network model with a high bit weight Wh, and a second calculation process in parallel, which executes a second neural network model with a low bit weight Wl. In other words, the calculation unit 10 has a redundant configuration. The calculation device 100 typically uses the calculation results obtained by the calculation unit 10 executing the first neural network model as the calculation results of the calculation unit 10.

本実施形態において、切替部30は、判定値が第1閾値以上の場合に、ステップS120(図3参照)において、主幹である第1ニューラルネットワークモデルの重みを高ビット重みWhから低ビット重みWlに切り替える。 In this embodiment, if the judgment value is equal to or greater than the first threshold, the switching unit 30 switches the weight of the first neural network model, which is the main model, from the high-bit weight Wh to the low-bit weight Wl in step S120 (see Figure 3).

F.他の実施形態:
(F1)上述した実施形態において、取得部20は、判定値として演算装置100の温度を取得している。これに限らず、取得部20は、判定値として、演算装置100の消費電力と演算装置100の温度と演算部10の稼働率とのいずれか一つ以上を取得してもよい。演算部10の稼働率とは、例えば、演算部10の積和演算(multiply-accumulate(MAC))によるメモリの使用率である。判定値として複数の種類の値を取得する場合、第1閾値は判定値の種類毎に設定される。
F. Other Embodiments:
(F1) In the above-described embodiment, the acquisition unit 20 acquires the temperature of the arithmetic device 100 as the judgment value. However, the acquisition unit 20 may acquire one or more of the power consumption of the arithmetic device 100, the temperature of the arithmetic device 100, and the operation rate of the arithmetic device 10 as the judgment value. The operation rate of the arithmetic device 10 is, for example, the memory usage rate due to multiply-accumulate (MAC) operations of the arithmetic device 10. When multiple types of values are acquired as the judgment value, the first threshold is set for each type of judgment value.

(F2)上述した実施形態において、切替部30は、判定値が第1閾値以下に下降した場合に、重みを低ビット重みWlから高ビット重みWhに切り替えてもよい。また、切替部30は、判定値が第1閾値よりも低い予め定められた第3閾値以下の場合に、重みを低ビット重みWlから高ビット重みWhに切り替えてもよい。この形態によれば、切替部30は、判定値が第1閾値付近を上昇・下降する場合において、判定値が第1閾値に下降した場合に重みを低ビット重みWlから高ビット重みWhに切り替える場合に比べて、頻繁に重みを切り替えることを回避できる。 (F2) In the above-described embodiment, the switching unit 30 may switch the weight from the low bit weight Wl to the high bit weight Wh when the judgment value falls below the first threshold. Furthermore, the switching unit 30 may switch the weight from the low bit weight Wl to the high bit weight Wh when the judgment value is below a predetermined third threshold that is lower than the first threshold. According to this embodiment, when the judgment value rises and falls near the first threshold, the switching unit 30 can avoid switching the weight more frequently than when the switching unit 30 switches the weight from the low bit weight Wl to the high bit weight Wh when the judgment value falls to the first threshold.

(F3)上述した実施形態において、記憶部40は、演算装置100に備えられている。これに限らず、記憶部40は、外部の記憶領域であってもよい。 (F3) In the above-described embodiment, the memory unit 40 is provided in the computing device 100. However, this is not limiting, and the memory unit 40 may also be an external storage area.

(F4)上述した第2実施形態において、切替部30Bは、判定値に応じて、低ビット重みのビット数を決定してもよい。より具体的には、切替部30Bは、あらかじめ用意したテーブルや関数を用いて、低ビット重みのビット数を決定する。切替部30は、例えば、判定値が大きいほど、低ビット重みのビット数を低くする。 (F4) In the second embodiment described above, the switching unit 30B may determine the number of low-bit-weight bits in accordance with the judgment value. More specifically, the switching unit 30B determines the number of low-bit-weight bits using a table or function prepared in advance. For example, the switching unit 30B reduces the number of low-bit-weight bits as the judgment value increases.

(F5)上述した第2実施形態において、切替部30Bは、32bitの高ビット重みWhの仮数部のビット数を減らして16bitの低ビット重みに切り替えている。これに限らず、切替部30Bは、例えば、高ビット重みWhのヒストグラムを用いて、事後量子化を行ってもよい。この場合、記憶部40が高ビット重みWhのヒストグラムを保持している。より具体的には、切替部30Bは、次の式(1)で求められるヒストグラムの区間の幅を用いて、事後量子化を行う。なお、切替部30Bの事後量子化にかかる時間は、数ミリ秒程度であり、演算部10の演算処理にかかる時間に大きな影響は与えない。 (F5) In the second embodiment described above, the switching unit 30B reduces the number of bits in the mantissa part of the 32-bit high bit weight Wh and switches it to a 16-bit low bit weight. This is not a limitation, and the switching unit 30B may perform post-quantization, for example, using a histogram of the high bit weight Wh. In this case, the storage unit 40 stores the histogram of the high bit weight Wh. More specifically, the switching unit 30B performs post-quantization using the width of the histogram interval calculated by the following equation (1). Note that the time required for post-quantization by the switching unit 30B is approximately a few milliseconds, which does not significantly affect the time required for the calculation processing by the calculation unit 10.

S=A/2(n-1)…(1)
ここで、Sはヒストグラムの区間の幅であり、Aはヒストグラムの最小値と最大値との差であり、nは低ビットのビット数である。nは任意に定めることができる。
S=A/2 (n-1) ...(1)
Here, S is the width of the histogram interval, A is the difference between the minimum and maximum values of the histogram, and n is the number of low-order bits, which can be determined arbitrarily.

(F6)上述した第3実施形態において、推定部60は、演算装置100の電圧とクロック周波数とを制御している。これに限らず、推定部60は、演算装置100の電圧とクロック周波数とのうち少なくともいずれか一方を制御すればよい。 (F6) In the third embodiment described above, the estimation unit 60 controls the voltage and clock frequency of the calculation device 100. However, this is not limiting, and the estimation unit 60 may control at least one of the voltage and clock frequency of the calculation device 100.

(F7)上述した第4実施形態において、切替部30は、演算量が閾値以上であって、かつ、制御部50がDVFS制御を実行できない場合に、ニューラルネットワークモデルの重みを高ビット重みWhから低ビット重みWlに切り替えてもよい。この場合、演算装置100Dは、制御部50を備えており、制御部50は、演算量が閾値以上である場合に、DVFS制御を実行する。 (F7) In the fourth embodiment described above, the switching unit 30 may switch the weight of the neural network model from high bit weight Wh to low bit weight Wl when the amount of calculation is equal to or greater than a threshold and the control unit 50 cannot perform DVFS control. In this case, the calculation device 100D includes a control unit 50, and the control unit 50 performs DVFS control when the amount of calculation is equal to or greater than a threshold.

本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば発明の概要の欄に記載した各形態中の技術的特徴に対応する実施形態中の技術的特徴は、上述した課題を解決するために、あるいは上述の効果の一部又は全部を達成するために、適宜、差し替えや組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜削除することが可能である。 This disclosure is not limited to the above-described embodiments, and can be realized in various configurations without departing from its spirit. For example, the technical features in the embodiments corresponding to the technical features in each aspect described in the Summary of the Invention section can be replaced or combined as appropriate to solve the above-described problems or achieve some or all of the above-described effects. Furthermore, if a technical feature is not described as essential in this specification, it can be deleted as appropriate.

10…演算部、20…取得部、30、30B…切替部、40…記憶部、50…制御部、60…推定部、100、100B、100C、100D…演算装置、200…センサ 10... Calculation unit, 20... Acquisition unit, 30, 30B... Switching unit, 40... Memory unit, 50... Control unit, 60... Estimation unit, 100, 100B, 100C, 100D... Calculation device, 200... Sensor

Claims (7)

演算装置(100、100B、100C、100D)であって、
ニューラルネットワークモデルを実行して演算処理を行う演算部(10)と、
前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部(20)と、
前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部(30、30B)と、
前記高ビット重みと前記低ビット重みを予め記憶する記憶部(40)と、を備え、
前記切替部は、前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替える、演算装置。
A computing device (100, 100B, 100C, 100D),
A calculation unit (10) that executes a neural network model and performs calculation processing;
an acquisition unit (20) that acquires one or more of the power consumption of the arithmetic unit, the temperature of the arithmetic unit, and the operating rate of the arithmetic unit as a judgment value;
a switching unit (30, 30B) capable of switching the weight of the neural network model used in the arithmetic processing between a high bit weight and a low bit weight having a bit number lower than the high bit weight;
a storage unit (40) for storing the high bit weight and the low bit weight in advance ,
The switching unit switches the weight from the high bit weight to the low bit weight when the determination value is equal to or greater than a predetermined first threshold.
演算装置であって、
ニューラルネットワークモデルを実行して演算処理を行う演算部と、
前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、
前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、
前記高ビット重みを記憶する記憶部と、を備え、
前記切替部は、
前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え
前記高ビット重みに対して量子化を実行して前記低ビット重みに切り替える、演算装置。
A computing device,
a calculation unit that executes a neural network model and performs calculations;
an acquisition unit that acquires, as a determination value, one or more of the power consumption of the arithmetic unit, the temperature of the arithmetic unit, and the availability rate of the arithmetic unit;
a switching unit that can switch the weight of the neural network model used in the calculation process between a high bit weight and a low bit weight having a bit number lower than the high bit weight;
a storage unit that stores the high bit weight ;
The switching unit is
When the determination value is equal to or greater than a predetermined first threshold, the weight is switched from the high bit weight to the low bit weight ;
A computing device that performs quantization on the high bit weights and switches to the low bit weights .
請求項に記載の演算装置であって、
前記切替部は、前記判定値に応じて、前記低ビット重みのビット数を決定する、演算装置。
3. The computing device according to claim 2 ,
The switching unit determines the number of low-bit-weight bits in accordance with the determination value.
請求項または請求項に記載の演算装置であって、更に、
前記判定値が前記第1閾値よりも小さい値である第2閾値以上の上昇した場合に、前記値が前記第2閾値未満の場合よりも前記演算装置の電圧とクロック周波数とのうち少なくともいずれか一方を大きくするよう制御する制御部(50)を備える、演算装置。
The arithmetic device according to claim 1 or 2 , further comprising:
A computing device comprising a control unit (50) that controls at least one of the voltage and clock frequency of the computing device to be higher when the judgment value rises to or above a second threshold value that is smaller than the first threshold value than when the value is less than the second threshold value.
請求項に記載の演算装置であって、更に、
前記演算処理における演算量を推定する推定部(60)を備え、
前記切替部は、前記演算量が予め定められた閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替える、演算装置。
2. The computing device according to claim 1 , further comprising:
An estimation unit (60) for estimating the amount of calculation in the calculation processing,
The switching unit switches the weight from the high bit weight to the low bit weight when the amount of calculation is equal to or greater than a predetermined threshold.
演算装置であって、
ニューラルネットワークモデルを実行して演算処理を行う演算部と、
前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、
前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、を備え、
前記演算部は、前記高ビット重みの第1ニューラルネットワークモデルを実行する第1演算処理と、前記低ビット重みの第2ニューラルネットワークモデルを実行する第2演算処理とを並行して行い、
前記切替部は、
前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え
前記第1ニューラルネットワークモデルの前記重みを前記高ビット重みから前記低ビット重みに切り替える、演算装置。
A computing device,
a calculation unit that executes a neural network model and performs calculations;
an acquisition unit that acquires, as a determination value, one or more of the power consumption of the arithmetic unit, the temperature of the arithmetic unit, and the availability rate of the arithmetic unit;
a switching unit that can switch the weight of the neural network model used in the calculation process between a high bit weight and a low bit weight having a number of bits lower than the high bit weight,
the calculation unit performs a first calculation process for executing the first neural network model with a high bit weight and a second calculation process for executing the second neural network model with a low bit weight in parallel;
The switching unit is
When the determination value is equal to or greater than a predetermined first threshold, the weight is switched from the high bit weight to the low bit weight ;
A computing device that switches the weights of the first neural network model from the high-bit weights to the low-bit weights .
演算装置であって、
ニューラルネットワークモデルを実行して演算処理を行う演算部と、
前記演算装置の消費電力と前記演算装置の温度と前記演算部の稼働率とのいずれか一つ以上を判定値として取得する取得部と、
前記演算処理において用いられる前記ニューラルネットワークモデルの重みを、高ビット重みと、前記高ビット重みよりも低いビット数である低ビット重みとで切り替え可能な切替部と、を備え、
前記切替部は、
前記判定値が予め定められた第1閾値以上の場合に、前記重みを前記高ビット重みから前記低ビット重みに切り替え
前記判定値が前記第1閾値よりも低い予め定められた第3閾値以下の場合に、前記重みを前記低ビット重みから前記高ビット重みに切り替える、演算装置。
A computing device,
a calculation unit that executes a neural network model and performs calculations;
an acquisition unit that acquires, as a determination value, one or more of the power consumption of the arithmetic unit, the temperature of the arithmetic unit, and the availability rate of the arithmetic unit;
a switching unit that can switch the weight of the neural network model used in the calculation process between a high bit weight and a low bit weight having a number of bits lower than the high bit weight,
The switching unit is
When the determination value is equal to or greater than a predetermined first threshold, the weight is switched from the high bit weight to the low bit weight ;
When the determination value is equal to or less than a predetermined third threshold value that is lower than the first threshold value, the weight is switched from the low bit weight to the high bit weight .
JP2022092138A 2022-06-07 2022-06-07 arithmetic device Active JP7747585B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022092138A JP7747585B2 (en) 2022-06-07 2022-06-07 arithmetic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022092138A JP7747585B2 (en) 2022-06-07 2022-06-07 arithmetic device

Publications (2)

Publication Number Publication Date
JP2023179078A JP2023179078A (en) 2023-12-19
JP7747585B2 true JP7747585B2 (en) 2025-10-01

Family

ID=89199336

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022092138A Active JP7747585B2 (en) 2022-06-07 2022-06-07 arithmetic device

Country Status (1)

Country Link
JP (1) JP7747585B2 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190171420A1 (en) 2017-12-06 2019-06-06 Advanced Micro Devices, Inc. Dynamic, variable bit-width numerical precision on fpgas for machine learning tasks
JP2020074099A (en) 2017-04-19 2020-05-14 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co.,Ltd. Processing apparatus and processing method
US20200193279A1 (en) 2018-12-13 2020-06-18 Sri International Runtime-throttleable neural networks
US20210174176A1 (en) 2019-12-06 2021-06-10 International Business Machines Corporation Flexible precision neural inference processing unit
US20210279557A1 (en) 2020-03-05 2021-09-09 Apple Inc. Dynamic variable bit width neural processor
JP2021179966A (en) 2019-06-12 2021-11-18 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co., Ltd. Quantization parameter determination method for neural network, and related product
US20220101133A1 (en) 2020-09-29 2022-03-31 Qualcomm Incorporated Dynamic quantization for energy efficient deep learning

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020074099A (en) 2017-04-19 2020-05-14 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co.,Ltd. Processing apparatus and processing method
US20190171420A1 (en) 2017-12-06 2019-06-06 Advanced Micro Devices, Inc. Dynamic, variable bit-width numerical precision on fpgas for machine learning tasks
US20200193279A1 (en) 2018-12-13 2020-06-18 Sri International Runtime-throttleable neural networks
JP2021179966A (en) 2019-06-12 2021-11-18 シャンハイ カンブリコン インフォメーション テクノロジー カンパニー リミテッドShanghai Cambricon Information Technology Co., Ltd. Quantization parameter determination method for neural network, and related product
US20210174176A1 (en) 2019-12-06 2021-06-10 International Business Machines Corporation Flexible precision neural inference processing unit
US20210279557A1 (en) 2020-03-05 2021-09-09 Apple Inc. Dynamic variable bit width neural processor
US20220101133A1 (en) 2020-09-29 2022-03-31 Qualcomm Incorporated Dynamic quantization for energy efficient deep learning

Also Published As

Publication number Publication date
JP2023179078A (en) 2023-12-19

Similar Documents

Publication Publication Date Title
KR20190062129A (en) Low-power hardware acceleration method and system for convolution neural network computation
US10642578B2 (en) Approximating functions
CN111240746A (en) Floating point data inverse quantization and quantization method and equipment
KR100907961B1 (en) Digital filter
JP2019148972A (en) Arithmetic processing device, information processing device, information processing method, and program
JP7839249B2 (en) Signed multiword multiplier
CN110659014A (en) Multiplier and neural network computing platform
JP7747585B2 (en) arithmetic device
CN114424161A (en) Multiplier
JP2022075307A (en) Arithmetic device, computer system, and calculation method
JP7215572B2 (en) Inference processing device and inference processing method
WO2018196750A1 (en) Device for processing multiplication and addition operations and method for processing multiplication and addition operations
JP7820320B2 (en) Arithmetic device, data compression method, and data compression program
Kordi et al. Optimized fixed point mac unit for neural network on fpga
JP7475164B2 (en) Information processing device, information processing method, and program
JP6382577B2 (en) FMA unit for use in a model calculation unit that calculates a functional model purely on hardware
JP7036224B2 (en) Arithmetic processing unit and control method of arithmetic processing unit
JP7371499B2 (en) Arithmetic processing unit, control method for the arithmetic processing unit, and arithmetic processing program
KR102105681B1 (en) Method and apparatus for controlling heterogeneous computing system
WO2023004799A1 (en) Electronic device and neural network quantization method
CN116888575A (en) Reduced approximate sharing-based single-input multi-weight multiplier
US12536248B1 (en) Device and method of computing an output value of a mathematical function, and method of designing an integrated circuit for the same
KR20220038173A (en) Calculation unit, method and computer program for multiplication
KR102866940B1 (en) A method for compressing a Transformer model and the apparatus for performing its computation
JP2019133627A (en) Information processing method and information processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240909

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20250702

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20250715

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20250821

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20250826

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20250918

R150 Certificate of patent or registration of utility model

Ref document number: 7747585

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150