KR20200088155A - Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof - Google Patents
Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof Download PDFInfo
- Publication number
- KR20200088155A KR20200088155A KR1020190004805A KR20190004805A KR20200088155A KR 20200088155 A KR20200088155 A KR 20200088155A KR 1020190004805 A KR1020190004805 A KR 1020190004805A KR 20190004805 A KR20190004805 A KR 20190004805A KR 20200088155 A KR20200088155 A KR 20200088155A
- Authority
- KR
- South Korea
- Prior art keywords
- image processing
- execution
- graph
- path
- processing graph
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F15/00—Digital computers in general; Data processing equipment in general
- G06F15/76—Architectures of general purpose stored program computers
- G06F15/78—Architectures of general purpose stored program computers comprising a single central processing unit
- G06F15/7807—System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/28—Indexing scheme for image data processing or generation, in general involving image processing hardware
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Stored Programmes (AREA)
Abstract
Description
본 발명은 이기종 온디바이스(on-device) 시스템에서 중앙 처리 장치(central processing unit; CPU)뿐만 아니라 그래픽 처리 장치(graphics processing unit; GPU), 디지털 신호 처리(digital signal processing) 장치, 신경망 처리 장치(neural processing unit; NPU) 등 다양한 컴퓨팅 자원 기반의 소프트웨어 라이브러리 조합으로 구성된 그래프 기반 영상 처리 모델을 효율적으로 실행하는 시스템에 관한 것이다.The present invention is a heterogeneous on-device (on-device) system as well as a central processing unit (central processing unit; CPU) as well as a graphics processing unit (graphics processing unit; GPU), digital signal processing (digital signal processing) device, neural network processing device ( It relates to a system that efficiently executes a graph-based image processing model composed of a combination of software libraries based on various computing resources such as a neural processing unit (NPU).
최근 머신 러닝 기술의 급속한 성장으로 인해 영상 인식 서비스가 보편화되면서 스마트폰과 같이 온디바이스 시스템에서도 컴퓨터 비전 처리 기능 탑재에 대한 수요가 급증하고 있다.With the rapid growth of machine learning technology in recent years, the demand for computer vision processing functions is rapidly increasing in on-device systems such as smartphones as video recognition services are becoming more common.
이에 따라 칩 제조사들은 임베디드(Embedded) 시스템 특성상 소모 전력을 최소화하면서 동시 성능을 높이기 위해 GPU, DSP 장치, NPU(Neural Processing Unit), 필드 프로그래머블 게이트 어레이(Field Programmable Gate Array; FPGA) 등 다양한 전용 시스템 온 칩(System on Chip; SoC)들을 탑재하고 있다.Accordingly, chip makers have turned on various dedicated systems such as GPUs, DSP devices, NPUs (Neural Processing Units), and Field Programmable Gate Arrays (FPGAs) to increase concurrent performance while minimizing power consumption due to the characteristics of embedded systems. It has System on Chip (SoC).
이들 전용 칩들은 미디어 인코더/디코더와 같이 초기에 특정 응용 프로그램이나 서비스에 특화되어 최적의 성능을 얻기 위해 사용되었지만, 점차 다른 응용 프로그램이나 다른 서비스에서도 이러한 컴퓨팅 리소스를 활용하는 이기종 컴퓨팅(Heterogeneous Computing) 기술이 필요해 지고 있다.These dedicated chips were initially used to obtain optimal performance by specializing in a specific application or service, such as a media encoder/decoder, but increasingly, heterogeneous computing technology that utilizes these computing resources in other applications or services This is becoming necessary.
이를 위해 국제 표준 단체인 크로노스 그룹에서는 OpenVX 표준을 통해 영상 처리에 필요한 기본 영상 처리 기능들을 소프트웨어 라이브러리 형태로 제공될 수 있도록 세분화하여 정의하였으나, 일반적으로 세분화된 라이브러리와 그래픽 기반 응용 모델링 기법은 복잡한 영상 처리 응용을 개발할 경우 다음과 같은 문제점이 있다.To this end, the international standard organization, Kronos Group, has defined and defined the basic image processing functions necessary for image processing through the OpenVX standard in the form of software libraries, but in general, the subdivided library and graphic-based application modeling techniques are complex image processing. There are the following problems when developing applications.
첫 번째로 라이브러리의 세분화는 그래픽 기반의 개발 환경으로 응용을 쉽게 구현할 수 있는 장점이 있다. 하지만 이를 위해서는 각 처리 모듈에 대한 인터페이스가 단순하게 되어 복합적인 입력 데이터를 처리하기 위해서는 그래픽 기반 응용 모델러를 통해 다수개의 영상처리 노드들과 파이프라인 형태의 노드 별 실행 흐름을 통해 정의하게 된다. 따라서, 실행 모델은 영상 처리를 위한 각 단위 기능이 노드 별로 구성되고, 이 노드들은 실행 순서에 맞게 순차적으로 실행하게 된다. 이러한 응용 모델로부터 자동 생성된 코드들은 목표로 하는 기능을 수행하기 위해 간략한 구조로 표현된 코드로서 실행하는데 문제는 없으나 성능을 높이거나 최적화하기 위해서는 여전히 개발자가 직접 코드를 추가로 수정해야 하는 문제가 있다First, the segmentation of the library has the advantage of easily implementing an application as a graphic-based development environment. However, for this purpose, the interface to each processing module is simplified, and in order to process complex input data, it is defined through a plurality of image processing nodes and pipelined node-specific execution flows through a graphical application modeler. Therefore, in the execution model, each unit function for image processing is configured for each node, and these nodes are sequentially executed according to the execution order. Codes generated automatically from these application models do not have any problems to execute as code expressed in a simple structure in order to perform a target function, but there are still problems in which developers must manually modify the code in order to improve or optimize performance.
두 번째로 파이프라인 형태의 실행 모델에서 일부 구간에서 동일 영상 처리를 반복 처리가 필요할 경우 그래픽 기반 모델링에서는 이들을 분리하여 별도의 하위 그래프로 표현하게 된다. 각 하위 그래프들은 자신의 그래프 관리 영역 내에서 리소스를 생성하고 해제를 하게 되는데, 상위 그래프가 반복되는 경우 매번 리소스를 생성 및 해제해야 하는 문제가 발생한다. 또한, GPU와 같은 병렬 처리 컴퓨팅 리소스의 경우 실행 태스크마다 GPU가 사용하는 메모리들을 생성 초기화(initialize) 및 종료(deinitialize)가 필요한데 이로 인해 성능 저하가 발생할 수 있다. 예컨대, GPU 기반 오픈 컴퓨팅 랭귀지(open computing language; OpenCL)용 라이브러리의 경우 라이브러리 실행할 때 마다 OpenCL 커널(kernel) 소스 코드를 로딩하여 동적 컴파일을 수행하고, 해당 커널에 필요한 GPU를 위한 메모리 할당 및 초기화를 수행해야 한다.Second, if it is necessary to repeat the same image processing in some sections of the pipeline type execution model, the graphic-based modeling separates them and expresses them as separate subgraphs. Each sub-graph creates and releases resources within its own graph management area. When the upper graph is repeated, there is a problem that resources must be created and released each time. In addition, in the case of a parallel processing computing resource such as a GPU, initializing and deinitializing the memory used by the GPU is required for each execution task, which may cause performance degradation. For example, in the case of a library for GPU-based open computing language (OpenCL), each time the library is executed, the OpenCL kernel source code is loaded to perform dynamic compilation, and memory allocation and initialization for the GPU required for the kernel are performed. Should be done.
마지막으로 영상 추적이나 정확도를 높이기 위해서 이전 처리 결과에 대한 피드백을 가지는 순환(cyclic) 구조의 그래프가 많이 필요로 하게 되지만 그래픽 기반 모델의 경우 무한 루프 구조가 발생 가능성이 있어 순환 구조의 그래프 사용이 제한되는 문제가 있다.Lastly, in order to improve image tracking or accuracy, many graphs of cyclic structures with feedback on previous processing results are required, but in the case of graphic-based models, there is a possibility of an infinite loop structure, so the use of graphs of cyclic structures is limited. There is a problem.
본 발명은 상술한 문제점을 해결하기 위하여, 다양한 이기종 컴퓨팅 자원이 탑재된 온디바이스 시스템 환경에서 독립적인 하위 그래프나 순환 그래프가 포함된 그래픽 기반 응용 모델에 대한 성능을 태스크 레벨에서 최적화하기 위한 장치 및 방법을 제공하는 것을 목적으로 한다.In order to solve the above-mentioned problems, the present invention is an apparatus and method for optimizing the performance of a graphic-based application model including independent subgraphs or circular graphs in an on-device system environment equipped with various heterogeneous computing resources at a task level It aims to provide.
상기한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 이기종 온디바이스 시스템에서의 그래프 기반 영상 처리 모델 실행 최적화 장치는 사용자가 제공하는 영상 처리 그래프 모델에 대해 그래프 토폴러지(topology)를 이용하여 경로를 탐색하고, 실행 순서에 따라 노드들을 생성 및 순차 배치하여 영상 처리 그래프 모델의 실행을 위한 실행 경로를 생성하는 영상 처리 그래프 경로 생성부; 및 영상 처리 그래프 경로 생성부로부터 수신된 영상 처리 그래프 모델, 노드들에 대응되는 노드 목록 및 가상 슈퍼 노드 목록, 실행 경로에 기초하여 영상 처리 그래프 모델을 실행하는 영상 처리 그래프 경로 실행부;를 포함한다.The apparatus for optimizing execution of a graph-based image processing model in a heterogeneous on-device system according to an embodiment of the present invention for achieving the above object is a path using a graph topology for an image processing graph model provided by a user An image processing graph path generation unit for generating an execution path for execution of the image processing graph model by searching for and generating and sequentially arranging nodes according to an execution order; And an image processing graph path execution unit that executes an image processing graph model based on an image processing graph model received from the image processing graph path generation unit, a node list corresponding to nodes, and a virtual super node list, and an execution path. .
또한, 상기한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 이기종 온디바이스 시스템에서의 그래프 기반 영상 처리 모델 실행 최적화 방법은, 영상처리 그래프 경로 생성부가 사용자가 작성한 영상 처리 그래프 모델에서 노드 별 입출력 데이터를 기반으로 위상정렬(토폴러지 정렬)하여 실행 가능한 경로 후보 목록들을 생성하고, 영상 처리 그래프 모델 내에 순환 하위 그래프가 존재하는지 여부를 확인하고, 영상 처리 그래프 모델 내에 순환 하위 그래프가 존재하는 경우, 순환 구조 내부의 시작 노드와 종료 노드를 식별하고 하나의 가상 슈퍼 노드에 대응되는 블록(노드들)을 결정하고, 가상 슈퍼 노드 내의 외부와 연결되는 입출력 데이터를 자동 탐색하고, 이들에 대해 입출력 데이터를 가상 슈퍼 노드의 입출력 파라미터로 등록하고, 가상 슈퍼 노드가 별도의 쓰레드를 통해 동작되도록 실행 반복 회수 및/또는 시작/종료 시점을 결정하고, 가상 슈퍼 노드의 입출력 연결 정보를 통해 영상 처리 그래프 모델(300) 내에 새로운 노드를 생성하여 추가하고, 영상처리 그래프 경로 실행부가 영상 처리 그래프 모델을 실행한다.In addition, a method for optimizing execution of a graph-based image processing model in a heterogeneous on-device system according to an embodiment of the present invention for achieving the above object is input/output by node in the image processing graph model created by the image processing graph path generation unit Phase-aligned (topological sort) based on the data to generate executable path candidate lists, check whether a circular subgraph exists in the image processing graph model, and if a circular subgraph exists in the image processing graph model, Identifies the start and end nodes inside the circular structure, determines the blocks (nodes) corresponding to one virtual super node, automatically searches for I/O data connected to the outside in the virtual super node, and retrieves I/O data for them. Register as input/output parameters of the virtual super node, determine the number of execution repetitions and/or start/end timings so that the virtual super node operates through a separate thread, and process the image processing graph model (300) through the input/output connection information of the virtual super node. Create and add a new node in ), and the image processing graph path execution unit executes the image processing graph model.
본 발명에 따르면, 다양한 이기종 컴퓨팅 자원을 가지고 있는 온디바이스 시스템 상에서 독립적인 하위 그래프나 순환 그래프가 포함된 파이프라인 형태의 영상 처리 모델을 가상 슈퍼 노드와 그 실행 매커니즘을 제공함으로써 피드백 형태의 영상 처리 응용 프로그램의 개발이 가능하도록 기능을 확장할 수 있고, 응용 프로그램 내의 쓰레드(thread)나 프로세스들을 자동 생성 및 노드 간의 데이터 동기화를 통해 라이브러리들 간 응답 지연 시간을 감소시킬 수 있다.According to the present invention, an image processing model in a feedback form is provided by providing a virtual super node and its execution mechanism for a pipelined image processing model including independent subgraphs or circular graphs on an on-device system having various heterogeneous computing resources. The functions can be extended to enable the development of programs, and the response latency between libraries can be reduced by automatically creating threads or processes in the application program and synchronizing data between nodes.
도 1은 본 발명의 일 실시예에 따른 이기종 온디바이스 시스템을 나타낸 도면이다.
도 2는 본 발명의 일 실시예에 따른 영상 처리 그래프 실행기의 구성을 나타낸 도면이다.
도 3a 내지 3c는 본 발명의 일 실시예에 따른 영상 처리 그래프 모델들을 나타낸 도면이다.
도 4는 도 2에 도시된 영상 처리 그래프 경로 생성부의 가상 슈퍼 노드를 생성하는 방법의 일 예를 나타낸 동작 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 가상 슈퍼 노드를 나타낸 도면이다.
도 6은 본 발명의 일 실시예에 따른 컴퓨터 시스템을 나타낸 도면이다.1 is a view showing a heterogeneous on-device system according to an embodiment of the present invention.
2 is a diagram showing the configuration of an image processing graph executor according to an embodiment of the present invention.
3A to 3C are diagrams illustrating image processing graph models according to an embodiment of the present invention.
4 is an operation flowchart illustrating an example of a method of generating a virtual super node of the image processing graph path generator shown in FIG. 2.
5 is a diagram illustrating a virtual super node according to an embodiment of the present invention.
6 is a diagram illustrating a computer system according to an embodiment of the present invention.
본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.If described in detail with reference to the accompanying drawings the present invention. Here, repeated descriptions, well-known functions that may unnecessarily obscure the subject matter of the present invention, and detailed description of the configuration will be omitted. Embodiments of the present invention are provided to more fully describe the present invention to those skilled in the art. Therefore, the shape and size of elements in the drawings may be exaggerated for a more clear description.
명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part “includes” a certain component, this means that other components may be further included rather than excluding other components unless specifically stated to the contrary.
이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 일 실시예에 따른 이기종 온디바이스 시스템을 나타낸 도면이다.1 is a view showing a heterogeneous on-device system according to an embodiment of the present invention.
특히, 도 1은 그래프 기반 모델을 실행해주는 다양한 이기종 컴퓨팅 장치를 포함하고 있는 온디바이스 시스템의 일 예를 나타낸 것이다.In particular, FIG. 1 shows an example of an on-device system including various heterogeneous computing devices that execute a graph-based model.
도 1을 참조하면, 온디바이스 시스템(100)은 영상, 센서 데이터, 실시간 데이터 등 스트림 형태로 입력되는 데이터들을 그래프 기반 실행 모델(103)을 기반으로 시스템의 다양한 이기종 컴퓨팅 자원(105)을 활용할 수 있도록 한다.Referring to FIG. 1, the on-
온디바이스 시스템(100)은 그래프 기반 실행 모델(103)에 포함된 각 단위 영상 처리 기능을 구현한 온디바이스용 이기종 라이브러리(104)와 이를 실제 수행하기 위한 이기종 컴퓨팅 자원(105), 사용자가 원하는 타겟 서비스를 기능 중심의 시나리오로 정의된 그래프 기반 실행 모델(103)과 이 실행 모델을 해석하고 온디바이스용 이기종 라이브러리(104)를 호출 실행해 주는 영상 처리 그래프 실행기(102)로 구성된다.The on-
이기종 컴퓨팅 자원(105)은 일반적으로 사용되는 컴퓨팅 시스템에 존재하는 멀티 코어 CPU와 GPU뿐만 아니라, 저전력 DSP 장치, 인공지능을 위한 NPU, 영상 처리에 사용되는 전용 코덱 등 특수 목적의 시스템 온 칩(SoC)을 포함할 수 있다.
온디바이스용 이기종 라이브러리(104)는 온디바이스 시스템(100)에 탑재되어 있는 이기종 컴퓨팅 자원(105)을 최소 한 개 이상 이용하여 데이터를 처리하기 위한 하나의 소프트웨어 모듈이다.The
여기서 온디바이스용 이기종 라이브러리(104)는 단위 데이터 처리 기능을 제공하고, 그래프 기반 실행 모델(103)내의 노드와 1:1로 매칭된다. 또한, 이기종 라이브러리는 동일 기능을 가지더라도, 해당 기능을 수행하기 위해 이용하는 자원 종류에 따라 서로 다른 것으로 구별될 수 있다. 예컨대, CPU 자원만을 이용하는 라이브러리가 존재할 수 있고, GPU나 DSP 자원만을 이용하는 라이브러리가 존재할 수 있는데, 본 발명에서는 이들을 각각 다른 모듈로서 구별할 수 있다.Here, the
그래프 기반 실행 모델(103)은 노드(node)와 에지(edge)로 구성된다. 노드는 데이터를 처리하기 위한 단위 기능에 해당되고, 에지는 다음 단계의 데이터 처리를 알려주는 연결 정보이다. 일반적인 그래프 기반 실행 모델은 무한 반복을 피하기 위해 순환(cyclic) 구조를 제한하지만 본 발명에서는 순환 구조를 포함한다.The graph-
영상 처리 그래프 실행기(102)는 사용자가 정의한 그래프 기반 실행 모델(103)을 해석하여 온디바이스 시스템(100)이 가지고 있는 이기종 컴퓨팅 자원(105)으로 최적의 실행이 가능하도록 하는, 가장 효율적인 경로를 생성하고 실행 스케줄을 생성한다.The image
도 2는 본 발명의 일 실시예에 따른 영상 처리 그래프 실행기의 구성을 나타낸 도면이다.2 is a diagram showing the configuration of an image processing graph executor according to an embodiment of the present invention.
도 2를 참조하면, 사용자는 자신이 원하는 영상 처리 순서를 하나의 시나리오 형태로 영상 처리 그래프 모델(201)을 생성한다.Referring to FIG. 2, the user generates the image
영상 처리 그래프 실행기(200)는 사용자가 제공하는 영상 처리 그래프 모델(201)을 해석하여, 이를 효과적으로 실행하기 위한 경로를 생성하고 이를 실행하게 해 준다.The image
영상 처리 그래프 실행기(200)는 영상 처리 그래프 경로 생성부(202)와 생성된 경로를 기반으로 온디바이스용 이기종 라이브러리(도 1의 104 참조) 내 해당 라이브러리를 동적으로 호출해주는 영상 처리 그래프 경로 실행부(203)로 구성된다.The image
영상 처리 그래프 경로 생성부(202)는 그래프 토폴러지(topology)를 이용하여 경로를 탐색하고, 실행 순서에 따라 노드(204)들을 순차적으로 배치하여 실행 경로(207)를 생성한다.The image processing graph
여기서, 영상 처리 그래프 경로 생성부(202)는 그래프 내에 순환(cyclic) 구조가 있는지 확인하고, 이에 대한 정보를 추출하여 가상 슈퍼 노드(205) 후보로 결정한다.Here, the image processing graph
노드 실행 추적 관리부(206)는 영상 처리 그래프 경로 생성부(202)에서 생성한 경로 순서에 따라 노드 별 해당되는 라이브러리를 호출해준다.The node execution
도 3a 내지 3c는 본 발명의 일 실시예에 따른 영상 처리 그래프 모델들을 나타낸 도면이다.3A to 3C are diagrams illustrating image processing graph models according to an embodiment of the present invention.
특히, 도 3a 내지 3c는 사용자가 영상 처리 응용 프로그램을 생성하기 위해 정의한 영상 처리 그래프 모델(201)의 예들을 나타낸 것이다.In particular, FIGS. 3A to 3C show examples of the image
도 3a를 참조하면, 영상 처리 그래프 모델(300)은 2개의 입력 데이터 IN1(301)과 IN2(302), 영상 처리함수(N1 내지 N7) 및 최종 출력 데이터 OUT(303)으로 구성된다.Referring to FIG. 3A, the image
여기서, 영상 처리 그래프 모델(300)은 N5, N6 및 N7 노드들로 구성된 하위 그래프(304)를 포함할 수 있다.Here, the image
도 3b를 참조하면, 영상 처리 그래프 모델(305)은 N5, N6 및 N7 노드들이 N5-N6-N7-N5 순서로 순환되는 상호 순환 구조(306)를 포함할 수 있다.Referring to FIG. 3B, the image
도 3c를 참조하면, 영상 처리 그래프 모델(307)은 N8 노드와 같이 가상 슈퍼 노드(308)를 포함할 수 있다.Referring to FIG. 3C, the image
여기서, 영상 처리 그래프 모델(307)은 도 3a 및 3b에 도시된 영상 처리 그래프 모델들(300 및 305)에서 N5, N6 및 N7 노드들을 하나의 가상 슈퍼 노드(308)로 대치하여 생성된 것일 수 있다.Here, the image
영상 처리 그래프 경로 생성부(도 2의 202 참조)는 상호 순환 구조가 없는 영상 처리 그래프 모델(307)과 노드(도 2의 204 참조) 목록, 가상 슈퍼 노드(도 2의 205 참조) 목록 및 실행 경로(도 2의 207 참조) 정보를 영상 처리 그래프 경로 실행부(도 2의 203 참조)에 전달할 수 있다.The image processing graph path generation unit (see 202 in FIG. 2) lists and executes the image
도 4는 도 2에 도시된 영상 처리 그래프 경로 생성부(202)의 가상 슈퍼 노드를 생성하는 방법의 일 예를 나타낸 동작 흐름도이다.4 is an operation flowchart illustrating an example of a method of generating a virtual super node of the image processing
도 4를 참조하면, 먼저 영상 처리 그래프 경로 생성부(202)가 사용자가 작성한 영상 처리 그래프 모델(도 3의 300 참조)에서 노드 별 입출력 데이터를 기반으로 위상정렬(토폴러지 정렬)하여 실행 가능한 경로 후보 목록들을 생성한다(S400).Referring to FIG. 4, first, an image processing graph
다음으로, 영상 처리 그래프 경로 생성부(202)가 영상 처리 그래프 모델(300)내에 순환 하위 그래프가 존재하는지 여부를 확인한다(S401).Next, the image processing graph
단계(S401)의 판단 결과, 영상 처리 그래프 모델(도 3의 300 참조) 내에 순환 하위 그래프가 존재하는 경우, 영상 처리 그래프 경로 생성부(202)가 순환 구조 내부의 시작 노드와 종료 노드를 식별하고 하나의 가상 슈퍼 노드에 대응되는 블록(노드들)을 결정한다(S402).As a result of the determination in step S401, when a cyclic sub-graph exists in the image processing graph model (refer to 300 in FIG. 3), the image processing graph
다음으로, 영상 처리 그래프 경로 생성부(202)가 가상 슈퍼 노드 내의 외부와 연결되는 입출력 데이터를 자동 탐색하고, 이들에 대해 입출력 데이터를 가상 슈퍼 노드의 입출력 파라미터로 등록한다(S403).Next, the image processing graph
다음으로, 영상 처리 그래프 경로 생성부(202)가, 가상 슈퍼 노드가 별도의 쓰레드를 통해 동작되도록 실행 반복 회수 및/또는 시작/종료 시점을 결정한다(S404).Next, the image processing graph
여기서, 실행 반복 회수 또는 시작/종료 시점은 가상 슈퍼 노드 외부의 입력 데이터를 이용하여 결정될 수도 있고, 사용자가 지정한 파라미터를 이용하여 결정될 수도 있다.Here, the number of execution iterations or the start/end time may be determined using input data outside the virtual super node, or may be determined using a user-specified parameter.
다음으로, 영상 처리 그래프 경로 생성부(202)가 가상 슈퍼 노드의 입출력 연결 정보를 통해 영상 처리 그래프 모델(도 3의 300 참조) 내에 새로운 노드를 생성하여 추가한다(S405).Next, the image processing graph
단계(S401) 내지 단계(S405)는 영상 처리 그래프 모델(도 3의 300 참조) 내에 순환 그래프가 존재하지 않을 때까지 반복 수행될 수 있다.Steps S401 to S405 may be repeatedly performed until there is no circular graph in the image processing graph model (see 300 in FIG. 3 ).
단계(S401)의 판단 결과, 영상 처리 그래프 모델(도 3의 300 참조) 내에 순환 그래프가 존재하지 않는 경우, 영상 처리 그래프 경로 생성부(도 2의 202 참조)가 단계(S401) 내지 단계(S405)를 통해 추가 생성된 가상 슈퍼 노드들이 메인 그래프와 독립적으로 실행될 수 있도록 내부적으로 별도의 쓰레드나 프로세스를 생성하고, 종료 노드 수행이 완료되면 해당 동기화 신호를 어플리케이션 실행기(도 2의 200 참조)에 전달한다(S406).As a result of the determination in step S401, when a cyclic graph does not exist in the image processing graph model (refer to 300 in FIG. 3), the image processing graph path generation unit (refer to 202 in FIG. 2) includes steps S401 to S405. ) To create additional threads or processes internally so that the virtual super nodes created additionally can be executed independently from the main graph, and when the execution of the termination node is completed, deliver the corresponding synchronization signal to the application launcher (see 200 in FIG. 2). (S406).
도 5는 본 발명의 일 실시예에 따른 가상 슈퍼 노드를 나타낸 도면이다.5 is a diagram illustrating a virtual super node according to an embodiment of the present invention.
도 5를 참조하면, 가상 슈퍼 노드(500)는 일반 노드와 동일한 입출력 인터페이스(501), 가상 슈퍼 노드(500) 내의 하위 그래프(506)를 실행하기 위한 순환 그래프 실행 엔진(508), 반복 실행 종료 조건 관리부(505) 및 반복 실행 종료 후 상위의 어플리케이션 실행기(도 2의 200 참조)에 노드 종료 동기화 신호를 제공하는 동기화 신호 생성부(507)로 구성된다.Referring to FIG. 5, the virtual
비록 도 5에는 도시되지 아니하였으나, 본 발명에 따른 가상 슈퍼 노드(500)의 입출력 인터페이스(501)는 노드 초기화 처리 인터페이스(502), 노드 실행 처리 인터페이스(503) 및 노드 종료 처리 인터페이스(504)로 제한되는 것은 아니며, 필요에 따라 다른 기능을 포함하는 입출력 인터페이스가 더 추가될 수 있다.Although not shown in FIG. 5, the input/
노드 초기화 처리 인터페이스(502)는 노드를 실행하기에 앞서 변수 초기화, 메모리 초기화 등 노드 실행 처리 인터페이스(503)를 통한 기능 수행에 필요한 사전 조건들을 초기화 하는 기능을 포함하는 것일 수 있다. 또한, 온디바이스 시스템(도 1의 100 참조) 내의 이기종 컴퓨팅 자원(도 1의 105 참조)를 사용하기 위한 초기화 작업을 포함할 수 있다. 예컨대, 노드 실행 처리에 GPU가 사용되는 경우, 실시간 성능을 높이기 위해 노드 초기화 처리 인터페이스(502)에 OpenCL이나 쿠다(compute unified device architecture; CUDA) 라이브러리를 사용하기 위한 커널 소스를 컴파일하는 작업이 포함될 수 있다.The node
노드 종료 처리 인터페이스(504)는 메인 그래프 실행이 완료되면 그에 따라 가상 슈퍼 노드(500)에 사용된 리소스를 반환/해제하는 기능을 포함할 수 있다.The node
노드 실행 처리 인터페이스(503)는 노드들을 순서대로 실행하는 기능을 포함하며, 실행 과정에서 가상 슈퍼 노드의 실행이 호출되면, 내부의 순환 그래프 실행 엔진(508)이 분리된 하위 그래프(506)의 하위 노드들을 실행하도록 할 수 있다.The node
반복 실행 종료 조건 관리부(505)는 순환 그래프 실행 엔진(508)이 하위 그래프 노드을 이용해 가며 실행하게 되는데, 이들을 실행 중지 할 수 있는 조건을 포함할 수 있다.The recurring execution termination
동기화 신호 생성부(507)는 가상 슈퍼 노드의 반복 회수가 완료되면 그에 따라 실행 완료 메시지를 영상 처리 그래프 경로 실행부(도 2의 203 참조)에 보내어 다음 순서의 노드가 실행되도록 할 수 있다.The synchronization
도 6은 본 발명의 일 실시예에 따른 컴퓨터 시스템을 나타낸 도면이다.6 is a diagram illustrating a computer system according to an embodiment of the present invention.
본 발명에 따른 온디바이스 시스템 및/또는 영상 처리 그래프 실행기는 컴퓨터 시스템(600)으로서 구현될 수 있다.The on-device system and/or image processing graph executor according to the present invention may be implemented as
도 6을 참조하면, 컴퓨터 시스템(600)은 버스(620)를 통하여 서로 통신하는 하나 이상의 프로세서(610), 메모리(630), 사용자 인터페이스 입력 장치(640), 사용자 인터페이스 출력 장치(650) 및 스토리지(660)를 포함할 수 있다. 또한, 컴퓨터 시스템(600)은 네트워크(680)에 연결되는 네트워크 인터페이스(670)를 더 포함할 수 있다. 프로세서(610)는 중앙 처리 장치 또는 메모리(630)나 스토리지(660)에 저장된 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(630) 및 스토리지(660)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예컨대, 메모리는 ROM(631)이나 RAM(632)을 포함할 수 있다.Referring to FIG. 6, the
본 발명에서 설명하는 특정 실행들은 일 실시예들로서, 어떠한 방법으로도 본 발명의 범위를 한정하는 것은 아니다. 명세서의 간결함을 위하여, 종래 전자적인 구성들, 제어 시스템들, 소프트웨어, 상기 시스템들의 다른 기능적인 측면들의 기재는 생략될 수 있다. 또한, 도면에 도시된 구성 요소들 간의 선들의 연결 또는 연결 부재들은 기능적인 연결 및/또는 물리적 또는 회로적 연결들을 예시적으로 나타낸 것으로서, 실제 장치에서는 대체 가능하거나 추가의 다양한 기능적인 연결, 물리적인 연결, 또는 회로 연결들로서 나타내어질 수 있다. 또한, “필수적인”, “중요하게” 등과 같이 구체적인 언급이 없다면 본 발명의 적용을 위하여 반드시 필요한 구성 요소가 아닐 수 있다.The specific implementations described in the present invention are examples, and do not limit the scope of the present invention in any way. For brevity of the specification, descriptions of conventional electronic configurations, control systems, software, and other functional aspects of the systems may be omitted. In addition, the connection or connection members of the lines between the components shown in the drawings are illustrative examples of functional connections and/or physical or circuit connections, and in the actual device, alternative or additional various functional connections, physical It can be represented as a connection, or circuit connections. In addition, unless specifically mentioned, such as “essential”, “importantly”, etc., it may not be a necessary component for application of the present invention.
따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 또는 이로부터 등가적으로 변경된 모든 범위는 본 발명의 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention is not limited to the above-described embodiments, and should not be determined, and the scope of the spirit of the present invention as well as the claims to be described later, as well as all ranges that are equivalent to or equivalently changed from the claims Would belong to
100: 온디바이스 시스템
102: 영상 처리 그래프 실행기
103: 그래프 기반 실행 모델
104: 온디바이스용 이기종 라이브러리
105: 이기종 컴퓨팅 자원
200: 영상 처리 그래프 실행기
201, 300, 305 및 307: 영상 처리 그래프 모델
202: 영상 처리 그래프 경로 생성부
203: 영상 처리 그래프 경로 실행부
204: 노드
205, 308 및 500: 가상 슈퍼 노드
206: 노드 실행 추적 관리부
207: 실행 경로
304 및 506: 하위 그래프
306: 상호 순환 구조
501: 입출력 인터페이스
502: 노드 초기화 처리 인터페이스
503: 노드 실행 처리 인터페이스
504: 노드 종료 처리 인터페이스
505: 반복 실행 종료 조건 관리부
507: 동기화 신호 생성부
508: 순환 그래프 실행 엔진
600: 컴퓨터 시스템
610: 프로세서
620: 버스
630: 메모리
631: ROM
632: RAM
640: 사용자 인터페이스 입력 장치
650: 사용자 인터페이스 출력 장치
660: 스토리지
670: 네트워크 인터페이스
680: 네트워크100: on-device system 102: image processing graph launcher
103: graph-based execution model 104: heterogeneous library for on-device
105: heterogeneous computing resource 200: image processing graph launcher
201, 300, 305 and 307: image processing graph model
202: image processing graph path generation unit
203: image processing graph path execution unit
204:
206: node execution tracking management unit 207: execution path
304 and 506: subgraph 306: mutual circulation structure
501: input/output interface 502: node initialization processing interface
503: node execution processing interface 504: node termination processing interface
505: repeat execution end condition management unit 507: synchronization signal generation unit
508: cyclic graph execution engine 600: computer system
610: processor 620: bus
630: memory 631: ROM
632: RAM 640: User interface input device
650: user interface output device 660: storage
670: network interface 680: network
Claims (1)
상기 영상 처리 그래프 경로 생성부로부터 수신된 상기 영상 처리 그래프 모델, 상기 노드들에 대응되는 노드 목록 및 가상 슈퍼 노드 목록, 상기 실행 경로에 기초하여 상기 영상 처리 그래프 모델을 실행하는 영상 처리 그래프 경로 실행부;
를 포함하는 이기종 온디바이스 시스템에서의 그래프 기반 영상 처리 모델 실행 최적화 장치.The image that searches the path using graph topology for the image processing graph model provided by the user, creates and sequentially arranges the nodes according to the execution order to generate an execution path for the execution of the image processing graph model A processing graph path generator; And
An image processing graph path execution unit executing the image processing graph model based on the image processing graph model received from the image processing graph path generation unit, a node list corresponding to the nodes and a virtual super node list, and the execution path ;
Graph-based image processing model execution optimization device in a heterogeneous on-device system comprising a.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190004805A KR102255365B1 (en) | 2019-01-14 | 2019-01-14 | Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190004805A KR102255365B1 (en) | 2019-01-14 | 2019-01-14 | Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20200088155A true KR20200088155A (en) | 2020-07-22 |
KR102255365B1 KR102255365B1 (en) | 2021-05-25 |
Family
ID=71893163
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190004805A KR102255365B1 (en) | 2019-01-14 | 2019-01-14 | Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102255365B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101600231B1 (en) * | 2015-02-23 | 2016-03-04 | 한양대학교 산학협력단 | Path computation method and apparatus |
KR20160090919A (en) * | 2014-12-30 | 2016-08-02 | 한양대학교 산학협력단 | Basic block size considering execution path exploration method and system for improving the code coverage |
KR20170046784A (en) * | 2014-09-02 | 2017-05-02 | 아브 이니티오 테크놀로지 엘엘시 | Executing graph-based program specifications |
KR20170115185A (en) | 2016-04-05 | 2017-10-17 | 한국전자통신연구원 | Embedded system including software build module |
-
2019
- 2019-01-14 KR KR1020190004805A patent/KR102255365B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20170046784A (en) * | 2014-09-02 | 2017-05-02 | 아브 이니티오 테크놀로지 엘엘시 | Executing graph-based program specifications |
KR20160090919A (en) * | 2014-12-30 | 2016-08-02 | 한양대학교 산학협력단 | Basic block size considering execution path exploration method and system for improving the code coverage |
KR101600231B1 (en) * | 2015-02-23 | 2016-03-04 | 한양대학교 산학협력단 | Path computation method and apparatus |
KR20170115185A (en) | 2016-04-05 | 2017-10-17 | 한국전자통신연구원 | Embedded system including software build module |
Also Published As
Publication number | Publication date |
---|---|
KR102255365B1 (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3754495B1 (en) | Data processing method and related products | |
US11893414B2 (en) | Operation method, device and related products | |
JP5763783B2 (en) | Method and apparatus for compiling regular expressions | |
US20200334522A1 (en) | Data processing method and related products | |
JP6763072B2 (en) | Compile data processing graph | |
US11694075B2 (en) | Partitioning control dependency edge in computation graph | |
US9977663B2 (en) | Technologies for optimizing sparse matrix code with field-programmable gate arrays | |
US11609792B2 (en) | Maximizing resource utilization of neural network computing system | |
US20200342286A1 (en) | Computation graph mapping in heterogeneous computer system | |
Requeno et al. | Performance analysis of apache storm applications using stochastic petri nets | |
Katagiri et al. | Early experiences for adaptation of auto-tuning by ppOpen-AT to an explicit method | |
US10564948B2 (en) | Method and device for processing an irregular application | |
US11461662B1 (en) | Compilation time reduction for memory and compute bound neural networks | |
US20230315409A1 (en) | Compilation and execution of source code as services | |
KR102255365B1 (en) | Apparatus for optimizing graphic-based image processing model execution in heterogeneous on-device systems and method thereof | |
Chen et al. | Slapo: A schedule language for progressive optimization of large deep learning model training | |
KR20200108789A (en) | Method and computer program of processing program for single accelerator using dnn framework on plural accelerators | |
US11556357B1 (en) | Systems, media, and methods for identifying loops of or implementing loops for a unit of computation | |
US20230306272A1 (en) | Mapping Workloads to Circuit Units in a Computing Device via Reinforcement Learning | |
US11722557B2 (en) | Offload server and computer-readable medium for automatically offloading processing to programmable logic device | |
KR20230053509A (en) | Method and apparatus for executing deep learning programs | |
US20210374554A1 (en) | Graph context-based operator checks to improve graph clustering and execution in ai accelerator framework integration | |
US20210365304A1 (en) | Ensemble based cluster tuning and framework fallback for ai accelerators using telemetry, compute, and temperature metrics | |
Azzopardi et al. | Mapping CSP Networks to MPI Clusters Using Channel Graphs and Dynamic Instrumentation | |
Lorusso | Implementing Machine Learning inference on FPGAs from software to hardware using hls4ml |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |