[ICCAD'20] GAMMA

GAMMA: Automating the HW Mapping of DNN Models on Accelerators via Genetic Algorithm

Sheng-Chun Kao, et.al. on November 2, 2020
doi.org
obsidian에서 수정하기

Abstract

DNN 계층은 DNN 가속기에서 공간과 시간에 걸쳐 다양한 방식으로 순서화, 타일링 및 스케줄링될 수 있는 다차원 루프입니다. 이러한 선택 중 각가를 매핑이라고 합니다. 매핑은 가속기가 DNN에서 활용할 수 있는 재사용 양을 직접 결정하므로 전체 성능과 효율성에 매우 중요한 역할을 합니다. 또한 모든 DNN 계층에 대해 고정된 매핑을 사용하는 대신, 계층별 매핑을 최적화하는 것이 유익하다는 연구 결과가 나왔습니다. 그러나 가속기와 계층을 고려할 때 올바른 매핑을 결정하는 것은 여전히 미해결 과제입니다. 방대한 매핑 공간(map-space)으로 인해 무차별 대입 검색 방법은 접근하기 어렵습니다. 본 논문에서는 이 HW 매핑 문제를 위해 특별히 설계된 도메인 특화 유전 알고리즘 기반 방법인 GAMMA를 제안합니다. 제한된 매핑 집합을 선택하거나 제한된 매핑 공간을 대상으로 하는 기존 연구와 달리, 우리는 매우 유연한 매핑 공간을 구성하고 GAMMA가 공간을 탐색하여 높은 샘플 효율성으로 최적화된 매핑을 결정할 수 있음을 보여줍니다. 우리는 많은 인기 있는 최적화 방법과 GAMMA를 정량적으로 비교하여 GAMMA가 일관되게 더 나은 솔루션을 찾는 것을 관찰했습니다.

Figure

figure 1

figure 2

Figure 3: - The GAMMA encoding example of (a) 1-level mapper and (b) 2-level mapper.

Figure 4: - (a) GAMMA’s description of a 2-level mapper and (b) its decoded description for cost model (maestro) of a NVDLA-like [1] 2-level mapper.

Figure 5: - (a)The structure and algorithm flow of GAMMA, and (b) the summary of evolution in gamma.

Figure 6: - The performance of found solutions across a suite of optimization methods on different target systems (s1, s2, s3) and different platform constraints (edge, cloud) for resnet-18. Nan: the method cannot find a solution that fits in the platform constraint within 10K samples.

Figure 7: - GAMMA’s found mapping of early, medium, and late layer

Figure 8: - The energy consumption of s2 on resnet-18.

Figure 9: - End-to-end latency improvement over generations with GAMMA for s3 system and edge platform constraint.

Table

Table 1:- Terminology in genetic algorithm (ga).

Table 2:- The HW resources in different platforms.

Table 3:- Three target systems (accel‘s infrastructures).

Table 4:- Baseline optimization methods.

Table 5:- End-to-end performance and energy on s3 for a suite of DNN models using fixed mappings versus gamma. Bold means lowest values.

Table 6:- Two stage optimization for inter-layer parallelism on resnet-18 * and vgg16 t for a multi-accelerator (S3) pipelined de-ployment. In the 1st state, we optimize for latency and identify the bottleneck layer (highlighted in bold), which determines the pipeline latency. In the 2nd stage, we optimize for energy (or power) by allowing the latency of other layers to increase, while staying less than the pipeline latency.