[논문 리뷰] Automated flow for compressing convolution neural networks for efficient edge-computation with FPGA
이 논문은 FPGA 기반 엣지 디바이스에 이진화된 합성곱 신경망(CNN)을 압축하고 배포하는 자동화된 엔드 투 엔드 플로우를 제안한다. 가중치를 1비트로, 활성화를 2비트로 양자화하고, 고수준 합성(HLS)을 통해 최적화된 C 코드와 FPGA 가속기 생성하며, 모바일 CPU 대비 이진화된 합성곱에서 11.5배의 성능 향상을 달성했고, 전체 합성 시간이 1시간 이내였다. 이는 Cyclone-V FPGA SoC에 배포된 YOLOv2에서 입증되었다.
Deep convolutional neural networks (CNN) based solutions are the current state- of-the-art for computer vision tasks. Due to the large size of these models, they are typically run on clusters of CPUs or GPUs. However, power requirements and cost budgets can be a major hindrance in adoption of CNN for IoT applications. Recent research highlights that CNN contain significant redundancy in their structure and can be quantized to lower bit-width parameters and activations, while maintaining acceptable accuracy. Low bit-width and especially single bit-width (binary) CNN are particularly suitable for mobile applications based on FPGA implementation, due to the bitwise logic operations involved in binarized CNN. Moreover, the transition to lower bit-widths opens new avenues for performance optimizations and model improvement. In this paper, we present an automatic flow from trained TensorFlow models to FPGA system on chip implementation of binarized CNN. This flow involves quantization of model parameters and activations, generation of network and model in embedded-C, followed by automatic generation of the FPGA accelerator for binary convolutions. The automated flow is demonstrated through implementation of binarized "YOLOV2" on the low cost, low power Cyclone- V FPGA device. Experiments on object detection using binarized YOLOV2 demonstrate significant performance benefit in terms of model size and inference speed on FPGA as compared to CPU and mobile CPU platforms. Furthermore, the entire automated flow from trained models to FPGA synthesis can be completed within one hour.
연구 동기 및 목표
- 에너지 및 비용이 제한된 엣지 디바이스에 대규모이고 전력 소모가 큰 딥 CNN을 배포하는 데 도전하는 문제를 해결한다.
- 자동화된 양자화와 하드웨어 생성을 통해 저전력 FPGA에서 CNN의 모델 크기와 추론 지연 시간을 줄인다.
- 데이터 순서와 메모리 액세스 패턴을 최적화하여 이진화된 CNN에 대한 효율적인 FPGA 가속을 가능하게 한다.
- 학습된 텐서플로우 모델에서부터 FPGA 합성 가능 하드웨어 가속기까지의 완전 자동화된 파이프라인을 개발한다.
제안 방법
- 학습된 텐서플로우 모델을 첫 번째 및 마지막 레이어를 제외하고 1비트 가중치와 2비트 활성화로 양자화한다.
- 텐서플로우 프로토콜 버퍼 형식에서 양자화된 모델을 파싱하고, 부동소수점 연산을 비트 수준 등가로 대체하기 위한 그래프 수준 변환을 적용한다.
- 양자화된 네트워크를 위한 컴act하고 독립적인 임베디드-C 코드를 생성하여 현장 내 실행을 효율적으로 구현한다.
- 모델의 계산 및 메모리 요구사항에 맞게 고수준 합성(HLS)을 사용해 자동으로 FPGA 가속기를 생성한다.
- 로컬 RAM에서 비트 마스킹 오버헤드를 줄이고 메모리 액세스 연속성을 향상시키기 위해 깊이 우선 데이터 순서 전략을 구현한다.
- 합성곱 연산 중에 스트림 성능을 향상시키고 병렬 처리를 통해 처리량을 증가시키기 위해 커널 간 병렬 처리를 가능하게 한다.
실험 결과
연구 질문
- RQ1자동화된 플로우가 저전력 FPGA에서 이진화된 CNN의 모델 크기와 추론 지연 시간을 크게 줄일 수 있는가?
- RQ2깊이 우선 데이터 순서 전략이 FPGA 기반 이진화된 CNN 가속기에서 메모리 액세스 효율성 향상과 하드웨어 복잡도 감소에 얼마나 효과적인가?
- RQ3이진화된 CNN 추론에서 FPGA 기반 가속이 성능과 에너지 효율 측면에서 모바일 및 일반 목적 CPU를 얼마나 뛰어나게 하는가?
- RQ4학습된 텐서플로우 모델을 합성 가능한 FPGA 가속기로 변환하는 데 걸리는 종단 간 시간 비용은 얼마이며, 인간 간섭 최소화로 가능할까?
주요 결과
- 제안된 자동화된 플로우는 학습된 텐서플로우 모델을 약 1시간 이내로 완전히 합성된 FPGA 가속기로 변환한다.
- 압축된 이진화된 YOLOv2 모델은 원본 255.82 MB 대비 32배 작아진 8.26 MB로 축소되었다.
- FPGA 가속된 이진화된 합성곱은 모바일 CPU 대비 11.5배 빠르며, 고성능 데스크톱 CPU(Core i7-6800K) 대비 1.21배 빠르게 작동한다.
- FPGA-SoC에서의 총 추론 시간은 모바일 CPU 대비 5.34배 빠르지만, Core i7 CPU에 비해 여전히 1.78배 느리다.
- 깊이 우선 데이터 순서 전략은 더 효율적인 비트 팩킹을 가능하게 하며, 다중 메모리 액세스와 마스킹 연산의 필요성을 줄인다.
- 커널 간 병렬 처리와 최적화된 메모리 액세스 조합으로 FPGA에서 더 나은 버스트 성능과 더 깔끔한 메모리 쓰기 회로 구조를 달성한다.
더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.