Publications

Detailed Information

U-Net의 FPGA 구현을 위한 효율적인 resource 사용 : Efficient resource utilization for an FPGA implementation of U-Net

Cited 0 time in Web of Science Cited 0 time in Scopus
Authors

제현승

Advisor
이혁재
Issue Date
2021-02
Publisher
서울대학교 대학원
Keywords
FPGA 디자인Segmentation 네트워크U-Net 네트워크Loop Interchange 기법FPGASegmentation networkU-NetLoop Interchange
Description
학위논문 (석사) -- 서울대학교 대학원 : 공과대학 전기·정보공학부, 2021. 2. 이혁재.
Abstract
최근 FPGA가 가지고 있는 GPU와 CPU 대비 low power consumption에 관한 장점과 구현의 flexibility로 다양한 형태의 하드웨어가 가능하기 때문에 CNN Network의 구현에 대한 많은 연구의 진행이 이루어 지고 있다. 그러나 대부분의 FPGA CNN 가속기 연구는 classification network를 대상으로 이루어져 왔다. 최근 segmentation network가 자율 주행과 의료 서비스 등 다양한 분야에 활용됨을 고려하였을 때 segmentation network의 FPGA상에서의 구동에 관한 연구 또한 필요함을 나타낸다.
FPGA 상에서의 CNN Network의 구동은 convolution layer 동작의 특징인 여러 loop의 반복을 통한 MAC 연산으로 이루어 진다. 이 때 loop가 진행되는 순서에 따라서 on-chip과 외부 메모리 간의 data 이동 량과 필요한 on-chip buffer size가 달라지게 된다. 따라서 해당 하드웨어 resource의 소모를 고려하여 target으로 하고 있는 FPGA에 적합한 Loop interchange scheme의 분석과 선정이 필요하다.
본 논문에서는 기존 Loop interchange scheme 중 하나인 Row-based reuse 방식이 가지고 있는 문제점을 보안한 Adaptive Row-based reuse 방식을 제안한다. 해당 방식은 FPGA 디자인의 설계 시 설정한 input과 output buffer size를 기반으로 최대로 저장할 수 있는 feature map의 row 수를 결정한 후 해당 multiple row들에 대해서 weight block과 함께 convolution을 진행한다. 해당 방식을 통해 CNN Network의 layer 별로 달라지는 feature map size에 영향 받지 않고 on-chip buffer에 data를 최대로 저장할 수 있다. 또한 convolution 진행 시간에 비해 다음 channel에서 사용할 weight를 load 하는 시간이 hide 되지 못하여 발생하는 latency 또한 convolution을 진행하는 range를 expand 하면서 해결한다.
제안하는 Adaptive row-based reuse 방식을 검증하고자 대표 segmentation network U-Net을 구동하는 하드웨어를 설계하여 실제 동작을 구현하였다. Convolution과 Up-convolution을 동일한 process element에서 동작이 가능하도록 설계하여 DSP와 같은 resource의 낭비를 방지하였으며 weight와 data bit를 8bit로 설정하는 대신 batch normalization을 수행하는 모듈에서 weight quantization의 scale이 batch normalization scale과 folding 되어 convolution을 진행하면서 성능의 유지를 가능하게 한다.
본 연구는 width에 대한 tiling factor를 input feature map의 전체 width로 설정하는 대신 height에 대한 tiling factor를 multiple row로 설정하여 on-chip buffer의 최대 효율을 위한 tiling 진행이 가능하다는 점에서 기존 연구와의 차이점을 가지고 있다. 제안하는 방식은 Xilinx KCU 1500 board를 대상으로 구현하였으며 기존 row-based reuse 방식의 적용 시 보다 layer 별로 feature map size에 무관하게 일정한 연산 성능을 나타내고 있음을 확인하였고 U-Net network 전체에 대해서 1.2배의 성능 향상을 확인하였다. 또한 computation range의 증가로 FPGA의 외부 메모리와의 필요 bandwidth 또한 2배 가량 감소함을 확인하였다. 해당 adaptive-row reuse 방식의 적용으로 layer 별 feature map size의 변화가 있는 segmentation network의 구동에 대해서 FPGA의 resource의 효율적인 활용을 가능하게 한다.
There is an increasing need and research to implement the Convolutional Neural network with an FPGA thanks to its design flexibility to design any form of hardware and low power consumption over GPU and CPU. However, most FPGA CNN accelerator studies are targeted at classification networks. Therefore, considering the recent use of segmentation networks in various areas such as autonomous driving and medical services, it is also necessary to research the operation of the segmentation network on the FPGA.
Convolution on FPGA is composed of multiple loops, and the output is calculated through MAC operation with repetition of multiple loops. The order in which loops are performed determines the required on-chip buffer size and the amount of data movement between on-chip and external memory. Therefore, it is necessary to select the suitable loop interchange scheme considering the consumption of the hardware resource in target FPGA.
In this paper, the Adaptive row-based reuse scheme is proposed that resolves the problem from original row-based reuse scheme, one of the existing loop interchange schemes. The proposed scheme determines the maximum number of rows of feature map that can be stored in on-chip buffer based on the input and output buffer size. This method allows maximum data to be stored in on-chip buffer without being affected by the feature map size which is different by layers. Also, the latency caused by load time of weights used in next tile is solved by expanding the range of the convolution.
This paper also implemented the hardware design on FPGA to deploy u-net, the representative segmentation network, by applying the proposed adaptive row-based reuse scheme. Convolution and Up-convolution were designed to be operated in the same process element to prevent waste of resources in FPGA. It maintains the segmentation performance even with the 8 bits of weight and data by folding the weight quantization scale and batch normalization scale in batch normalization module.
In this study, tiling factor is set for width of the input feature map and multiple row so that enable to efficiently use of the on-chip buffer making difference from the existing research. The proposed design is implemented with a Xilinx KCU 1500 board, and the design achieves robust computational performance regardless of the input feature map size, and 1.2x performance increase comparing original row-based reuse scheme. Also, with the expansion of computation range, the require bandwidth between DRAM and on-chip is double decreased.
Language
kor
URI
https://hdl.handle.net/10371/175301

https://dcollection.snu.ac.kr/common/orgView/000000165014
Files in This Item:
Appears in Collections:

Altmetrics

Item View & Download Count

  • mendeley

Items in S-Space are protected by copyright, with all rights reserved, unless otherwise indicated.

Share