프로젝트/GCN Accelerator

[2021 ISCAS] Characterizing the Communication Requirements of GNN Accelerators : A Model-Based Approach

아이스얼그레이 2022. 9. 4. 16:08

* 해당 게시글의 모든 그림과 일부 내용은 논문 본문에서 발췌했습니다.

 

 기존에 연구된 GNN accelerator을 조사하기 위해 논문을 리뷰합니다. 2021년에 ISCAS(IEEE International Symposium on Circuits and Systems)에 출판된 논문입니다. 신기하게도 이 논문이 발표된 Conference가 대구 인터불고 호텔에서 열렸다고 합니다. 제가 사는 지역에서 Conference가 열렸다니 신기하네요.

 

1. Abstract & Introduction

 본 논문에 따르면 [1] 여러 GNN algorithm을 지원하는 accelerator가 연구되었지만 Thoughput, energy consumption과 같은 지표들만 확인했고 accelerator 내부의 data movement에 대한 명확한 연구는 아직 이뤄지지 않았다고 합니다. 또한 data movement는 on-chip interconnect이 어떤 식으로 이뤄져야 하는 지를 결정하며, accelerator의 latency와 energy consumption에 큰 영향을 미칩니다.

 

 이러한 점에서 GNN accelerator 설계의 한 중요한 축은 chip 내부의 data movement를 최소화하는 것입니다. 이는 memory access를 줄여야 한다는 기존 ML accelerator의 방향과 일맥상통합니다.

 

 따라서 본 논문은 GNN accelerator의 data movement에 주목했으며 다음과 같은 contribution을 제시합니다.

 

1. GNN accelerator의 dataflow와 HW design이 전체 데이터 이동에 미치는 영향을 설명하는 분석 모델

2. 최신 GNN accelerator인 EnGN, HyGCN을 제안된 모델로 평가

 

2. GNN accelerator Background

2-1. Overall

GNN accelerator은 GNN algorithm의 변수들을 처리하는 것을 목적으로 하는 ASIC입니다. 이때 GNN accelerator 설계의 challenging한 점은 매우 dense한 computation phase와 매우 sparse한 computation phase가 교대로 나타난다는 것입니다.

 

 본 논문에 따르면 [2] Computation의 sparsity는 graph connectivity 또는 graph adjacency matrix로부터 나타나며,

Dense computation phase는 node와 edge에 병렬적으로 적용되는 연산이 본질적으로 dense하기 때문에 나타납니다.(아마 다량의 MAC 연산 때문이 아닌가 추측해봅니다.)

 

 또한 GNN의 input으로 들어가는 graph는 불균등한 connectivity를 가진 수백만 개의 nodes와 edges를 가집니다. 이런 특성으로 인해 GNN의 연산은 본직적으로 불균등할 뿐만 아니라, CNN과 다른 workload profile을 나타냅니다.

 

 다음 Figure은 GNN accelerator의 일반적인 architecture와 이에 상응하는 input과 output을 나타냅니다.

 구체적으로[3] Acceleration engine은 graph 자료구조를 input으로 받아서 tiling/graph partitioning과 같은 pre-processing을 수행합니다. 이때 pre-processing된 data는 Processing engine의 input이 됩니다. 이때 Processing engine은 architecture와 정의된 dataflow를 따릅니다.(설계자의 의도가 들어가는 부분인 것 같습니다.)

 

 그리고 Processing engine은 Graph partition을 처리하여 output을 내놓습니다. 이때 output은 일반적으로 각 node, edge 또는 전체 graph의 feature 정보를 담고 있는 vector입니다.

 

 여기서 Processing Engine 내부에 대량의 Processing Element Array(이하 PEs)가 들어갑니다. 제가 알기로, 각 PE에는 일반적인 연산을 처리할 수 있는 ALU가 들어가는 게 아닌 가속이 필요한 특정 연산을 위한 연산기만 들어가는 것으로 알고 있습니다. CNN accelerator(Eyeriss - 2016 ISSCC)의 경우에는 각 PE에 2 stage Multiplier와 Accumulator가 들어가며 MAC 연산을 가속하는 데 사용됩니다.

 

 GNN에서 발생하는 instruction들은 CNN과는 그 양상이 다르겠지만, Feature matrix와 Adjacency matrix를 연산해야 하므로 다량의 MAC 연산이 발생한다는 것은 예상할 수 있습니다.

 

2-2. GNN Inference process

GNN에서 Inference 즉, 추론은 Aggregation과 Combination이라는 두 단계로 나눠집니다. 먼저 Memory hierarchy에서 edge 혹은 node data를 Processing Element Array(PEs)로 가져옵니다.

 

Aggregation stage

node 혹은 edge의 feature들이 Adjacency matrix를 따라 주변에 있는 node 혹은 edge의 feature들과 더해집니다. 이때 인접한 node 혹은 edge의 Adjacency matrix를 Accumulation하는 연산이 발생하므로 PE 사이에 data movement를 발생시킵니다. 그 후 Combination stage가 진행됩니다.

 

Combination stage

Aggregation을 수행한 node 혹은 edge의 feature들을 Aggregated feature라고 부릅니다. 이 Aggregated feature들은 matrix-vectore multiplications와 non-linear activation function과 같은 Neural Network operation으로 변환됩니다.

 

3. Conclusion

결론입니다.

 

 본 논문은 [4] 분석 모델을 기반으로 GNN accelerator 내부에서 발생하는 data movement의 characterization method를 제시했습니다. 제안된 method는 다른 architecture를 비교하고 그것들의 design을 파악하는데 도움이 될 것 같다고 합니다. 또한 논문에서 수행한 작업에서 다음 내용을 관찰했습니다.

 

1. Aggregation phase에서 다량의 data movement가 발생한다.

2. 두 가지 Architecture(EnGN, HyGCN)은 완전히 다른 방법으로 확장한다.

명확한 의미는 모르겠습니다..

3. Memory 부족이 전체 iteration 횟수를 늘리고, 이는 latency에 악영향을 미친다.


발췌한 본문

 

[1] While the accelerator designs verify their performance through metrics such as throughput and overall energy consumption, an explicit study on the data movement within the accelerators is absent.

 

[2] The sparsity is driven by the graph connectivity or the graph adjacency matrix. On the other hand, phases of dense computations are usually due to the dense nature of the operations that are applied to the nodes and edges in parallel.

 

[3] Concretely, the acceleration engine takes as input a graph data structure and performs some initial pre-processing, such as tiling/graph partitioning. This is then fed to the processing engine, which depending on its architecture and the predefined dataflow, processes the incoming graph partitions to yield an output. This output is generally a vector of features (i.e. predictions) for either a node, an edge, or the entire graph.

 

[4] We have presented a characterization method of the data movement within GNN accelerators based on analytical models. As a precursor of communication requirements, the proposed method can help comparing different architectures and explore their design spaces.