Computer systems deploy memory hierarchy to capture frequently-used data on fast memory for reducing memory access latency. There have been two different approaches to capture this data: hardware-based and software-controlled. In hardware-based ap- proach, such as hardware cache, there exist dedicated storage and logics to detect and capture the frequently-used data. On the other hand, software-controlled approach uses a simple SRAM memory referred as SPM (Scratchpad Memory) and manages the caching logic using software instructions.This thesis studies efficient use of software-controlled memories on two different ar- chitectures: CPU-centric and accelerator architectures. Hardware cache has been popular in traditional CPU-centric architectures due to its ability to capture dynamic changes of access patterns at run-time. However, this ability comes at the cost of additional hardwares such as tag arrays and caching logics. These additional components deteriorate the area and energy efficiency so that it can limit use of caches in resource-constrained embedded systems. Also, SPMs exhibit better access latency and predictability, which are also desired properties in embedded systems; there is no miss in SPMs so the memory access time can be predicted more accurately. As a result, many researches have proposed the architectures using SPMs instead of caches to avoid power-hungry logics and exploit efficiency of SPMs. In this context, this thesis proposes three orthogonal techniques to optimize the code management efficiency on these SPM-based architectures.On the other hand, in accelerator architectures, SPM is more common due to its simple design and predictable access latency along with the regularity of the application (e.g., convolutional neural network). In these systems, programmer or compiler should provide explicit data movement schedule (e.g., the sizes of data movements in memory hierarchy and their access orderings) since SPMs are controlled purely in software. Therefore, an algorithm can be executed in numerous different styles depending on these data movement schedule choices, called dataflows. Since the data-reuse rate and parallelism among the processors can vary significantly with each dataflow, it is crucial to find the efficient dataflow, specifically for the given algorithm and the accelerator configurations, to ensure the best performance of the accelerator execution. As a second topic, this thesis studies how we can efficiently find out the optimized dataflow of perfectly-nested loops on accelerator architecture.
컴퓨터 시스템에서는 메모리 계층을 구성하여 자주 사용되는 데이터를 프로세서 에 가까운 작고 빠른 메모리에 보관함으로써 메모리 접근 비용을 감소시킨다. 이 때 자주 사용되는 데이터를 포착하는 방법에는 두 가지 방법이 연구되어 왔으며, 하드 웨어 기반 기법과 소프트웨어 기반 기법으로 분류할 수 있다. 하드웨어 기반 기법은 하드웨어 캐시가 대표적이며, 자주 사용되는 데이터를 포착하기 위한 전용 공간과 하드웨어 로직을 사용한다. 반면, 소프트웨어 기반 기법에서는 스크래치패드 메모리 (Scratchpad Memory, SPM) 라고 불리는 단순한 디자인의 SRAM 메모리를 두고 데이 터의 포착은 소프트웨어 명령어를 통하여 수행한다.본 논문은 CPU 기반 아키텍처 및 가속기 환경에서 소프트웨어 기반 메모리를 효 율적으로 사용하는 방법을 제안한다. CPU 기반 환경에서는 하드웨어 캐시가 주로 사 용되어 왔는데 이는 다양하고 예측이 어려운 프로그램을 수행하는 CPU 의 지역성을 캐시가 효과적으로 포착할 수 있기 때문이었다. 그러나 캐시 일관성 프로토콜에 의한 낮은 확장성은 현재의 멀티코어 또는 매니코어 환경에서 주요한 성능 병목의 원인이 되고 있다. 또한 내장형 시스템과 같이 자원이 제한된 환경에서는 캐시를 사용하기가 어려운데, 이는 캐시가 추가적인 하드웨어를 장착함으로써 낮은 공간 효율성과 에너 지 효율성을 갖기 떄문이다. 이러한 관점에서, 본 논문은 CPU 기반 환경에서 SPM 으로 캐시를 대체하는 방법에 대하여 연구하였다. 특히, 본 논문은 SPM 을 활용한 코 드 관리 기법과 그 최적화에 초점을 맞추었으며 세 가지의 코드 관리 최적화 기법을 제안하였다.반면 가속기 아키텍처는 convolutional neural network 과 같이 규칙적인 접근 패턴 을 가진 응용을 한정하여 설계되므로, 간단한 디자인과 높은 에너지 효율성 및 접근 속도를 갖는 SPM 이 일반적으로 사용되고 있다. SPM 은 소프트웨어로 제어되므로, 이러한 가속기에서는 프로그래머나 컴파일러가 명시적으로 데이터 이동 스케줄 (데 이터 이동의 단위나 접근 순서 등) 을 제공해 주어야 한다. 특히, 가속기가 대상으로 하는 응용들은 많은 연산량을 요구하고, 병렬성이 높은 경우가 많으며 데이터가 많 이 재사용되기 때문에 효율적인 데이터 이동 스케줄을 찾는 것이 매우 중요하다. 본 논문에서는 두 번째 연구결과로써 이러한 가속기 환경에서 perfectly-nested loop 의 데이터 이동을 최적화하는 방법을 제안한다. 본 기법으로 기존 기법들 대비 평균 9.16 배의 EDP (Energy-Delay Product) 향상된 데이터 이동 스케줄을 찾을 수 있었으며, 2.56%의 성능 하락만으로 기존에 수 일이 걸리던 최적 스케줄 탐색 작업을 초 단위로 줄일 수 있는 pruning 기법을 제시하였다.