KR102455310B1 - 콘볼루션 신경망 양자화 추론 장치 및 방법 - Google Patents
콘볼루션 신경망 양자화 추론 장치 및 방법 Download PDFInfo
- Publication number
- KR102455310B1 KR102455310B1 KR1020200055313A KR20200055313A KR102455310B1 KR 102455310 B1 KR102455310 B1 KR 102455310B1 KR 1020200055313 A KR1020200055313 A KR 1020200055313A KR 20200055313 A KR20200055313 A KR 20200055313A KR 102455310 B1 KR102455310 B1 KR 102455310B1
- Authority
- KR
- South Korea
- Prior art keywords
- convolutional layer
- opencl
- kernel
- neural network
- matrix
- Prior art date
Links
- 238000013527 convolutional neural network Methods 0.000 title claims abstract description 45
- 238000013139 quantization Methods 0.000 title claims abstract description 41
- 238000000034 method Methods 0.000 title claims abstract description 30
- 239000011159 matrix material Substances 0.000 claims description 43
- 230000009466 transformation Effects 0.000 claims description 12
- 238000011773 genetically engineered mouse model Methods 0.000 claims 2
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 230000004913 activation Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 101100317378 Mus musculus Wnt3 gene Proteins 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
-
- 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
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Pure & Applied Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Mathematical Optimization (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
- Complex Calculations (AREA)
Abstract
Description
도 2는 실시예에 따른 콘볼루션 신경망 양자화 추론 방법을 설명하기 위한 신호 흐름도이다.
도 3은 도 2에 도시된 최적이 OpenCL 파라미터 및 커널 설정 단계(S230)를 설명하기 위한 순서도이다.
도 4는 벡터화를 이용한 콘볼루션 계층의 연산 과정을 설명하기 위한 도면이다.
도 5는 도 2에 도시된 콘볼루션 계층 병렬 처리 수행 단계(S250)를 상세히 설명하기 위한 순서도이다.
도 6은 8x8인 행렬에서 4x4 기준 행렬을 기준으로 인터리브를 수행하는 예시도이다.
도 7은 8x8인 행렬에서 1x4 기준 행렬을 기준으로 순서 변환을 수행하는 예시도이다.
도 8은 실시 예에 따른 양자화 추론 연산을 설명하기 위한 순서도이다.
도 9는 실시예에 따른 컴퓨터 시스템 구성을 나타낸 도면이다.
110 : 응용부 120 : 분석부
130 : 병렬 처리부
Claims (10)
- 콘볼루션 신경망 양자화 추론 장치에 의해 수행되는 콘볼루션 신경망 양자화 추론 방법에 있어서,
미리 학습된 콘볼루션 신경망에서 추론하고자 하는 입력 데이터의 특징 및 콘볼루션 계층 정보를 수신함에 따라, 입력 데이터의 특징 및 콘볼루션 계층 정보를 분석하여 임베디드 시스템의 하드웨어 플랫폼에 최적화된 OpenCL 파라미터 및 커널을 설정하는 단계: 및
설정된 OpenCL 파라미터 및 커널을 이용하여 콘볼루션 계층에 대한 양자화 추론을 수행하는 단계를 포함하고,
상기 OpenCL 파라미터 및 커널을 설정하는 단계는 입력 계층의 최대 데이터의 수, 해당 데이터의 채널, 해당 데이터의 높이, 해당 데이터의 넓이 중 적어도 어느 하나를 포함하는 상기 입력 계층의 데이터 배치 형태를 이용하여 OpenCL 파라미터 및 커널의 신규 설정 여부를 결정하고,
상기 양자화 추론을 수행하는 단계는,
OpenCL 커널이 벡터화만 적용하는 것이 아닐 경우, 콘볼루션 계층에서 연산을 수행할 행렬이 4의 배수가 아닐 경우 4의 배수가 되도록 각 행렬에 패딩을 추가하는 단계;
콘볼루션 계층의 가중치(weight)를 저장하고 있는 행렬에 대해서 지정된 행렬 크기를 기준으로 전체 행렬 영역을 분할한 후, 각 분할된 영역에서 열 순서대로 값을 재배치하는 인터리브 단계를 수행하는 단계;
콘볼루션 계층의 입력 데이터를 저장하고 있는 행렬에 대해서 지정된 행렬 크기를 기준으로 전체 행렬 영역을 분할한 후, 각 분할된 영역에서 행 순서대로 값을 재배치하는 순서 변환을 수행하는 단계;
패딩 추가 및 인터리브, 순서 변환이 수행된 행렬 A와 B에 대해 콘볼루션 계층의 연산을 수행하는 단계; 및
콘볼루션 계층 연산 수행 결과로부터 추가한 패딩을 제거하는 단계를 포함하는, 콘볼루션 신경망 양자화 추론 방법. - 제1 항에 있어서, 입력 데이터의 특징은
입력 이미지 또는 영상의 가로 및 세로의 크기, 입력 이미지 또는 영상의 채널(channel) 수 및 채널의 배치 순서 정보 중 적어도 하나를 포함하는, 콘볼루션 신경망 양자화 추론 방법. - 제1 항에 있어서, 콘볼루션 계층의 정보는,
입력 계층의 메모리 주소, 필터(filter)의 수, 필터의 크기, 필터 패딩(padding) 크기, 필터 스트라이드(stride) 크기 및 편향(bias) 사용 여부 중 적어도 하나를 포함하는, 콘볼루션 신경망 양자화 추론 방법. - 제1 항에 있어서, OpenCL 파라미터 및 커널을 설정하는 단계는,
상기 입력 계층의 데이터 배치 형태 및 콘볼루션 계층 정보 기준으로 콘볼루션 계층별로 식별자(ID)가 부여되어 저장되고, 식별자(ID) 별로 설정된 OpenCL 파라미터 및 커널이 매핑되어 있는 저장부를 검색하되,
입력 데이터 및 콘볼루션 계층 정보를 분석하여, 저장부에 입력 계층의 데이터 배치 형태 및 콘볼루션 계층에 상응하는 식별자가 존재하는지를 판단하는 단계;
입력 데이터 및 콘볼루션 계층 정보가 최초 수행될 경우, 해당 콘볼루션 계층이 최초 수행되는 경우, 선택 가능한 OpenCL 커널에 대해 연산 속도를 비교함으로써 최적 OpenCL 파라미터 및 커널을 신규 설정하는 단계; 및
해당 콘볼루션 계층이 이전에 수행된 이력이 있는 경우, 이전에 수행될 때 사용된 콘볼루션 계층에 미리 설정된 OpenCL 파라미터 및 커널로 설정하는 단계를 포함하는, 콘볼루션 신경망 양자화 추론 방법. - 삭제
- 제1 항에 있어서, 양자화 추론을 수행하는 단계는,
OpenCL 커널이 벡터화만 적용하는 것일 경우, 전달받은 입력 데이터 및 콘볼루션 계층의 정보를 이용하여 설정된 OpenCL 파라미터 및 커널을 기반으로 병렬 처리 연산을 수행하는, 콘볼루션 신경망 양자화 추론 방법. - 삭제
- 제1 항에 있어서, 양자화 추론을 수행하는 단계는,
설정된 필터 확인 변수가 참이 아닐 경우, 가중치에 대해 IM2COL(Image-to-Column) 연산을 수행하는, 콘볼루션 신경망 양자화 추론 방법. - 제1 항에 있어서, 양자화 추론을 수행하는 단계는,
가중치에 대해서 행렬 곱셈(GEMM: General Matrix Multiply, 이하 GEMM) 연산을 수행하는, 콘볼루션 신경망 양자화 추론 방법. - 적어도 하나의 프로그램이 기록된 메모리; 및
프로그램을 실행하는 프로세서를 포함하며,
프로그램은,
미리 학습된 콘볼루션 신경망에서 추론하고자 하는 입력 데이터의 특징 및 콘볼루션 계층 정보를 수신함에 따라, 입력 데이터의 특징 및 콘볼루션 계층 정보를 분석하여 임베디드 시스템의 하드웨어 플랫폼에 최적화된 OpenCL 파라미터 및 커널을 설정하는 단계: 및
설정된 OpenCL 파라미터 및 커널을 이용하여 콘볼루션 계층에 대한 양자화추론을 수행하는 단계를 수행하고,
상기 OpenCL 파라미터 및 커널을 설정하는 단계는 해당 계층의 최대 데이터의 수, 해당 데이터의 채널, 해당 데이터의 높이, 해당 데이터의 넓이 중 적어도 어느 하나를 포함하는 입력 계층의 데이터 배치 형태를 이용하여 OpenCL 파라미터 및 커널의 신규 설정 여부를 결정하고,
상기 양자화 추론을 수행하는 단계는,
OpenCL 커널이 벡터화만 적용하는 것이 아닐 경우, 콘볼루션 계층에서 연산을 수행할 행렬이 4의 배수가 아닐 경우 4의 배수가 되도록 각 행렬에 패딩을 추가하는 단계;
콘볼루션 계층의 가중치(weight)를 저장하고 있는 행렬에 대해서 지정된 행렬 크기를 기준으로 전체 행렬 영역을 분할한 후, 각 분할된 영역에서 열 순서대로 값을 재배치하는 인터리브 단계를 수행하는 단계;
콘볼루션 계층의 입력 데이터를 저장하고 있는 행렬에 대해서 지정된 행렬 크기를 기준으로 전체 행렬 영역을 분할한 후, 각 분할된 영역에서 행 순서대로 값을 재배치하는 순서 변환을 수행하는 단계;
패딩 추가 및 인터리브, 순서 변환이 수행된 행렬 A와 B에 대해 콘볼루션 계층의 연산을 수행하는 단계; 및
콘볼루션 계층 연산 수행 결과로부터 추가한 패딩을 제거하는 단계를 포함하는 것
인 콘볼루션 신경망 양자화 추론 장치.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200055313A KR102455310B1 (ko) | 2020-05-08 | 2020-05-08 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
KR1020220128648A KR102545658B1 (ko) | 2020-05-08 | 2022-10-07 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200055313A KR102455310B1 (ko) | 2020-05-08 | 2020-05-08 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020220128648A Division KR102545658B1 (ko) | 2020-05-08 | 2022-10-07 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210136700A KR20210136700A (ko) | 2021-11-17 |
KR102455310B1 true KR102455310B1 (ko) | 2022-10-18 |
Family
ID=78703031
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020200055313A KR102455310B1 (ko) | 2020-05-08 | 2020-05-08 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
KR1020220128648A KR102545658B1 (ko) | 2020-05-08 | 2022-10-07 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020220128648A KR102545658B1 (ko) | 2020-05-08 | 2022-10-07 | 콘볼루션 신경망 양자화 추론 장치 및 방법 |
Country Status (1)
Country | Link |
---|---|
KR (2) | KR102455310B1 (ko) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20240035013A (ko) | 2022-09-08 | 2024-03-15 | 한양대학교 산학협력단 | 뉴럴 네트워크의 파라미터 양자화 방법 및 장치 |
KR102577125B1 (ko) * | 2023-02-16 | 2023-09-12 | (주)밀 | 경량화된 인공신경망 모델 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170103299A1 (en) * | 2015-10-07 | 2017-04-13 | Altera Corporation | Method and Apparatus for Implementing Layers on a Convolutional Neural Network Accelerator |
US20180308208A1 (en) | 2017-04-24 | 2018-10-25 | Intel Corporation | Compute optimization mechanism for deep neural networks |
US20180308206A1 (en) | 2017-04-24 | 2018-10-25 | Prasoonkumar Surti | Compute optimization mechanism for deep neural networks |
US20180307987A1 (en) | 2017-04-24 | 2018-10-25 | Intel Corporation | Hardware ip optimized convolutional neural network |
US20180315158A1 (en) | 2017-04-28 | 2018-11-01 | Intel Corporation | Programmable coarse grained and sparse matrix compute hardware with advanced scheduling |
US20190114533A1 (en) | 2017-10-17 | 2019-04-18 | Xilinx, Inc. | Machine learning runtime library for neural network acceleration |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108073549B (zh) * | 2016-11-14 | 2021-04-27 | 耐能股份有限公司 | 卷积运算装置及方法 |
KR102415508B1 (ko) * | 2017-03-28 | 2022-07-01 | 삼성전자주식회사 | 컨볼루션 신경망 처리 방법 및 장치 |
KR102728799B1 (ko) | 2017-09-25 | 2024-11-11 | 삼성전자주식회사 | 인공 신경망의 양자화 방법 및 장치 |
KR102228586B1 (ko) * | 2018-01-19 | 2021-03-16 | 한국전자통신연구원 | Gpu 기반의 적응적 blas 연산 가속화 장치 및 방법 |
US11880760B2 (en) * | 2019-05-01 | 2024-01-23 | Samsung Electronics Co., Ltd. | Mixed-precision NPU tile with depth-wise convolution |
-
2020
- 2020-05-08 KR KR1020200055313A patent/KR102455310B1/ko active IP Right Grant
-
2022
- 2022-10-07 KR KR1020220128648A patent/KR102545658B1/ko active IP Right Grant
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170103299A1 (en) * | 2015-10-07 | 2017-04-13 | Altera Corporation | Method and Apparatus for Implementing Layers on a Convolutional Neural Network Accelerator |
US20180308208A1 (en) | 2017-04-24 | 2018-10-25 | Intel Corporation | Compute optimization mechanism for deep neural networks |
US20180308206A1 (en) | 2017-04-24 | 2018-10-25 | Prasoonkumar Surti | Compute optimization mechanism for deep neural networks |
US20180307987A1 (en) | 2017-04-24 | 2018-10-25 | Intel Corporation | Hardware ip optimized convolutional neural network |
US20180315158A1 (en) | 2017-04-28 | 2018-11-01 | Intel Corporation | Programmable coarse grained and sparse matrix compute hardware with advanced scheduling |
US20190114533A1 (en) | 2017-10-17 | 2019-04-18 | Xilinx, Inc. | Machine learning runtime library for neural network acceleration |
Also Published As
Publication number | Publication date |
---|---|
KR20220143792A (ko) | 2022-10-25 |
KR102545658B1 (ko) | 2023-06-21 |
KR20210136700A (ko) | 2021-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240161474A1 (en) | Neural Network Inference Acceleration Method, Target Detection Method, Device, and Storage Medium | |
CN110555450B (zh) | 人脸识别神经网络调整方法和装置 | |
KR20220143792A (ko) | 콘볼루션 신경망 양자화 추론 장치 및 방법 | |
CN111931917B (zh) | 前向计算的实现方法及装置、存储介质、电子装置 | |
US20210133278A1 (en) | Piecewise quantization for neural networks | |
CN111047563B (zh) | 一种应用于医学超声图像的神经网络构建方法 | |
TW201915839A (zh) | 對人工神經網路及浮點神經網路進行量化的方法及裝置 | |
CN110363297A (zh) | 神经网络训练及图像处理方法、装置、设备和介质 | |
CN108776833B (zh) | 一种数据处理方法、系统及计算机可读存储介质 | |
CN111796917B (zh) | 算子运算调度方法和装置 | |
KR20200111948A (ko) | 인공 신경망을 처리하는 방법 및 이를 위한 전자 장치 | |
CN112200296A (zh) | 网络模型量化方法、装置、存储介质及电子设备 | |
CN117196000A (zh) | 一种容器化部署的边缘侧模型推理加速方法 | |
KR20190093932A (ko) | 딥러닝 시스템에서의 연산 처리 장치 및 방법 | |
CN111582444A (zh) | 一种矩阵数据的处理、装置、电子设备及存储介质 | |
CN111344719A (zh) | 基于深度神经网络的数据处理方法、装置及移动设备 | |
CN114781650A (zh) | 一种数据处理方法、装置、设备以及存储介质 | |
CN118428450A (zh) | 一种异构集群的模型训练方法、系统、电子设备及介质 | |
CN116991560A (zh) | 针对语言模型的并行调度方法、装置、设备及存储介质 | |
KR102384588B1 (ko) | 신경망 연산방법 및 신경망 가중치 생성방법 | |
US20220405561A1 (en) | Electronic device and controlling method of electronic device | |
CN113971454A (zh) | 深度学习模型的量化方法和相关装置 | |
KR20210138382A (ko) | 뉴럴 네트워크에서의 다중 레벨 단계적 양자화 방법 및 장치 | |
US20230252264A1 (en) | Neural network processing | |
KR102426605B1 (ko) | 인공신경망 모델을 이용한 데이터 분석 방법 및 장치 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20200508 |
|
AMND | Amendment | ||
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 20200922 Comment text: Request for Examination of Application Patent event code: PA02011R01I Patent event date: 20200508 Comment text: Patent Application |
|
PG1501 | Laying open of application | ||
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20211118 Patent event code: PE09021S01D |
|
AMND | Amendment | ||
E601 | Decision to refuse application | ||
PE0601 | Decision on rejection of patent |
Patent event date: 20220530 Comment text: Decision to Refuse Application Patent event code: PE06012S01D Patent event date: 20211118 Comment text: Notification of reason for refusal Patent event code: PE06011S01I |
|
AMND | Amendment | ||
PX0901 | Re-examination |
Patent event code: PX09011S01I Patent event date: 20220530 Comment text: Decision to Refuse Application Patent event code: PX09012R01I Patent event date: 20220118 Comment text: Amendment to Specification, etc. Patent event code: PX09012R01I Patent event date: 20200922 Comment text: Amendment to Specification, etc. |
|
PX0701 | Decision of registration after re-examination |
Patent event date: 20220713 Comment text: Decision to Grant Registration Patent event code: PX07013S01D Patent event date: 20220629 Comment text: Amendment to Specification, etc. Patent event code: PX07012R01I Patent event date: 20220530 Comment text: Decision to Refuse Application Patent event code: PX07011S01I Patent event date: 20220118 Comment text: Amendment to Specification, etc. Patent event code: PX07012R01I Patent event date: 20200922 Comment text: Amendment to Specification, etc. Patent event code: PX07012R01I |
|
X701 | Decision to grant (after re-examination) | ||
PA0107 | Divisional application |
Comment text: Divisional Application of Patent Patent event date: 20221007 Patent event code: PA01071R01D |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20221012 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20221013 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration |