JP7177000B2 - 演算装置および演算方法 - Google Patents
演算装置および演算方法 Download PDFInfo
- Publication number
- JP7177000B2 JP7177000B2 JP2019092626A JP2019092626A JP7177000B2 JP 7177000 B2 JP7177000 B2 JP 7177000B2 JP 2019092626 A JP2019092626 A JP 2019092626A JP 2019092626 A JP2019092626 A JP 2019092626A JP 7177000 B2 JP7177000 B2 JP 7177000B2
- Authority
- JP
- Japan
- Prior art keywords
- bit
- bits
- convolution
- reduction
- weight
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/544—Methods 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 for evaluating functions by calculation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30007—Arrangements for executing specific machine instructions to perform operations on data operands
- G06F9/3001—Arithmetic instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/15—Correlation function computation including computation of convolution operations
- G06F17/153—Multidimensional correlation or convolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/499—Denomination or exception handling, e.g. rounding or overflow
- G06F7/49905—Exception handling
- G06F7/4991—Overflow or underflow
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/499—Denomination or exception handling, e.g. rounding or overflow
- G06F7/49942—Significance control
- G06F7/49947—Rounding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2207/00—Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F2207/38—Indexing scheme relating to groups G06F7/38 - G06F7/575
- G06F2207/48—Indexing scheme relating to groups G06F7/48 - G06F7/575
- G06F2207/4802—Special implementations
- G06F2207/4818—Threshold devices
- G06F2207/4824—Neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computational Mathematics (AREA)
- Software Systems (AREA)
- Pure & Applied Mathematics (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Mathematical Physics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Neurology (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Complex Calculations (AREA)
Description
図1は、外界認識をするためのCNN(Convolutional Neural Network)を示す説明図である。CNN100は、L個(Lは2以上の整数)の畳み込み層を含む畳み込みニューラルネットワークである。図1では畳み込み層以外のプーリング層や全結合層、出力層は省略する。CNN100は、たとえば、画像データ102が入力されると、L個の畳み込み層C1~CLにより順次畳み込み演算を実行して、画像データ102に表示されている物体の認識結果105を出力する。任意の層番号jである第j層の畳み込み層を、第j畳み込み層Ci(1≦j≦L)または畳み込み層Cjと称す。
する。
図2は、図1に示した畳み込み演算例を示す説明図である。図3は、図2の部分拡大図である。図2および図3において、(A)は、画素および重みを示す各ビット列に対してビットシフトおよびビット逆シフトをしない場合の畳み込み演算例を示し、(B)は、画素および重みを示す各ビット列に対してビットシフトおよびビット逆シフトをする場合の畳み込み演算例を示す。
図5は、実施例1にかかる演算装置の構成例を示すブロック図である。演算装置500は、データ入力部501と、フィルタ格納部502と、判定器503と、削減ビット数計算器504と、ビット削減部505と、畳み込み演算器103と、ビット逆シフト器212と、出力加算器506と、出力データ格納レジスタ205と、を有する。データ入力部501、フィルタ格納部502、判定器503、削減ビット数計算器504、ビット削減部505、畳み込み演算器103、ビット逆シフト器212、出力加算器506、および出力データ格納レジスタ205は、具体的には、たとえば、LSI(Large-scale Integrated Circuit)またはメモリにより実現される。
図6は、実施例1にかかる演算装置500の演算処理手順例を示すフローチャートである。演算装置500は、第j畳み込み層Cjの畳み込み演算を開始する(ステップS600)。なお、層番号jの初期値は、j=1である。演算装置500は、フィルタ格納部502から層番号jに対応するパラメータとして、加算器202のビット数Mと、画素のビット数piと、重みのビット数pwと、重み行列Wと、重みサイズn2と、を取得する(ステップS601)。
図9は、実施例4にかかる演算装置500の構成例を示すブロック図である。実施例4の演算装置500は、実施例1の判定器503および削減ビット数計算器504に替え、オーバーフロー判定結果テーブル900を有する。
図11は、実施例4にかかる演算装置500の演算処理手順例を示すフローチャートである。図6と相違は、図11では、演算装置500は、ステップS605を実行しない点である。
202 加算器
211i 第1ビットシフト器
211w 第2ビットシフト器
212 ビット逆シフト器
500 演算装置
501 データ入力部
502 フィルタ格納部
503 判定器
504 削減ビット数計算器
505 ビット削減部
506 出力加算器
511 入力データ分岐器
512 入力データ格納レジスタ
521 アドレスデコーダ
522 パラメータ格納レジスタ
900 オーバーフロー判定結果テーブル
Claims (10)
- ニューラルネットワークを構成する複数の畳み込み層の各々でフィルタと前記フィルタのサイズ分の対象データとの畳み込み演算を畳み込み演算器で実行する演算装置であって、
前記畳み込み層ごとに、前記対象データの最下位ビットから第1ビット数分のビット列を削減し、前記フィルタの要素である重みの最下位ビットから第2ビット数分のビット列を削減するビット削減部と、
前記ビット削減部による削減後の前記対象データおよび前記重みが前記畳み込み演算器に入力されたことにより前記畳み込み演算器から出力された畳み込み演算結果の最下位ビットに、前記第1ビット数および前記第2ビット数を合計した第3ビット数分のビット列を追加するビット追加部と、
を有することを特徴とする演算装置。 - 請求項1に記載の演算装置であって、
前記畳み込み層ごとに、前記畳み込み演算器でオーバーフローが発生するか否かを判定する判定器を有し、
前記ビット削減部は、前記判定器による判定結果に基づいて、前記対象データの最下位ビットから前記第1ビット数分のビット列を削減し、前記重みの最下位ビットから前記第2ビット数分のビット列を削減し、
前記ビット追加部は、前記判定器による判定結果に基づいて、前記畳み込み演算結果の最下位ビットに、前記第3ビット数分のビット列を追加する、
ことを特徴とする演算装置。 - 請求項2に記載の演算装置であって、
前記畳み込み層ごとに、前記フィルタのサイズと、前記対象データのビット数と、前記フィルタ内の要素である重みのビット数と、を格納する格納部を有し、
前記判定器は、畳み込み演算対象の畳み込み層における、前記フィルタのサイズと、前記対象データのビット数と、前記フィルタ内の要素である重みのビット数と、を前記格納部から取得して、前記畳み込み演算器でオーバーフローが発生しない第4ビット数を算出し、前記第4ビット数と前記畳み込み演算器内の加算器のビット数とに基づいて、前記畳み込み演算器でオーバーフローが発生するか否かを判定する、
ことを特徴とする演算装置。 - 請求項1に記載の演算装置であって、
畳み込み演算対象の畳み込み層における、前記フィルタのサイズ、前記対象データのビット数、および前記フィルタ内の要素である重みのビット数と、前記畳み込み演算器内の加算器のビット数とに基づいて、前記第3ビット数を算出し、前記第3ビット数に基づいて前記第1ビット数および前記第2ビット数を決定する削減ビット数計算器を有し、
前記ビット削減部は、前記対象データの最下位ビットから前記削減ビット数計算器によって決定された第1ビット数分のビット列を削減し、前記重みの最下位ビットから前記削減ビット数計算器によって決定された第2ビット数分のビット列を削減し、
前記ビット追加部は、前記畳み込み演算結果の最下位ビットに、前記削減ビット数計算器によって算出された第3ビット数分のビット列を追加する、
ことを特徴とする演算装置。 - 請求項4に記載の演算装置であって、
前記削減ビット数計算器は、さらに、前記対象データの値および前記重みの値の少なくとも一方に基づいて、前記第3ビット数を算出する、
ことを特徴とする演算装置。 - 請求項5に記載の演算装置であって、
前記削減ビット数計算器は、前記対象データの最上位ビットの値および前記重みの最上位ビットの値の少なくとも一方が0となる畳み込み演算の回数に基づいて、前記第3ビット数を算出する、
ことを特徴とする演算装置。 - 請求項5に記載の演算装置であって、
前記削減ビット数計算器は、前記対象データの最上位ビットから0の値が連続するビット数および前記重みの最上位ビットから0の値が連続するビット数に基づいて、前記第3ビット数を算出する、
ことを特徴とする演算装置。 - 請求項1に記載の演算装置であって、
前記畳み込み層ごとに、前記第1ビット数と、前記第2ビット数と、を格納する格納部を有し、
前記ビット削減部は、前記畳み込み層ごとに、前記第1ビット数および前記第2ビット数を取得して、前記対象データの最下位ビットから前記第1ビット数分のビット列を削減し、前記重みの最下位ビットから前記第2ビット数分のビット列を削減する、
ことを特徴とする演算装置。 - 請求項8に記載の演算装置であって、
前記格納部は、前記畳み込み層ごとに、さらに、前記第3ビット数を格納し、
前記ビット追加部は、前記畳み込み層ごとに、前記第3ビット数を前記格納部から取得して、前記畳み込み演算結果の最下位ビットに、前記第3ビット数分のビット列を追加する、
ことを特徴とする演算装置。 - ニューラルネットワークを構成する複数の畳み込み層の各々でフィルタと前記フィルタのサイズ分の対象データとの畳み込み演算を畳み込み演算器で実行する演算装置による演算方法であって、
前記演算装置が、
前記畳み込み層ごとに、前記対象データの最下位ビットから第1ビット数分のビット列を削減し、前記重みの最下位ビットから第2ビット数分のビット列を削減し、
削減後の前記対象データおよび前記フィルタの要素である重みが前記畳み込み演算器に入力されたことにより前記畳み込み演算器から出力された畳み込み演算結果の最下位ビットに、前記第1ビット数および前記第2ビット数を合計した第3ビット数分のビット列を追加する、
ことを特徴とする演算方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019092626A JP7177000B2 (ja) | 2019-05-16 | 2019-05-16 | 演算装置および演算方法 |
US17/610,251 US11886874B2 (en) | 2019-05-16 | 2020-04-08 | Arithmetic operation device and arithmetic operation method |
PCT/JP2020/015878 WO2020230488A1 (ja) | 2019-05-16 | 2020-04-08 | 演算装置および演算方法 |
CN202080031698.7A CN113785312B (zh) | 2019-05-16 | 2020-04-08 | 运算装置及运算方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019092626A JP7177000B2 (ja) | 2019-05-16 | 2019-05-16 | 演算装置および演算方法 |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2020187608A JP2020187608A (ja) | 2020-11-19 |
JP2020187608A5 JP2020187608A5 (ja) | 2022-01-06 |
JP7177000B2 true JP7177000B2 (ja) | 2022-11-22 |
Family
ID=73223260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019092626A Active JP7177000B2 (ja) | 2019-05-16 | 2019-05-16 | 演算装置および演算方法 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11886874B2 (ja) |
JP (1) | JP7177000B2 (ja) |
CN (1) | CN113785312B (ja) |
WO (1) | WO2020230488A1 (ja) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7350768B2 (ja) | 2018-10-25 | 2023-09-26 | 株式会社半導体エネルギー研究所 | 検知装置、半導体装置 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180232621A1 (en) | 2017-02-10 | 2018-08-16 | Kneron, Inc. | Operation device and method for convolutional neural network |
WO2019029785A1 (en) | 2017-08-07 | 2019-02-14 | Renesas Electronics Corporation | MATERIAL CIRCUIT |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2864598B2 (ja) * | 1989-12-26 | 1999-03-03 | ソニー株式会社 | ディジタル演算回路 |
JP2821406B2 (ja) * | 1995-11-24 | 1998-11-05 | 日本電気アイシーマイコンシステム株式会社 | 積和演算器およびこれを用いたディジタルフィルタ回路 |
KR100222122B1 (ko) * | 1997-03-05 | 1999-10-01 | 선우명훈 | 단일의 천이누적 회로를 이용한 컨볼루션 필터 |
KR100235536B1 (ko) * | 1997-03-05 | 1999-12-15 | 선우명훈 | 전용의 곱셈기 및 나눗셈기가 없는 곱셈 및 나눗셈 연산회로 |
JP2001188468A (ja) * | 1999-12-27 | 2001-07-10 | Toyo Commun Equip Co Ltd | ガロア体上の元の除算演算方法および除算演算回路 |
JP4630056B2 (ja) * | 2004-12-24 | 2011-02-09 | 株式会社アドバンテスト | 畳み込み演算回路 |
WO2007096982A1 (ja) * | 2006-02-24 | 2007-08-30 | Fujitsu Limited | 演算処理装置および演算処理方法 |
JP2008059287A (ja) | 2006-08-31 | 2008-03-13 | Brother Ind Ltd | 画像処理装置および画像処理プログラム |
JP5014920B2 (ja) | 2007-08-17 | 2012-08-29 | ラピスセミコンダクタ株式会社 | 回路設計方法、ならびにその方法により製造される集積回路 |
US20130018932A1 (en) * | 2011-07-12 | 2013-01-17 | Hughes Network Systems, Llc | System and method for long range and short range data compression |
GB201607713D0 (en) * | 2016-05-03 | 2016-06-15 | Imagination Tech Ltd | Convolutional neural network |
GB2568660B (en) * | 2017-10-20 | 2020-10-14 | Graphcore Ltd | Generating Random Numbers Based on a Predetermined Probaility Distribution in an Execution Unit |
CN109409514A (zh) * | 2018-11-02 | 2019-03-01 | 广州市百果园信息技术有限公司 | 卷积神经网络的定点运算方法、装置、设备和存储介质 |
CN109711542B (zh) * | 2018-12-29 | 2020-08-18 | 西安交通大学 | 一种支持动态精度的dnn加速器及其实现方法 |
-
2019
- 2019-05-16 JP JP2019092626A patent/JP7177000B2/ja active Active
-
2020
- 2020-04-08 CN CN202080031698.7A patent/CN113785312B/zh active Active
- 2020-04-08 US US17/610,251 patent/US11886874B2/en active Active
- 2020-04-08 WO PCT/JP2020/015878 patent/WO2020230488A1/ja active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180232621A1 (en) | 2017-02-10 | 2018-08-16 | Kneron, Inc. | Operation device and method for convolutional neural network |
WO2019029785A1 (en) | 2017-08-07 | 2019-02-14 | Renesas Electronics Corporation | MATERIAL CIRCUIT |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7350768B2 (ja) | 2018-10-25 | 2023-09-26 | 株式会社半導体エネルギー研究所 | 検知装置、半導体装置 |
Also Published As
Publication number | Publication date |
---|---|
US11886874B2 (en) | 2024-01-30 |
WO2020230488A1 (ja) | 2020-11-19 |
US20220236985A1 (en) | 2022-07-28 |
JP2020187608A (ja) | 2020-11-19 |
CN113785312B (zh) | 2024-06-07 |
CN113785312A (zh) | 2021-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6540725B2 (ja) | 演算処理装置、方法、およびプログラム | |
JP7348971B2 (ja) | 畳み込みニューラルネットワークハードウエア構成 | |
JP6900487B2 (ja) | ハードウェアにおける平均プーリングの実行 | |
CN111353579B (zh) | 利用反向传播为深度神经网络选择量化参数的方法和系统 | |
CN110009099B (zh) | 用于确定表示dnn的层的值的定点数格式的方法和系统 | |
JP6540841B1 (ja) | 演算処理装置、情報処理装置、情報処理方法、およびプログラム | |
KR102637733B1 (ko) | 뉴럴 네트워크 프로세서 및 그것의 컨볼루션 연산 방법 | |
JP2019139338A (ja) | 情報処理装置、情報処理方法、およびプログラム | |
US11810330B2 (en) | Information processing apparatus, information processing method, non-transitory computer-readable storage medium | |
EP4033379A1 (en) | Implementing dilated convolution in hardware | |
JP7177000B2 (ja) | 演算装置および演算方法 | |
EP2940576A2 (en) | Approximating functions | |
US11907834B2 (en) | Method for establishing data-recognition model | |
JP2019211985A (ja) | 学習プログラム、学習方法、及び情報処理装置 | |
JP6886389B2 (ja) | 演算装置及び車載制御装置 | |
US20220405561A1 (en) | Electronic device and controlling method of electronic device | |
CN116151321A (zh) | 半导体装置 | |
US20210216867A1 (en) | Information processing apparatus, neural network computation program, and neural network computation method | |
JP5545128B2 (ja) | ジャギー緩和処理装置及びジャギー緩和処理方法 | |
WO2022102221A1 (ja) | Dnn縮約装置及び車載演算装置 | |
KR20050008812A (ko) | 화상 처리 방법, 계산 회로, 화상 처리 시스템, 셋톱 박스및 통신망 | |
JP3733883B2 (ja) | 2次元直交変換処理方法および2次元直交変換処理装置 | |
CN116888575A (zh) | 精简近似的基于共享的单输入多权重乘法器 | |
CN113822413A (zh) | 用于基于网络灵敏度和量化误差选择深度神经网络的数字格式的方法和系统 | |
CN112602097A (zh) | 数据处理系统和数据处理方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211122 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211122 |
|
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: 20221101 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221110 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7177000 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |