KR101960609B1 - A method and apparatus for managing gpu resources by task group unit - Google Patents
A method and apparatus for managing gpu resources by task group unit Download PDFInfo
- Publication number
- KR101960609B1 KR101960609B1 KR1020170127651A KR20170127651A KR101960609B1 KR 101960609 B1 KR101960609 B1 KR 101960609B1 KR 1020170127651 A KR1020170127651 A KR 1020170127651A KR 20170127651 A KR20170127651 A KR 20170127651A KR 101960609 B1 KR101960609 B1 KR 101960609B1
- Authority
- KR
- South Korea
- Prior art keywords
- time
- gpu
- resource
- resource management
- overrun
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Debugging And Monitoring (AREA)
Abstract
GPU 자원 관리 방법 및 장치가 개시된다. 일 실시예에 따른 GPU 자원 관리 방법은 GPU의 자원(resource)을 시간 단위로 예약하는 단계와, 상기 자원의 사용 시간을 측정하는 단계와, 상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 단계를 포함한다.A method and apparatus for managing GPU resources are disclosed. A GPU resource management method according to an exemplary embodiment of the present invention includes reserving resources of a GPU on a time basis, measuring usage time of the resources, and scheduling the resources based on the usage time do.
Description
아래 실시예들은 GPU 자원관리 방법 및 장치에 관한 것이다.The following embodiments relate to a GPU resource management method and apparatus.
GPGPU(General-Purpose computing on Graphics Process Units)는 GPU(Graphics Processing Unit) 하드웨어에서 범용 계산을 할 수 있도록 만들어진 기술이다. GPU 하드웨어는 CPU와 다르게 수천 개의 코어를 가지고 병렬처리를 하므로 높은 연산량을 가질 수 있다. 따라서, 현재 머신러닝이나 패턴인식과 같이 연산량이 많은 작업의 경우 GPGPU 기술을 사용하여 GPU 하드웨어 상에서 연산을 수행하면 상당한 성능 향상을 기대할 수 있다.GPGPU (General-Purpose Computing on Graphics Process Units) is a technology that allows general-purpose calculations to be performed on Graphics Processing Unit (GPU) hardware. Unlike CPUs, GPU hardware has thousands of cores, which can be processed in parallel, resulting in high computational complexity. Therefore, in case of high computational work such as machine learning or pattern recognition, it is expected that significant performance improvement can be expected when GPU hardware is operated on GPU hardware.
실시예들은 GPU의 사용 시간을 조절함으로써 GPU 자원을 관리할 수 있는 기술을 제공할 수 있다.Embodiments can provide a technique for managing GPU resources by adjusting the usage time of the GPU.
일 실시예에 따른 GPU 자원 관리 방법은 GPU의 자원(resource)을 시간 단위로 예약하는 단계와, 상기 자원의 사용 시간을 측정하는 단계와, 상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 단계를 포함한다.A GPU resource management method according to an exemplary embodiment of the present invention includes reserving resources of a GPU on a time basis, measuring usage time of the resources, and scheduling the resources based on the usage time do.
상기 예약하는 단계는, 상기 GPU의 자원 관리 주기 및 상기 자원 관리 주기당 상기 자원의 사용 가능 시간에 기초한 자원 활용률을 이용하여 상기 자원의 예약 여부를 결정하는 단계를 포함할 수 있다.The reserving may include determining whether to reserve the resource using a resource utilization period based on the resource management period of the GPU and the available time of the resource per the resource management period.
상기 예약하는 단계는, 복수의 사용자에 대하여 상기 자원 관리 주기, 상기 자원의 사용 가능 시간, 상기 자원의 총 사용 시간 및 상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간을 저장하는 단계를 더 포함할 수 있다.Wherein the step of reserving includes storing overrun time used for a plurality of users in excess of the resource management period, the available time of the resource, the total usage time of the resource, and the reservation time for the GPU .
상기 측정하는 단계는, 상기 GPU에 의해 실행되는 커널(kernel)의 시작과 끝에 상기 커널의 실행 시간을 측정하기 위한 이벤트를 삽입하는 단계와, 상기 이벤트를 이용하여 상기 실행 시간을 측정하는 단계를 포함할 수 있다.Wherein the measuring comprises: inserting an event for measuring the execution time of the kernel at the beginning and end of a kernel executed by the GPU; and measuring the execution time using the event can do.
상기 스케줄링하는 단계는, 상기 사용 시간을 합산하는 단계와, 상기 GPU에 대한 예약 시간, 상기 GPU의 사용 가능 시간 및 상기 GPU의 이번 주기 전까지의 사용 시간에 기초하여 이번 주기에 커널을 실행할지 여부를 결정하는 단계를 포함할 수 있다.Wherein the scheduling step includes a step of summing up the use time, a step of determining whether to execute the kernel in this period based on the reservation time for the GPU, the usable time of the GPU, and the usage time until the present cycle of the GPU And a step of determining the number
상기 결정하는 단계는, 상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간이 존재하는지 여부를 결정하는 단계와, 상기 오버런 시간과 상기 예약 시간을 제1 비교하는 단계와, 상기 이번 주기 전까지의 사용 시간 및 상기 사용 가능 시간을 제2 비교하는 단계와, 상기 오버런 시간과 상기 사용 가능 시간을 제3 비교하는 단계와, 상기 오버런 시간의 존재 여부, 상기 제1 비교 결과, 상기 제2 비교 결과 및 상기 제3 비교 결과에 기초하여 상기 예약 가능 시간 및 상기 오버런 시간을 업데이트 하고, 상기 커널의 실행 여부를 결정하는 단계 중 적어도 하나를 포함할 수 있다.Wherein the determining comprises determining whether there is an overrun time in excess of a reservation time for the GPU, comparing the overrun time and the reservation time first, A second comparing step of comparing a use time of the overrun time and the usable time of the overrun time with a usable time of the overrun time; And updating the available time and the overrun time based on the third comparison result and determining whether to execute the kernel.
상기 스케줄링하는 단계는, 상기 GPU의 자원 관리 주기마다 상기 자원을 스케줄링할 수 있다.The scheduling may schedule the resource for each resource management period of the GPU.
상기 측정하는 단계는, 별도의 스레드(thread)를 이용하여 상기 사용 시간을 측정할 수 있다.The measuring step may measure the use time using a separate thread.
일 실시예에 따른 GPU 자원 관리 장치는, GPU의 자원(resource)을 시간 단위로 예약하고, 상기 자원의 사용 시간을 측정하고, 상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 컨트롤러를 포함한다.The GPU resource management apparatus according to an embodiment includes a controller that reserves a resource of a GPU on a time basis, measures a use time of the resource, and schedules the resource based on the usage time.
상기 컨트롤러는, GPU의 자원(resource)을 시간 단위로 예약하는 자원 예약기와, 상기 자원의 사용 시간을 측정하는 사용 시간 측정기와, 상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 스케줄러를 포함할 수 있다.The controller may include a resource reservation unit that reserves resources of the GPU on a time basis, a usage time meter that measures the usage time of the resource, and a scheduler that schedules the resource based on the usage time .
상기 자원 예약기는, 상기 GPU의 자원 관리 주기 및 상기 자원 관리 주기당 상기 자원의 사용 가능 시간에 기초한 자원 활용률을 이용하여 상기 자원의 예약 여부를 결정할 수 있다.The resource reservator may determine whether to reserve the resource by using a resource utilization rate based on a resource management period of the GPU and a usable time of the resource per the resource management period.
상기 자원 예약기는, 복수의 사용자에 대하여 상기 자원 관리 주기, 상기 자원의 사용 가능 시간, 상기 자원의 총 사용 시간 및 상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간을 저장할 수 있다.The resource reservator may store an overrun time used by the plurality of users in excess of the resource management period, the available time of the resource, the total usage time of the resource, and the reservation time for the GPU.
상기 사용 시간 측정기는, 상기 GPU에 의해 실행되는 커널(kernel)의 시작과 끝에 상기 커널의 실행 시간을 측정하기 위한 이벤트를 삽입하고, 상기 이벤트를 이용하여 상기 실행 시간을 측정할 수 있다.The use time meter may insert an event for measuring the execution time of the kernel at the start and end of the kernel executed by the GPU, and may use the event to measure the execution time.
상기 스케줄러는, 상기 사용 시간을 합산하고, 상기 GPU에 대한 예약 시간, 상기 GPU의 사용 가능 시간 및 상기 GPU의 이번 주기 전까지의 사용 시간에 기초하여 이번 주기에 커널을 실행할지 여부를 결정할 수 있다.The scheduler may sum up the usage time and determine whether to run the kernel at this time based on the reservation time for the GPU, the available time of the GPU, and the usage time up to the present cycle of the GPU.
상기 스케줄러는, 상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간이 존재하는지 여부를 결정하는 오버런 판단기와, 상기 오버런 시간과 상기 예약 시간을 제1 비교하는 제1 비교기와, 상기 이번 주기 전까지의 사용 시간 및 상기 사용 가능 시간을 제2 비교하는 제2 비교기와, 상기 오버런 시간과 상기 사용 가능 시간을 제3 비교하는 제3 비교기와, 상기 오버런 시간의 존재 여부, 상기 제1 비교 결과, 상기 제2 비교 결과 및 상기 제3 비교 결과에 기초하여 상기 예약 가능 시간 및 상기 오버런 시간을 업데이트 하고, 상기 커널의 실행 여부를 결정하는 결정기 중 적어도 하나를 포함할 수 있다.Wherein the scheduler comprises: an overrun determinator for determining whether an overrun time exceeding a reserved time for the GPU exists; a first comparator for comparing the overrun time and the reserved time first, A second comparator for comparing the use time and the usable time before the overrun time and the usable time; a third comparator for comparing the overrun time and the usable time third by a third comparator; And a determiner for updating the available time and the overrun time based on the second comparison result and the third comparison result and determining whether to execute the kernel.
상기 스케줄러는, 상기 GPU의 자원 관리 주기마다 상기 자원을 스케줄링할 수 있다.The scheduler may schedule the resource for each resource management period of the GPU.
상기 사용 시간 측정기는, 별도의 스레드(thread)를 이용하여 상기 사용 시간을 측정할 수 있다.The use time meter may measure the use time by using a separate thread.
도 1은 일 실시예에 따른 GPU 자원 관리 장치의 개략적인 블록도를 나타낸다.
도 2는 도 1에 도시된 GPU 자원 관리 장치의 구조의 예시를 나타낸다.
도 3은 도 1에 도시된 컨트롤러의 개략적인 블록도를 나타낸다.
도 4는 도 2에 도시된 자원 예약기의 구조의 예시를 나타낸다.
도 5는 도 3에 도시된 스케줄러의 개략적인 블록도를 나타낸다.
도 6은 도 5에 도시된 스케줄러의 동작의 순서도의 예시를 나타낸다.1 shows a schematic block diagram of a GPU resource management apparatus according to an embodiment.
Fig. 2 shows an example of the structure of the GPU resource management apparatus shown in Fig.
Figure 3 shows a schematic block diagram of the controller shown in Figure 1;
Fig. 4 shows an example of the structure of the resource reservation unit shown in Fig.
Figure 5 shows a schematic block diagram of the scheduler shown in Figure 3;
6 shows an example of a flow chart of the operation of the scheduler shown in Fig.
본 명세서에 개시되어 있는 본 발명의 개념에 따른 실시예들에 대해서 특정한 구조적 또는 기능적 설명들은 단지 본 발명의 개념에 따른 실시예들을 설명하기 위한 목적으로 예시된 것으로서, 본 발명의 개념에 따른 실시예들은 다양한 형태로 실시될 수 있으며 본 명세서에 설명된 실시예들에 한정되지 않는다.It is to be understood that the specific structural or functional descriptions of embodiments of the present invention disclosed herein are presented for the purpose of describing embodiments only in accordance with the concepts of the present invention, May be embodied in various forms and are not limited to the embodiments described herein.
본 발명의 개념에 따른 실시예들은 다양한 변경들을 가할 수 있고 여러 가지 형태들을 가질 수 있으므로 실시예들을 도면에 예시하고 본 명세서에 상세하게 설명하고자 한다. 그러나, 이는 본 발명의 개념에 따른 실시예들을 특정한 개시형태들에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Embodiments in accordance with the concepts of the present invention are capable of various modifications and may take various forms, so that the embodiments are illustrated in the drawings and described in detail herein. However, it is not intended to limit the embodiments according to the concepts of the present invention to the specific disclosure forms, but includes changes, equivalents, or alternatives falling within the spirit and scope of the present invention.
제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만, 예를 들어 본 발명의 개념에 따른 권리 범위로부터 이탈되지 않은 채, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.The terms first, second, or the like may be used to describe various elements, but the elements should not be limited by the terms. The terms may be named for the purpose of distinguishing one element from another, for example without departing from the scope of the right according to the concept of the present invention, the first element being referred to as the second element, Similarly, the second component may also be referred to as the first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성요소들 간의 관계를 설명하는 표현들, 예를 들어 "~사이에"와 "바로~사이에" 또는 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Expressions that describe the relationship between components, for example, "between" and "immediately" or "directly adjacent to" should be interpreted as well.
본 명세서에서 사용한 용어는 단지 특정한 실시예들을 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprises ", or" having ", and the like, are used to specify one or more of the features, numbers, steps, operations, elements, But do not preclude the presence or addition of steps, operations, elements, parts, or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.
이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 그러나, 특허출원의 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. However, the scope of the patent application is not limited or limited by these embodiments. Like reference symbols in the drawings denote like elements.
도 1은 일 실시예에 따른 GPU 자원 관리 장치의 개략적인 블록도를 나타낸다.1 shows a schematic block diagram of a GPU resource management apparatus according to an embodiment.
도 1을 참조하면, GPU(Graphics Processing Unit) 자원(resource) 관리 장치(10)는 GPU의 자원을 관리할 수 있다. GPU 자원 관리 장치(10)는 서버와 같이 여러 명의 사용자가 장비에 설치된 GPU 하드웨어를 공유하여 작업을 처리하는 시스템에 있어서, 자원을 여러 사용자가 효과적으로 사용할 수 있도록 스케줄링을 수행할 수 있다.Referring to FIG. 1, a graphics processing unit (GPU)
GPU는 일반적으로 컴퓨터 그래픽에 대한 명령어를 처리할 수 있다. GPU 하드웨어 성능의 발전으로 인하여 GPU는 컴퓨터 그래픽 처리가 아닌 병렬 계산을 수행할 수 있다. GPGPU(General-Purpose computing on Graphics Process Units) 모델은 일반적인 컴퓨터 연산을 GPU에서 수행할 수 있는 프로그래밍 인터페이스를 제공할 수 있다. GPUs are typically capable of handling instructions for computer graphics. Due to the advances in GPU hardware performance, GPUs can perform parallel calculations rather than computer graphics processing. The General-Purpose Computing on Graphics Process Units (GPGPU) model can provide a programming interface for performing general computer operations on the GPU.
커널(Kernel)은 GPU에서 계산하는 프로그램 단위를 의미할 수 있고, 커널은 GPU 하드웨어에서 계산을 수행할 수 있다.The kernel can refer to the program unit that the GPU computes, and the kernel can perform computations on the GPU hardware.
GPU는 CPU(Central Processing Unit)와 달리, GPGPU 명령어 스케줄링을 운영체제에서 제공하지 않을 수 있다. 따라서, GPU는 GPU 하드웨어에서 제공하는 디바이스 드라이버와 하드웨어 아키텍처에 의존적일 수 있다.Unlike the CPU (Central Processing Unit), the GPU may not provide GPGPU instruction scheduling in the operating system. Therefore, the GPU may depend on the device driver and hardware architecture provided by the GPU hardware.
또한, GPU는 GPU 에서 GPGPU 명령어가 수행중인 경우, 해당 계산 작업이 끝날 때까지 다른 GPGPU 명령어를 처리할 수 없는 비선점형(non-preemptive) 방식으로 동작할 수 있다. 이러한 특성에 의해 GPU는 멀티 태스킹 환경에서 지속적인 자원 제공이 가능한 환경을 구성하는 것을 어렵게 할 수 있다.In addition, the GPU can operate in a non-preemptive manner when GPGPU instructions are being executed on the GPU, which can not process other GPGPU commands until the end of the calculation. These characteristics make it difficult for the GPU to configure an environment capable of providing continuous resources in a multitasking environment.
기존의 GPU 관리 방식은 GPU 명령어를 디바이스 드라이버를 수정하여 제공하기 때문에, 디바이스 드라이버를 제공하지 않은 GPU 벤더에 적용하기 어려울 수 있다. 또한, 기존의 GPU 관리 방식은 프로그램 단위로 GPU 자원을 스케줄링하기 때문에, 여러 사용자가 GPU 자원을 사용하는 경우가 고려되지 않을 수 있다.Since the existing GPU management method provides the GPU instruction by modifying the device driver, it may be difficult to apply it to the GPU vendor not providing the device driver. Also, since the existing GPU management method schedules the GPU resources on a program-by-program basis, it may not be considered that a plurality of users use the GPU resources.
기존의 GPU 자원 관리 방법인 TimeGraph는 중앙 집중식 관리 방식으로 구현될 수 있다. 중앙 집중식 관리 방식은 모든 프로세스가 요청하는 GPU 명령어를 서버 역할을 하는 모듈에 전달하고, 이들을 하나의 대기 큐(wait queue)에서 관리할 수 있다. 이로 인해, 중앙 집중식 관리 방식은 서버 모듈에 GPU 명령어를 전달하는 오버헤드가 발생할 수 있다.The existing GPU resource management method, TimeGraph, can be implemented as a centralized management method. Centralized management allows GPU commands that all processes request to be delivered to modules acting as servers and managed by a single wait queue. Because of this, the centralized management approach may incur the overhead of transferring GPU instructions to the server module.
또한, 중앙 집중식 관리 방식은 요청한 GPU 명령어가 종료될 때까지 호스트 CPU에서 수행하는 프로세스가 다음 수행을 대기할 수 있다. 따라서, 중앙 집중식 관리 방식은 CPU 자원을 낭비할 수 있다.In addition, the centralized management method can wait for the next process to be performed by the host CPU until the requested GPU command is terminated. Therefore, the centralized management method can waste CPU resources.
GPU 자원 관리 장치(10)는 GPGPU기술을 사용하여 GPU 자원 제약을 수행할 수 있다. GPU 자원 관리 장치(10)는 중앙 집중식 관리 방식을 사용하지 않고, 개별적인 프로세스가 자신이 사용하고 있는 GPU 자원을 관리할 수 있다.The GPU
GPU 자원 관리 장치(10)는 주기적으로 프로세스가 사용하는 GPU 하드웨어 자원의 사용 시간을 측정할 수 있다. GPU 자원 관리 장치(10)는 GPU 자원 사용 시간을 허용된 사용 시간과 비교하여 예약 자원을 초과하여 사용하는 경우 프로세스의 GPU 자원 사용을 제한하고, 다른 프로세스가 GPU 자원을 사용할 수 있도록 할 수 있다.The GPU
GPU 자원 관리 장치(10)는 GPU 명령어를 서버 모듈에 전달할 필요가 없기 때문에, 중앙 집중식 관리 방식과는 달리 추가적인 오버헤드를 발생시키지 않을 수 있다. 또한, GPU 자원 관리 장치(10)는 GPU 명령어가 끝날 때까지 프로세스를 대기시키지 않고 다음 명령을 실행할 수 있도록 비동기적으로 동작하므로 호스트 CPU의 효율성을 높일 수 있다.The GPU
또한, GPU 자원 관리 장치(10)는 사용자 단위로 태스크 그룹으로 묶어서 GPU 자원을 사용할 수 있도록 스케줄링할 수 있다. GPU 자원 관리 장치(10)는 디바이스 드라이버가 아닌 라이브러리 단에서 자원의 스케줄링을 제공함으로써, GPU 벤더에 의존적이지 않고, 범용성을 가질 수 있다.In addition, the GPU
GPU 자원 관리 장치(10)는 GPU의 자원을 태스크 그룹 단위로 관리할 수 있고, 사용자 단위의 태스크 그룹 관리 모델을 제공할 수 있다.The GPU
GPU 자원 관리 장치(10)는 CPU의 내부 또는 외부에 구현될 수 있다.The GPU
GPU 자원 관리 장치(10)는 컨트롤러(100)를 포함할 수 있다.The GPU
컨트롤러(100)는 GPU의 자원을 시간 단위로 예약하고, 자원의 사용 시간을 측정하고, 사용 시간에 기초하여 상기 자원을 스케줄링할 수 있다.The
도 2는 도 1에 도시된 GPU 자원 관리 장치의 구조의 예시를 나타낸다.Fig. 2 shows an example of the structure of the GPU resource management apparatus shown in Fig.
도 2를 참조하면, GPU 자원 관리 장치(10)는 점선박스 안에 표현된 3개의 컴포넌트를 포함할 수 있다. 즉, GPU 자원 관리 장치(10)는 자원 예약 인터페이스, 커널 이벤트 및 실행 관리자 그리고 GPU 자원 스케줄러를 포함할 수 있다.Referring to FIG. 2, the GPU
자원 예약 인터페이스는 사용자 별로 GPU 자원을 시간 단위로 시스템에 예약할 수 있는 인터페이스를 제공할 수 있다. 커널 이벤트 및 실행 관리자는 GPU 자원의 사용 시간 측정을 도와주고, 실제로 GPGPU 커널을 실행 유무를 처리할 수 있다. GPU 자원 스케줄러는 GPU 자원을 사용자가 사용한 시간 정보를 활용하여 스케줄링할 수 있다.The resource reservation interface can provide an interface to schedule GPU resources on a user-by-user basis. The kernel event and execution manager can help measure the usage time of GPU resources, and can actually handle the GPGPU kernel execution. The GPU resource scheduler can schedule GPU resources using the time information that the user uses.
GPU 자원 관리 장치(10) GPGPU 프로그래밍 모델에서 제공하는 인터페이스 라이브러리를 후킹하여 구현할 수 있다. 따라서, 각 프로세스는 시스템에서 제공하는 라이브러리를 포함하여 실행될 수 있다.The GPU
도 3은 도 1에 도시된 컨트롤러의 개략적인 블록도를 나타낸다.Figure 3 shows a schematic block diagram of the controller shown in Figure 1;
도 3을 참조하면, 컨트롤러(100)는 자원 예약기(110), 사용 시간 측정기(130) 및 스케줄러(150)를 포함할 수 있다.Referring to FIG. 3, the
자원 예약기(110)는 GPU의 자원(resource)을 시간 단위로 예약할 수 있다. 자원 예약기(110)는 도 2의 자원 예약 인터페이스를 포함할 수 있다. 자원 예약기(110)의 동작은 도 4를 참조하여 자세하게 설명할 것이다.The
사용 시간 측정기(130)는 자원의 사용 시간을 측정할 수 있다. 사용 시간 측정기(130)는 GPU에 의해 실행되는 커널(kernel)의 시작과 끝에 커널의 실행 시간을 측정하기 위한 이벤트를 삽입하고, 이벤트를 이용하여 실행 시간을 측정할 수 있다.The
사용 시간 측정기(130)는 도 2의 커널 이벤트 및 실행 관리자를 포함할 수 있다. 사용 시간 측정기(130)는 GPU 실행 커널 시간을 측정하기 위해서 이벤트를 사용할 수 있다. 예를 들어, 사용 시간 측정기(130)는 CUDA(Compute Unified Device Architecture) 프로그래밍 인터페이스에 제공하는 이번트를 사용하여 사용 시간을 측정할 수 있다.The
이벤트는 커널 사이에 코드를 심어서 커널의 실행 시간을 측정할 수 있는 도구를 의미할 수 있다.An event can mean a tool that can be used to code the execution time of the kernel by injecting code between the kernels.
사용 시간 측정기(130)는 스케줄링 가능성을 분석하고, 분석 결과에 기초하여 GPGPU 커널의 실행 여부를 결정할 수 있다. 사용 시간 측정기(130)는 커널을 실행하는 함수를 후킹하여, 커널을 실행하는 함수의 앞에는 시작 이벤트를 삽입하고, 커널을 실행하는 함수의 뒤에는 종료 이벤트를 삽입할 수 있다. 사용 시간 측정기(130)는 종료 이벤트와 시작 이벤트 사이의 시간을 계산함으로써 GPU의 자원의 사용 시간을 측정할 수 있다.The
사용 시간 측정기(130)는 주기적으로 커널 이벤트 매니저에 등록되어 있는 이벤트를 불러오고, 커널 별로 등록된 종료 이벤트가 실행되었는지 확인할 수 있다. 만약, 종료 이벤트가 실행이 되었다면 해당 커널은 작업이 완료된 것을 의미하므로, 사용 시간 측정기(130)는 종료 이벤트가 실행된 커널의 시작 이벤트와 종료 이벤트를 가지고 커널의 사용시간을 계산할 수 있다.The
사용 시간 측정기(130)는 링크드리스트 자료구조를 사용하여 커널 별 이벤트를 관리함으로써, 삽입한 이벤트를 추적할 수 있다.The
사용 시간 측정기(130)는 커널을 실행하기 전 단계에서, GPU 자원 사용을 제약할 필요가 있는지 확인할 수 있다. 만약, 현재 주기에서 커널을 실행할 수 없도록 설정되어 있는 경우, 사용 시간 측정기(130)는 다음 주기가 될 때까지 프로세스를 대기시킬 수 있다. 현재 주기에서 커널을 실행할 수 있는 경우, 사용 시간 측정기(130)는 커널 시간 측정을 위한 시작 및 종료 이벤트를 초기화 하고 커널 이벤트 관리자에 등록한 뒤 커널을 실행할 수 있다.The
사용 시간 측정기(130)는 별도의 스레드(thread)를 이용하여 사용 시간을 측정할 수 있다. 사용 시간 측정기(130)는 GPU 자원 시간을 확인하기 위해서 호스트 프로그램이 실행될 때, 별도의 스레드를 생성해서 확인할 수 있다. 예를 들어, 사용 시간 측정기(130)는 리눅스에서 제공하는 타이머를 사용하여 사용자 별로 예약된 주기 마다 스레드를 실행할 수 있다.The
스케줄러(150)는 사용 시간에 기초하여 자원을 스케줄링할 수 있다. 스케줄러(150)는 도 2의 GPU 자원 스케줄러를 포함할 수 있다. 스케줄러(150)의 동작은 도 6을 참조하여 자세하게 설명할 것이다.
도 4는 도 2에 도시된 자원 예약기의 구조의 예시를 나타낸다.Fig. 4 shows an example of the structure of the resource reservation unit shown in Fig.
도 4를 참조하면, 자원 예약기(110)는 GPU의 자원 관리 주기 및 자원 관리 주기당 자원의 사용 가능 시간에 기초한 자원 활용률을 이용하여 자원의 예약 여부를 결정할 수 있다.Referring to FIG. 4, the
자원 예약기(110)는 사용자 별로 사용할 GPU 자원 사용 시간을 예약할 수 있다. 자원 예약기(110)는 사용자가 운용하는 프로세스에서 사용자의 GPU 사용량을 확인하기 위하여 사용량을 기록할 수 있다. 자원 예약기(110)는 사용자 별로 주어진 주기와 사용할 시간을 가지고 스케줄링이 가능한지 확인할 수 있다.The
자원 예약기(110)는 스케줄링이 불가능한 경우 자원 예약을 거부할 수 있다. 자원 예약기(110)는 예약 정보를 스케줄러(150)로 출력할 수 있다. 예약 정보는 사용자 별로 주어진 주기와 사용할 시간을 포함할 수 있다.The
자원 예약기(110)는 복수의 사용자에 대하여 자원 관리 주기, 자원의 사용 가능 시간, 자원의 총 사용 시간 및 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간을 저장할 수 있다.The
자원 예약기(110)는 리눅스에서 제공하는 sysfs를 이용하여 구현될 수 있다.The
자원 예약기(110)는 계층적인 파일 구조를 가질 수 있다. 자원 예약기(110)는 내부에 users 디렉토리를 동적으로 생성하거나 제거할 수 있다. 자원 예약기(110) config 디렉토리를 포함할 수 있고, config 디렉토리는 자원 예약 인터페이스를 설정할 수 있는 init과 destroy 파일을 포함할 수 있다.The
자원 예약기(110)는 users 디렉토리를 통해 사용자 별로 자원을 예약할 수 있도록 사용자 아이디(uid) 기반으로 디렉토리를 만들어 관리할 수 있다. The
자원 예약기(110)는 config 디렉토리에 있는 init 파일에 사용자 아이디를 써서, users 디렉토리에 사용자 아이디 디렉토리를 생성할 수 있고, 자원 예약을 위한 파일을 생성할 수 있다. 자원 예약기(110)는 destroy 파일에 제거할 사용자 아이디를 써서, users 디렉토리에 존재하는 사용자 아이디 디렉토리를 제거할 수 있다.The
사용자 아이디 디렉토리는 자원 예약을 위한 period, quota, total_runtime 및 overrun파일을 포함할 수 있다. 자원 예약기(110)는 period에 GPU 자원 관리 주기를 저장할 수 있고, quota에 주기마다 GPU 자원을 사용할 수 있는 시간을 저장할 수 있다.The user identity directory may include period, quota, total_runtime, and overrun files for resource reservation. The
자원 예약기(110)는 total_runtime파일에 사용자가 사용한 전체 GPU 자원 시간을 저장할 수 있다. 자원 예약기(110)는 total_runtime을 읽기 전용으로, 다른 값을 설정하지 못하게 할 수 있다. 자원 예약기(110)는 overrun파일에 사용자가 예약된 자원에서 초과로 사용한 시간을 저장할 수 있다.The
자원 예약기(110)는 GPU 자원을 예약할 때 스케줄링 가능성을 분석할 수 있다. 자원 예약기는 다른 사용자들의 GPU 자원 예약 시간과의 합이 100%가 넘지 않는지 검사할 수 있다.The
자원 예약기(110)는 GPU의 자원 활용률을 계산할 수 있다. 예를 들어, 자원 예약기(110)는 특정 uid(u)를 가진 사용자의 자원 활용률 Uu를 수학식 1과 같이 계산할 수 있다.The
여기서, Qu는 uid(u)인 사용자의 quota를 의미할 수 있고, Pu는 uid(u)인 사용자의 사용 주기를 의미할 수 있다.Here, Q u may denote the quota of the user uid (u), and P u may denote the use period of the user uid (u).
자원 예약기(110)는 계층 구조를 순환탐색 하며 period와 quota 파일을 읽어 들임으로써, 수학식 1의 연산을 수행할 수 있다. 이 때, 자원 예약기(110)는 ∑Uu≤100%인지 여부를 검사하여, 검사를 통과할 경우, 즉, Uu가 100% 이하인 경우, 성공적으로 자원 예약을 수행할 수 있다.The
도 5는 도 3에 도시된 스케줄러의 개략적인 블록도를 나타낸다.Figure 5 shows a schematic block diagram of the scheduler shown in Figure 3;
도 5를 참조하면, 스케줄러(150)는 사용 시간을 합산하고, GPU에 대한 예약 시간, GPU의 사용 가능 시간 및 GPU의 이번 주기 전까지의 사용 시간에 기초하여 이번 주기에 커널을 실행할지 여부를 결정할 수 있다.Referring to FIG. 5, the
스케줄러(150)는 사용자가 설정한 주기마다 실행되며, 실행 될 때마다 커널 이벤트 관리자에서 관리하고 있는 커널 이벤트 목록을 불러오고, 커널의 GPU 사용 시간을 모두 합산 할 수 있다. 이를 통해, 스케줄러(150)는 사용자가 예약한 시간에 기초하여 이번 주기에 GPU 자원을 사용할 수 있는지 여부를 판단함으로써 GPU 자원을 스케줄링할 수 있다.The
스케줄러(150)는 GPU의 자원 관리 주기마다 자원을 스케줄링할 수 있다. 스케줄러(150)는 사용자가 예약한 시간을 가지고, 이번 주기 전 까지 사용한 커널의 사용 시간을 계산하여 이번 주기에 커널을 실행할 것인지 결정할 수 있다. 스케줄러(150)는 다음 주기에 사용할 쿼터(quota)를 계산할 수 있다.The
스케줄러(150)는 오버런 판단기(151), 제1 비교기(153), 제2 비교기(155), 제3 비교기(157) 및 결정기(159) 중 적어도 하나를 포함할 수 있다.The
오버런 판단기(151) GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간이 존재하는지 여부를 결정할 수 있다.The
제1 비교기(153)는 오버런 시간과 예약 시간을 제1 비교할 수 있다. 제2 비교기(155)는 이번 주기 전까지의 사용 시간 및 사용 가능 시간을 제2 비교할 수 있다. 제3 비교기(157)는 오버런 시간과 사용 가능 시간을 제3 비교할 수 있다.The
결정기(159)는 오버런 시간의 존재 여부, 제1 비교 결과, 제2 비교 결과 및 제3상기 비교 결과에 기초하여 예약 가능 시간 및 오버런 시간을 업데이트 하고, 커널의 실행 여부를 결정할 수 있다.The
도 6은 도 5에 도시된 스케줄러의 동작의 순서도의 예시를 나타낸다.6 shows an example of a flow chart of the operation of the scheduler shown in Fig.
도 6을 참조하면, 표 1과 같이 변수들을 정의할 수 있다.Referring to FIG. 6, variables can be defined as shown in Table 1.
스케줄러(150)는 이번 이번 주기 전까지 사용한 GPGPU 커널의 총 사용 시간(KTu)을 측정하고 GPU 자원을 스케줄링 할 수 있다. 스케줄러(150)는 이번 주기 전까지 사용한 GPGPU 커널의 총 사용 시간을 수학식 2와 같이 계산할 수 있다.The
여기서, N은 이번 주기 전까지 실행이 완료된 GPGPU 커널의 개수를 의미할 수 있다.Here, N may mean the number of GPGPU kernels that have been executed before this cycle.
도 6의 (a)를 참조하면, 오버런 판단기(151)는 KOu가 0보다 큰지 여부를 판단할 수 있다. 즉, 오버런 판단기(151)는 오버런 시간이 양수인지 여부를 판단함으로써, 오버런 시간의 존재 여부를 결정할 수 있다.Referring to FIG. 6A, the
KOu가 0보다 큰 경우에, 제1 비교기(153)는 KOu과 Qu을 비교할 수 있다. 제1 비교한 결과 KOu가 Qu보다 작으면, 이번 주기 전까지 사용한 GPU 자원 시간이 예약된 시간보다 GPU 자원을 더 많이 사용했지만, 이번 주기에서 GPU 자원을 사용할 수 있는 시간이 있다는 것을 의미할 수 있다. 이 경우, 결정기(159)는 예약된 시간에서 더 많이 사용한 시간을 제외하고 이번 주기에 GPU 커널을 사용할 수 있도록 CPu 값을 true로 설정할 수 있다.If KO u is greater than zero, the
제1 비교한 결과 KOu가 Qu보다 크면 이번 주기에 사용할 수 있는 GPU 자원 시간이 없다는 것을 의미할 수 있다. 이 경우 GPU는 한 주기를 쉬어야 하므로, 결정기(159)는 KOu에서 Qu 값을 제외하고 CPu 값을 false로 설정할 수 있다.If the first comparison shows that KO u is greater than Q u , it may mean that there is no GPU resource time available for this period. In this case, since the GPU needs to relax one cycle, the
도 6의 (b)는 오버런 시간이 없는 경우, 즉, KOu가 0인 경우를 나타낼 수 있다. 이 경우는 이번 주기 전까지 사용한 GPU 자원 시간이 예약된 시간 이내로 사용되었음을 의미할 수 있다.FIG. 6 (b) shows the case where there is no overrun time, that is, when KO u is zero. In this case, it may mean that the used GPU resource time before this period is used within the reserved time.
제2 비교기는 KTu와 CQu를 비교할 수 있다. 제2 비교 결과, KTu 값이 CQu보다 작은 경우, 이번 주기 전까지 사용한 GPGPU 사용 시간은 주어진 시간 이내인 것을 의미할 수 있다. 따라서, 결정기(159)는 이번 주기에 사용할 수 있는 시간을 사용자가 예약한 시간으로 초기화하고, 이번 주기에 GPGPU 커널을 실행할 수 있도록 CPu 값을 true로 설정할 수 있다.The second comparator can compare KT u with CQ u . As a result of the second comparison, if the value of KT u is smaller than CQ u , it means that the GPGPU use time before this cycle is within a given time. Therefore, the
제2 비교한 결과, KTu 값이 CQu보다 큰 경우, 이번 주기 전까지 사용한 커널의 GPGPU 사용 시간이 주어진 시간 보다 많다는 것을 의미할 수 있다. 이 경우 결정기(159)는 프로세스가 이번 주기에 GPGPU 자원을 사용할 수 있는지 여부를 결정하기 위하여 수학식 3과 같은 계산을 수행할 수 있다.As a result of the second comparison, if the value of KT u is larger than CQ u , it means that the GPGPU use time of the used kernel before this cycle is longer than the given time. In this case, the
수학식 3의 계산이 수행된 뒤, 제3 비교기(157)는 KOu 값과 CQu를 비교할 수 있다. 제3 비교한 결과, KOu 값이 CQu보다 작은 경우, 결정기(159)는 이번 주기에 사용할 수 있는 시간에서 초과로 사용한 시간을 제외하고 GPGPU 커널을 실행할 수 있도록 CPu 값을 true로 설정할 수 있다.After the calculation of Equation (3) is performed, the third comparator (157) can compare the value of KO u with CQ u . As a result of the third comparison, if the value of KO u is smaller than CQ u , the
제3 비교한 결과, KOu 값이 CQu보다 큰 경우, 이번 주기에 사용할 수 있는 시간보다 더 많은 시간을 사용했음을 의미할 수 있다. 이 경우, 결정기(159)는 이번 주기에 GPGPU 커널을 실행할 수 없도록 CPu 값을 false로 설정할 수 있다. 또한, GPU가 이번 주기에 커널을 실행하지 않으므로, 결정기(159)는 KOu값에서 이번 주기에 사용할 수 있는 시간 CQu만큼을 제외할 수 있다.As a result of the third comparison, if the value of KO u is larger than CQ u , it means that more time is used than the available time in this cycle. In this case, the
결정기(159)는 GPU 자원 스케줄러 내에서 계산된 CPu 값에 따라서, 다음 주기를 기다리고 있는 프로세스를 깨울지 결정할 수 있다. 깨어난 프로세스는 CPu값에 따라서 커널의 실행 유무를 결정할 수 있다.The
이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The apparatus described above may be implemented as a hardware component, a software component, and / or a combination of hardware components and software components. For example, the apparatus and components described in the embodiments may be implemented within a computer system, such as, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA) , A programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and one or more software applications running on the operating system. The processing device may also access, store, manipulate, process, and generate data in response to execution of the software. For ease of understanding, the processing apparatus may be described as being used singly, but those skilled in the art will recognize that the processing apparatus may have a plurality of processing elements and / As shown in FIG. For example, the processing unit may comprise a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as a parallel processor.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.The software may include a computer program, code, instructions, or a combination of one or more of the foregoing, and may be configured to configure the processing device to operate as desired or to process it collectively or collectively Device can be commanded. The software and / or data may be in the form of any type of machine, component, physical device, virtual equipment, computer storage media, or device , Or may be permanently or temporarily embodied in a transmitted signal wave. The software may be distributed over a networked computer system and stored or executed in a distributed manner. The software and data may be stored on one or more computer readable recording media.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions to be recorded on the medium may be those specially designed and configured for the embodiments or may be available to those skilled in the art of computer software. Examples of computer-readable media include magnetic media such as hard disks, floppy disks and magnetic tape; optical media such as CD-ROMs and DVDs; magnetic media such as floppy disks; Magneto-optical media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine language code such as those produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. For example, it is to be understood that the techniques described may be performed in a different order than the described methods, and / or that components of the described systems, structures, devices, circuits, Lt; / RTI > or equivalents, even if it is replaced or replaced.
그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are also within the scope of the following claims.
Claims (17)
GPU 자원 관리 장치가 상기 자원의 사용 시간을 측정하는 단계; 및
GPU 자원 관리 장치가 상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 단계
를 포함하고,
상기 스케줄링하는 단계는,
상기 사용 시간을 합산하는 단계; 및
상기 GPU에 대한 예약 시간, 상기 GPU의 사용 가능 시간 및 상기 GPU의 이번 주기 전까지의 사용 시간에 기초하여 이번 주기에 커널을 실행할지 여부를 결정하는 단계
를 포함하고,
상기 결정하는 단계는,
상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간이 존재하는지 여부를 결정하는 단계;
상기 오버런 시간과 상기 예약 시간을 제1 비교하는 단계;
상기 이번 주기 전까지의 사용 시간 및 상기 사용 가능 시간을 제2 비교하는 단계;
상기 오버런 시간과 상기 사용 가능 시간을 제3 비교하는 단계; 및
상기 오버런 시간의 존재 여부, 상기 제1 비교 결과, 상기 제2 비교 결과 및 상기 제3 비교 결과에 기초하여 상기 사용 가능 시간 및 상기 오버런 시간을 업데이트 하고, 상기 커널의 실행 여부를 결정하는 단계
중 적어도 하나를 포함하는 GPU 자원 관리 방법.
The GPU resource management apparatus reserving resources of the GPU on a time basis;
Measuring a usage time of the resource by the GPU resource management device; And
Wherein the GPU resource management device schedules the resource based on the usage time
Lt; / RTI >
Wherein the scheduling comprises:
Summing the usage time; And
Determining whether to execute the kernel in this cycle based on a reservation time for the GPU, a usable time of the GPU, and a usage time before the current cycle of the GPU
Lt; / RTI >
Wherein the determining comprises:
Determining whether there is an overrun time in excess of the reserved time for the GPU;
Comparing the overrun time and the reserved time first;
Comparing the use time before the current cycle and the available time second;
Comparing the overrun time and the available time third; And
Updating the usable time and the overrun time based on the existence of the overrun time, the first comparison result, the second comparison result, and the third comparison result, and determining whether to execute the kernel
Gt; GPU < / RTI >
상기 예약하는 단계는,
상기 GPU의 자원 관리 주기 및 상기 자원 관리 주기당 상기 자원의 사용 가능 시간에 기초한 자원 활용률을 이용하여 상기 자원의 예약 여부를 결정하는 단계
를 포함하는 GPU 자원 관리 방법.
The method according to claim 1,
Wherein the step of reserving comprises:
Determining whether to reserve the resource using the resource utilization rate based on the resource management period of the GPU and the available time of the resource per the resource management period;
Gt; GPU < / RTI >
상기 예약하는 단계는,
복수의 사용자에 대하여 상기 자원 관리 주기, 상기 자원의 사용 가능 시간, 상기 자원의 총 사용 시간 및 상기 GPU에 대한 예약 시간을 초과하여 사용한 상기 오버런(overrun) 시간을 저장하는 단계
를 더 포함하는 GPU 자원 관리 방법.
3. The method of claim 2,
Wherein the step of reserving comprises:
Storing the overrun time used for the plurality of users in excess of the resource management period, the available time of the resource, the total usage time of the resource, and the reservation time for the GPU
The GPU resource management method further comprising:
상기 측정하는 단계는,
상기 GPU에 의해 실행되는 커널(kernel)의 시작과 끝에 상기 커널의 실행 시간을 측정하기 위한 이벤트를 삽입하는 단계; 및
상기 이벤트를 이용하여 상기 실행 시간을 측정하는 단계
를 포함하는 GPU 자원 관리 방법.
The method according to claim 1,
Wherein the measuring step comprises:
Inserting an event for measuring the execution time of the kernel at the start and end of a kernel executed by the GPU; And
Measuring the execution time using the event
Gt; GPU < / RTI >
상기 스케줄링하는 단계는,
상기 GPU의 자원 관리 주기마다 상기 자원을 스케줄링하는
GPU 자원 관리 방법.
The method according to claim 1,
Wherein the scheduling comprises:
Scheduling the resource for each resource management cycle of the GPU
How to manage GPU resources.
상기 측정하는 단계는,
별도의 스레드(thread)를 이용하여 상기 사용 시간을 측정하는
GPU 자원 관리 방법.
The method according to claim 1,
Wherein the measuring step comprises:
The use time is measured by using a separate thread
How to manage GPU resources.
를 포함하고,
상기 컨트롤러는,
상기 사용 시간에 기초하여 상기 자원을 스케줄링하는 스케줄러
를 포함하고,
상기 스케줄러는 상기 사용 시간을 합산하고,
상기 GPU에 대한 예약 시간을 초과하여 사용한 오버런(overrun) 시간이 존재하는지 여부를 결정하는 오버런 판단기;
상기 오버런 시간과 상기 예약 시간을 제1 비교하는 제1 비교기;
상기 GPU의 이번 주기 전까지의 사용 시간 및 상기 GPU의 사용 가능 시간을 제2 비교하는 제2 비교기;
상기 오버런 시간과 상기 사용 가능 시간을 제3 비교하는 제3 비교기; 및
상기 오버런 시간의 존재 여부, 상기 제1 비교 결과, 상기 제2 비교 결과 및 상기 제3 비교 결과에 기초하여 상기 사용 가능 시간 및 상기 오버런 시간을 업데이트 하고, 커널의 실행 여부를 결정하는 결정기;
중 적어도 하나를 포함하는 GPU 자원 관리 장치.
A controller that reserves a resource of the GPU on a time basis, measures the use time of the resource, and schedules the resource based on the usage time,
Lt; / RTI >
The controller comprising:
A scheduler for scheduling the resource based on the usage time;
Lt; / RTI >
Wherein the scheduler sums the use time,
An overrun determinator for determining whether there is an overrun time in excess of the reserved time for the GPU;
A first comparator for comparing the overrun time and the reserved time first;
A second comparator for comparing a usage time before the current cycle of the GPU and a usable time of the GPU;
A third comparator for comparing the overrun time and the usable time third; And
A determiner for updating the usable time and the overrun time based on the existence of the overrun time, the first comparison result, the second comparison result, and the third comparison result, and determining whether to execute the kernel;
The GPU resource management apparatus comprising:
상기 컨트롤러는,
상기 GPU의 자원(resource)을 시간 단위로 예약하는 자원 예약기; 및
상기 자원의 사용 시간을 측정하는 사용 시간 측정기
를 더 포함하는 GPU 자원 관리 장치.
10. The method of claim 9,
The controller comprising:
A resource reservation unit for reserving resources of the GPU on a time basis; And
A use time meter for measuring the use time of the resource
The GPU resource management apparatus further comprising:
상기 자원 예약기는,
상기 GPU의 자원 관리 주기 및 상기 자원 관리 주기당 상기 자원의 사용 가능 시간에 기초한 자원 활용률을 이용하여 상기 자원의 예약 여부를 결정하는
GPU 자원 관리 장치.
11. The method of claim 10,
Wherein the resource reservation unit comprises:
The resource utilization rate based on the resource management period of the GPU and the available time of the resource per the resource management period is used to determine whether to reserve the resource
GPU resource management device.
상기 자원 예약기는,
복수의 사용자에 대하여 상기 자원 관리 주기, 상기 자원의 사용 가능 시간, 상기 자원의 총 사용 시간 및 상기 GPU에 대한 예약 시간을 초과하여 사용한 상기 오버런(overrun) 시간을 저장하는
GPU 자원 관리 장치.
12. The method of claim 11,
Wherein the resource reservation unit comprises:
Storing the overrun time used for the plurality of users in excess of the resource management period, the available time of the resource, the total usage time of the resource, and the reserved time for the GPU
GPU resource management device.
상기 사용 시간 측정기는,
상기 GPU에 의해 실행되는 커널(kernel)의 시작과 끝에 상기 커널의 실행 시간을 측정하기 위한 이벤트를 삽입하고, 상기 이벤트를 이용하여 상기 실행 시간을 측정하는
GPU 자원 관리 장치.
11. The method of claim 10,
Wherein the use time meter comprises:
An event for measuring the execution time of the kernel is inserted at the start and end of a kernel executed by the GPU, and the execution time is measured using the event
GPU resource management device.
상기 스케줄러는,
상기 GPU의 자원 관리 주기마다 상기 자원을 스케줄링하는
GPU 자원 관리 장치.
10. The method of claim 9,
The scheduler comprising:
Scheduling the resource for each resource management cycle of the GPU
GPU resource management device.
상기 사용 시간 측정기는,
별도의 스레드(thread)를 이용하여 상기 사용 시간을 측정하는
GPU 자원 관리 장치.
11. The method of claim 10,
Wherein the use time meter comprises:
The use time is measured by using a separate thread
GPU resource management device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170127651A KR101960609B1 (en) | 2017-09-29 | 2017-09-29 | A method and apparatus for managing gpu resources by task group unit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170127651A KR101960609B1 (en) | 2017-09-29 | 2017-09-29 | A method and apparatus for managing gpu resources by task group unit |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101960609B1 true KR101960609B1 (en) | 2019-07-15 |
Family
ID=67257560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170127651A Active KR101960609B1 (en) | 2017-09-29 | 2017-09-29 | A method and apparatus for managing gpu resources by task group unit |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101960609B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024066330A1 (en) * | 2022-09-27 | 2024-04-04 | 中兴通讯股份有限公司 | Gpu resource scheduling method, server and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20150123519A (en) * | 2014-04-25 | 2015-11-04 | 전자부품연구원 | System and Method for Allocating Job for Operating GPU |
US20160034314A1 (en) * | 1999-06-21 | 2016-02-04 | Jia Xu | Method of computing latest start times to allow real-time process overruns |
JP2017037533A (en) * | 2015-08-11 | 2017-02-16 | 日本電信電話株式会社 | Processor allocation apparatus and processor allocation method |
KR101710910B1 (en) * | 2010-09-27 | 2017-03-13 | 삼성전자 주식회사 | Method and apparatus for dynamic resource allocation of processing unit |
JP2017091154A (en) * | 2015-11-09 | 2017-05-25 | 日本電気株式会社 | Virtual base host, method for controlling virtual base host, virtual base host program, and communication system |
KR101755154B1 (en) * | 2016-04-27 | 2017-07-19 | 한양대학교 산학협력단 | Method and apparatus for power load balancing for heterogeneous processors |
-
2017
- 2017-09-29 KR KR1020170127651A patent/KR101960609B1/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160034314A1 (en) * | 1999-06-21 | 2016-02-04 | Jia Xu | Method of computing latest start times to allow real-time process overruns |
KR101710910B1 (en) * | 2010-09-27 | 2017-03-13 | 삼성전자 주식회사 | Method and apparatus for dynamic resource allocation of processing unit |
KR20150123519A (en) * | 2014-04-25 | 2015-11-04 | 전자부품연구원 | System and Method for Allocating Job for Operating GPU |
JP2017037533A (en) * | 2015-08-11 | 2017-02-16 | 日本電信電話株式会社 | Processor allocation apparatus and processor allocation method |
JP2017091154A (en) * | 2015-11-09 | 2017-05-25 | 日本電気株式会社 | Virtual base host, method for controlling virtual base host, virtual base host program, and communication system |
KR101755154B1 (en) * | 2016-04-27 | 2017-07-19 | 한양대학교 산학협력단 | Method and apparatus for power load balancing for heterogeneous processors |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024066330A1 (en) * | 2022-09-27 | 2024-04-04 | 中兴通讯股份有限公司 | Gpu resource scheduling method, server and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6499986B2 (en) | Fault tolerant batch processing | |
US10884822B2 (en) | Deterministic parallelization through atomic task computation | |
CN114327829B (en) | Multi-core real-time task scheduling analysis and simulation system and method | |
US8739171B2 (en) | High-throughput-computing in a hybrid computing environment | |
US20150178126A1 (en) | Backfill scheduling for embarrassingly parallel jobs | |
US20120131584A1 (en) | Devices and Methods for Optimizing Data-Parallel Processing in Multi-Core Computing Systems | |
Maia et al. | Schedulability analysis for global fixed-priority scheduling of the 3-phase task model | |
US9875169B2 (en) | Modeling real capacity consumption changes using process-level data | |
US11880715B2 (en) | Method and system for opportunistic load balancing in neural networks using metadata | |
WO2012096849A2 (en) | System and method for controlling excessive parallelism in multiprocessor systems | |
WO2019193570A1 (en) | Batch jobs execution time prediction using distinct service demand of threads and instantaneous cpu utilization | |
WO2020008392A2 (en) | Predicting execution time of memory bandwidth intensive batch jobs | |
Amert et al. | OpenVX and real-time certification: The troublesome history | |
Rochange et al. | WCET analysis of a parallel 3D multigrid solver executed on the MERASA multi-core | |
Maity et al. | Thermal-aware adaptive platform management for heterogeneous embedded systems | |
Hosny et al. | Characterizing and optimizing EDA flows for the cloud | |
Ousterhout et al. | Performance clarity as a first-class design principle | |
KR101960609B1 (en) | A method and apparatus for managing gpu resources by task group unit | |
Liu et al. | High-responsive scheduling with mapreduce performance prediction on hadoop YARN | |
Soysal et al. | On the quality of wall time estimates for resource allocation prediction | |
CN112463334B (en) | Training task queuing reason analysis method, system, equipment and medium | |
EP4357925A1 (en) | Method and device for finding causality between application instrumentation points | |
US9152451B2 (en) | Method of distributing processor loading between real-time processor threads | |
Chahal et al. | Predicting the Runtime of Memory Intensive Batch Workloads | |
CN108009074B (en) | Multi-core system real-time evaluation method based on model and dynamic analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20170929 |
|
PA0201 | Request for examination | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20180814 Patent event code: PE09021S01D |
|
PE0601 | Decision on rejection of patent |
Patent event date: 20190130 Comment text: Decision to Refuse Application Patent event code: PE06012S01D Patent event date: 20180814 Comment text: Notification of reason for refusal Patent event code: PE06011S01I |
|
PX0901 | Re-examination |
Patent event code: PX09011S01I Patent event date: 20190130 Comment text: Decision to Refuse Application Patent event code: PX09012R01I Patent event date: 20181004 Comment text: Amendment to Specification, etc. |
|
PX0701 | Decision of registration after re-examination |
Patent event date: 20190311 Comment text: Decision to Grant Registration Patent event code: PX07013S01D Patent event date: 20190304 Comment text: Amendment to Specification, etc. Patent event code: PX07012R01I Patent event date: 20190130 Comment text: Decision to Refuse Application Patent event code: PX07011S01I Patent event date: 20181004 Comment text: Amendment to Specification, etc. Patent event code: PX07012R01I |
|
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20190314 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20190314 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
PR1001 | Payment of annual fee |
Payment date: 20220307 Start annual number: 4 End annual number: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20231227 Start annual number: 6 End annual number: 6 |
|
PR1001 | Payment of annual fee |
Payment date: 20241230 Start annual number: 7 End annual number: 7 |