KR102605313B1 - Early virtualization context switching for virtualized accelerated processing devices - Google Patents

Early virtualization context switching for virtualized accelerated processing devices Download PDF

Info

Publication number
KR102605313B1
KR102605313B1 KR1020207001390A KR20207001390A KR102605313B1 KR 102605313 B1 KR102605313 B1 KR 102605313B1 KR 1020207001390 A KR1020207001390 A KR 1020207001390A KR 20207001390 A KR20207001390 A KR 20207001390A KR 102605313 B1 KR102605313 B1 KR 102605313B1
Authority
KR
South Korea
Prior art keywords
apd
virtualization
function
context switch
early
Prior art date
Application number
KR1020207001390A
Other languages
Korean (ko)
Other versions
KR20200014426A (en
Inventor
공시안 제프리 쳉
루이스 레그니어
안소니 아사로
Original Assignee
어드밴스드 마이크로 디바이시즈, 인코포레이티드
에이티아이 테크놀로지스 유엘씨
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 어드밴스드 마이크로 디바이시즈, 인코포레이티드, 에이티아이 테크놀로지스 유엘씨 filed Critical 어드밴스드 마이크로 디바이시즈, 인코포레이티드
Publication of KR20200014426A publication Critical patent/KR20200014426A/en
Application granted granted Critical
Publication of KR102605313B1 publication Critical patent/KR102605313B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors

Abstract

가상화 가속 처리 디바이스("APD")에서 자원의 효율적인 시분할을 위한 기술이 제공된다. APD에 구현된 가상화 스킴에서, 상이한 가상 머신에는 APD를 사용할 상이한 "시간 슬라이스"가 할당된다. 시간-슬라이스가 만료되었을 때, APD는 현재 가상 머신("VM")에 대한 동작을 중지하고 또 다른 VM에 대한 동작을 시작함으로써 가상화 컨텍스트 전환을 수행한다. 전형적으로, 각 VM에는 고정된 길이의 시간이 할당되고, 이 후 가상화 컨텍스트 전환이 수행된다. 이 고정된 시간길이는 비효율을 초래할 수 있다. 따라서, 일부 상황에서, VM이 APD에서 수행할 작업이 더 이상 갖고 있지 않고 APD가 아이들인 것에 응답하여, 가상화 컨텍스트 전환이 "조기에" 수행된다. 이 가상화 컨텍스트 전환은 가상화 컨텍스트 전환이 시간-슬라이스에 대한 고정 시간길이가 만료되기 전에 수행되는 점에서 "조기"이다.A technology for efficient time sharing of resources in a virtualized accelerated processing device (“APD”) is provided. In the virtualization scheme implemented in APD, different virtual machines are assigned different “time slices” to use the APD. When a time-slice expires, APD performs a virtualization context switch by stopping operation on the current virtual machine (“VM”) and starting operation on another VM. Typically, each VM is allocated a fixed length of time, after which a virtualization context switch is performed. This fixed length of time can lead to inefficiencies. Therefore, in some situations, a virtualization context switch is performed “early” in response to the VM no longer having work to do in the APD and the APD being idle. This virtualization context switch is "early" in the sense that the virtualization context switch is performed before the fixed time length for the time-slice expires.

Figure R1020207001390
Figure R1020207001390

Description

가상화된 가속 처리 디바이스를 위한 조기 가상화 컨텍스트 전환Early virtualization context switching for virtualized accelerated processing devices

관련 출원에 대한 상호 참조Cross-reference to related applications

이 출원은 2017년 6월 29일에 출원된 미국의 일반 출원 15/637,800의 우선권을 주장하며, 그 내용은 본원에 완전히 개시된 것처럼 참조로 포함된다.This application claims priority from U.S. General Application No. 15/637,800, filed June 29, 2017, the contents of which are incorporated by reference as if fully set forth herein.

컴퓨터 가상화는 단일의 한 세트의 하드웨어가 컴퓨터 시스템의 상이한 가상 인스턴스들 사이에서 공유되는 기술이다. 각 인스턴스 -가상 머신("VM")- 는 이것이 전체 하드웨어 컴퓨터 시스템을 소유하고 있다고 생각하지만, 실제로 컴퓨터 시스템의 하드웨어 자원은 상이한 VM들 간에 공유된다. CPU, 시스템 메모리, 등 이외의 디바이스에 대한 가상화의 진보를 포함하여 가상화의 진보는 계속되고 있다.Computer virtualization is a technology in which a single set of hardware is shared between different virtual instances of a computer system. Each instance - a virtual machine ("VM") - thinks it owns the entire hardware computer system, but in reality the computer system's hardware resources are shared among the different VMs. Advances in virtualization continue, including advances in virtualization for devices other than CPUs, system memory, etc.

첨부 도면과 함께 예로서 주어진 다음의 설명으로부터 보다 상세한 이해가 이루어질 수 있다.
도 1은 본 개시의 하나 이상의 특징이 구현될 수 있는 예시적 디바이스의 블록도이다.
도 2는 예에 따라, 가상화와 관련된 디바이스 및 가속 처리 디바이스의 세부 사항을 도시한다.
도 3은 도 2에 도시된 그래픽 처리 파이프라인의 추가 세부 사항을 도시하는 블록도이다.
도 4는 예에 따라, 조기 가상화 컨텍스트 전환을 수행하는 것과 관련된 도 1의 디바이스의 특징을 도시하는 블록도이다.
도 5는 예에 따라, 조기 가상화 컨텍스트 전환을 수행하기 위한 방법의 흐름도이다.
A more detailed understanding can be obtained from the following description given by way of example in conjunction with the accompanying drawings.
1 is a block diagram of an example device in which one or more features of the present disclosure may be implemented.
2 shows details of accelerated processing devices and devices involved in virtualization, according to an example.
FIG. 3 is a block diagram illustrating additional details of the graphics processing pipeline shown in FIG. 2.
FIG. 4 is a block diagram illustrating features of the device of FIG. 1 related to performing an early virtualization context switch, according to an example.
5 is a flow diagram of a method for performing an early virtualization context switch, according to an example.

가상화된 가속 처리 디바이스("APD")에서 자원의 효율적인 시분할 기술이 제공된다. APD에 구현된 가상화 스킴에서, 상이한 가상 머신에는 APD를 사용할 상이한 "시간-슬라이스"가 할당된다. 시간-슬라이스가 만료되었을 때, APD는 현재 가상 머신("VM")에 대한 동작을 중지하고 또 다른 VM에 대한 동작을 시작함으로써 가상화 컨텍스트 전환을 수행한다. 상이한 시간-슬라이스는 상이한 기능(예를 들어, 가상 기능 -주변 성분 상호연결 익스프레스("PCIe") 어드레싱 파라미터)과 관련된다.An efficient time sharing technique of resources is provided in a virtualized accelerated processing device (“APD”). In the virtualization scheme implemented in APD, different virtual machines are assigned different “time-slices” to use the APD. When a time-slice expires, APD performs a virtualization context switch by stopping operation on the current virtual machine (“VM”) and starting operation on another VM. Different time-slices are associated with different functions (eg, virtual functions - Peripheral Component Interconnect Express (“PCIe”) addressing parameters).

전형적으로, 각 VM에는 고정된 길이의 시간이 할당되고 이 후에 가상화 컨텍스트 전환이 수행된다. 이 고정된 시간 길이는 비효율에 이르게 할 수 있다. 예를 들어, 일부 상황에서, VM은 더 이상 수행할 작업이 없고 아이들이지만 이 VM에 대한 현재 시간-슬라이스에 일부 시간이 여전히 남아 있다. 따라서, 일부 상황에서, APD에 대해 수행할 작업이 더 이상 없고 APD가 아이들인 VM에 응답하여, 가상화 컨텍스트 전환이 "조기에" 수행된다. 이 가상화 컨텍스트 전환은 시간 슬라이스의 고정된 시간 길이가 만료되기 전에 가상화 컨텍스트 전환이 수행되는 점에서 "조기" 이다. Typically, each VM is allocated a fixed length of time after which a virtualization context switch is performed. This fixed length of time can lead to inefficiency. For example, in some situations, a VM has no more work to do and is idle, but there is still some time left in the current time-slice for this VM. Therefore, in some situations, a virtualization context switch is performed “early” in response to a VM that has no more work to do on the APD and the APD is idle. This virtualization context switch is "early" in the sense that the virtualization context switch is performed before the fixed time length of the time slice expires.

일부 구현에서, APD는 APD가 아이들이라는 것과 조기 가상화 컨텍스트 전환을 수행하기 전에 수행할 작업이 더 이상 없다는 것을 검출한 후 타임아웃 기간 동안 대기한다. 이 타임아웃 기간 동안 추가 작업이 수신되고 현재 시간-슬라이스에 남아 있는 충분한 시간이 있다면, 조기 가상화 컨텍스트 전환은 수행되지 않는다. 대신, APD는 새로운 작업을 페치(fetch)하여 이 작업을 수행하는 것이 허용된다. 이 타임아웃 기간 동안 추가 작업이 수신되지 않는다면, 조기 가상화 컨텍스트 전환이 수행된다.In some implementations, the APD waits for a timeout period after detecting that the APD is idle and has no more work to do before performing an early virtualization context switch. If additional work is received during this timeout period and there is sufficient time remaining in the current time-slice, no premature virtualization context switch is performed. Instead, APD is allowed to perform this task by fetching a new task. If no additional work is received during this timeout period, an early virtualization context switch is performed.

일부 구현에서, 기능에 대해 조기 가상화 컨텍스트 전환이 수행된 후, 조기 가상화 컨텍스트 전환이 수행된 이후 어떠한 작업도 수신되지 않았다면 APD는 APD에서 그 기능을 재-스케줄링하지 않는다. 일부 예에서, 메모리 매핑 "도어벨" 어드레스가 기입되었을 때, 작업이 특정 기능에 대한 준비가 되었음이 APD에 통지하게 하는 도어벨 메커니즘이 구현된다. 상이한 도어벨(따라서 상이한 도어벨 어드레스)은 상이한 가상 기능에 연관된다. 따라서, 특정 기능에 대한 어떠한 도어벨도 이 기능에 대해 조기 가상화 컨텍스트 전환이 발생한 후에 수신되지 않으면, APD는 다음에 APD에 대한 가상화 시간-슬라이싱 스킴에서 "턴"이 발생할 때에 그 기능에 대한 작업을 실행하지 않는다.In some implementations, after an early virtualization context switch is performed for a function, the APD does not re-schedule that function in the APD if no work has been received since the early virtualization context switch was performed. In some examples, a doorbell mechanism is implemented that, when a memory mapped "doorbell" address is written, notifies the APD that a task is ready for a particular function. Different doorbells (and therefore different doorbell addresses) are associated with different virtual functions. Therefore, if no doorbell for a particular function is received after an early virtualization context switch occurs for that function, the APD will resume work on that function the next time a "turn" occurs in the virtualization time-slicing scheme for the APD. don't run

도 1은 본 개시의 하나 이상의 특징이 구현될 수 있는 예시적 디바이스(100)의 블록도이다. 디바이스(100)는 예를 들어 컴퓨터, 게이밍 디바이스, 핸드헬드 디바이스, 셋톱 박스, 텔레비전, 모바일 전화, 또는 태블릿 컴퓨터를 포함할 수 있다. 디바이스(100)는 프로세서(102)("호스트 프로세서"라고도 함), 메모리(104), 저장장치(106), 하나 이상의 입력 디바이스(108), 및 하나 이상의 출력 디바이스(110)를 포함할 수 있다. 디바이스(100)는 선택적으로 입력 드라이버(112) 및 출력 드라이버(114)를 포함할 수 있다. 디바이스(100)는 도 1에 도시되지 않은 추가 성분을 포함할 수 있음이 이해된다.1 is a block diagram of an example device 100 in which one or more features of the present disclosure may be implemented. Device 100 may include, for example, a computer, gaming device, handheld device, set-top box, television, mobile phone, or tablet computer. Device 100 may include a processor 102 (also referred to as a “host processor”), memory 104, storage 106, one or more input devices 108, and one or more output devices 110. . Device 100 may optionally include an input driver 112 and an output driver 114. It is understood that device 100 may include additional components not shown in FIG. 1 .

다양한 대안에서, 프로세서(102)는 중앙 처리 유닛(CPU), 그래픽 처리 유닛(GPU), 동일한 다이 상에 위치된 CPU 및 GPU, 또는 하나 이상의 프로세서 코어를 포함하며, 각각의 프로세서 코어는 CPU 또는 GPU일 수 있다. 다양한 대안에서, 메모리(104)는 프로세서(102)와 동일한 다이 상에 위치되거나 프로세서(102)와는 별도로 위치된다. 메모리(104)는 휘발성 또는 비휘발성 메모리, 예를 들어, 랜덤 액세스 메모리(RAM), 동적 RAM, 또는 캐시를 포함한다.In various alternatives, processor 102 includes a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU located on the same die, or one or more processor cores, each processor core being a CPU or GPU. It can be. In various alternatives, memory 104 is located on the same die as processor 102 or is located separately from processor 102. Memory 104 includes volatile or non-volatile memory, such as random access memory (RAM), dynamic RAM, or cache.

저장장치(106)는 고정 또는 탈착가능 저장장치, 예를 들어 하드 디스크 드라이브, 솔리드 스테이트 드라이브, 광학 디스크, 또는 플래시 드라이브를 포함한다. 입력 디바이스(108)는, 제한없이, 키보드, 키패드, 터치 스크린, 터치 패드, 검출기, 마이크로폰, 가속도계, 자이로스코프, 생체인식 스캐너, 또는 네트워크 연결(예를 들어, 무선 IEEE 802 신호의 전송 및/또는 수신을 위한 무선 근거리 네트워크 카드)을 포함한다. 출력 디바이스(110)는, 제한없이, 디스플레이, 스피커, 프린터, 햅틱 피드백 디바이스, 하나 이상의 조명, 안테나, 또는 네트워크 연결(예를 들어, 무선 IEEE 802 신호의 송신 및/또는 수신을 위한 무선 근거리 네트워크 카드)을 포함한다 Storage device 106 includes a fixed or removable storage device, such as a hard disk drive, solid state drive, optical disk, or flash drive. Input device 108 may include, without limitation, a keyboard, keypad, touch screen, touch pad, detector, microphone, accelerometer, gyroscope, biometric scanner, or network connection (e.g., transmission of wireless IEEE 802 signals and/or Includes a wireless local area network card for reception. Output device 110 may include, without limitation, a display, speaker, printer, haptic feedback device, one or more lights, antennas, or network connections (e.g., a wireless local area network card for transmitting and/or receiving wireless IEEE 802 signals). ) includes

입력 드라이버(112)는 프로세서(102) 및 입력 디바이스(108)와 통신하고, 프로세서(102)가 입력 디바이스(108)로부터 입력을 수신할 수 있게 한다. 출력 드라이버(114)는 프로세서(102) 및 출력 디바이스(110)와 통신하고, 프로세서(102)가 출력 디바이스(110)에 출력을 보낼 수 있게 한다. 입력 드라이버(112) 및 출력 드라이버(114)는 선택적인 성분이며, 입력 드라이버(112) 및 출력 드라이버(114)가 존재하지 않으면 디바이스(100)는 동일한 방식으로 동작할 것임에 유의한다. 출력 드라이버(114)는 디스플레이 디바이스(118)에 결합된 가속 처리 디바이스("APD")(116)를 포함한다. APD는 프로세서(102)로부터 계산 커맨드 및 그래픽 렌더링 커맨드를 수용하고, 이들 계산 및 그래픽 렌더링 커맨드를 처리하고, 디스플레이를 위해 디스플레이 디바이스(118)에 픽셀 출력을 제공하도록 구성된다. 아래에 더 상세히 설명되는 바와 같이, APD(116)는 단일-명령-다중-데이터("SIMD") 패러다임에 따라 계산을 수행하도록 구성된 하나 이상의 병렬 처리 유닛을 포함한다. 따라서, 본원에서 다양한 기능이 APD(116)에 의해 또는 이와 함께 수행되는 것으로 설명되지만, 다양한 대안에서, APD(116)에 의해 수행되는 것으로서 설명된 기능은, 부가적으로 또는 대안적으로, 호스트 프로세서(예를 들어, 프로세서(102))에 의해 구동되지 않고 그래픽 출력을 디스플레이 디바이스(118)에 제공하도록 구성된 유사한 능력을 갖는 다른 계산 디바이스에 의해 수행된다. 예를 들어, SIMD 패러다임에 따라 처리 타스크를 수행하는 임의의 처리 시스템은 본원에 설명된 기능을 수행하도록 구성될 수 있음이 고려된다. 대안적으로, SIMD 패러다임에 따라 처리 타스크를 수행하지 않는 계산 시스템은 본원에 기술된 기능을 수행하는 것이 고려된다.Input driver 112 communicates with processor 102 and input device 108 and enables processor 102 to receive input from input device 108. Output driver 114 communicates with processor 102 and output device 110 and enables processor 102 to send output to output device 110. Note that input driver 112 and output driver 114 are optional components, and device 100 will operate in the same manner if input driver 112 and output driver 114 are not present. Output driver 114 includes an accelerated processing device (“APD”) 116 coupled to display device 118. The APD is configured to accept computational commands and graphics rendering commands from processor 102, process these computational and graphics rendering commands, and provide pixel output to display device 118 for display. As described in more detail below, APD 116 includes one or more parallel processing units configured to perform computations according to a single-instruction-multiple-data (“SIMD”) paradigm. Accordingly, although various functions are described herein as being performed by or in conjunction with APD 116, in various alternatives, functions described as being performed by APD 116 may additionally or alternatively be performed by a host processor. It is not driven by processor 102 (e.g., processor 102) but is performed by another computing device with similar capabilities configured to provide graphical output to display device 118. For example, it is contemplated that any processing system that performs processing tasks according to the SIMD paradigm may be configured to perform the functions described herein. Alternatively, computational systems that do not perform processing tasks according to the SIMD paradigm are contemplated to perform the functions described herein.

프로세서(102)는 다수의 가상 머신이 프로세서(102)에서 실행하는 가상화 스킴을 지원하도록 구성된다. 각각의 가상 머신("VM")은 이 VM에서 실행되는 소프트웨어에 대해 완전히 "실제" 하드웨어 컴퓨터 시스템으로서 "나타나는데", 그러나 실제로는 디바이스(100)를 다른 가상 머신과 공유할 수 있는 가상화된 계산 환경을 포함한다. 가상화는 완전히 소프트웨어로, 또는 부분적으로 하드웨어 및 부분적으로 소프트웨어로, 또는 완전히 하드웨어로 지원될 수 있다. APD(116)는 가상화를 지원하는데, 이는 APD(116)가 프로세서(102) 상에서 실행되는 다수의 가상 머신 간에 공유될 수 있다는 것을 의미하며, 각각의 VM은 VM이 실제 하드웨어 APD(116)의 완전한 소유권을 갖는다고 "믿는다".The processor 102 is configured to support a virtualization scheme in which multiple virtual machines run on the processor 102. Each virtual machine (“VM”) “appears” to the software running on the VM as a completely “real” hardware computer system, but is actually a virtualized computing environment that can share devices 100 with other virtual machines. Includes. Virtualization can be supported entirely by software, partly by hardware and partly by software, or entirely by hardware. APD 116 supports virtualization, meaning that APD 116 can be shared among multiple virtual machines running on processor 102, each VM having a complete view of the physical hardware APD 116. “Believes” you have ownership.

도 2는 예에 따라, 가상화와 관련된 디바이스(100) 및 APD(116)의 세부사항을 도시한다. 프로세서(102)는 다수의 가상 머신을 지원한다. 전용 호스트 가상 머신(202)은 게스트 VM(204)처럼 "범용" VM이 아니라 대신에 게스트 VM(204)에 의한 사용을 위한 APD(116)의 가상화에 대한 지원을 수행한다. 하이퍼바이저(206)는 가상 머신에 대한 가상화 지원을 제공하는데, 이는 가상 머신에 할당된 자원 관리, 가상 머신 스포닝(spawning) 및 킬링, 시스템 호출 취급, 주변 디바이스에의 액세스를 관리, 메모리 및 페이지 테이블 관리, 및 다른 다양한 기능과 같은, 다양한 기능이 포함한다.2 shows details of device 100 and APD 116 related to virtualization, according to an example. Processor 102 supports multiple virtual machines. The dedicated host virtual machine 202 is not a “general purpose” VM like the guest VM 204 but instead provides support for virtualization of the APD 116 for use by the guest VM 204. Hypervisor 206 provides virtualization support for virtual machines, including managing resources allocated to virtual machines, spawning and killing virtual machines, handling system calls, managing access to peripheral devices, memory, and page tables. It includes various features, such as management, and various other functions.

APD(116)는 가상 머신 간에 APD(116)의 시간-기반 공유를 허용함으로써 가상화를 지원한다. APD(116)에서, 호스트 VM(202)은 물리적 기능(208)에 매핑되고 게스트 VM(204)은 가상 기능(210)에 매핑된다. "물리적 기능"은 본질적으로 주변 성분 상호연결 익스프레스("PCIe") 표준에서 어드레싱 파라미터이다. 보다 구체적으로, 물리적 기능은 디바이스가 물리적 기능에 특정하게 할당된 기능에 따라 통신을 취급할 수 있도록 PCIe 상호연결 패브릭에 결합된 디바이스를 수반하는 통신이 디바이스의 특정 물리적 기능을 특정할 수 있게 한다. 일 예에서, 물리적 기능은 APD(116)와 같은 그래픽 처리 디바이스 상의 정규 그래픽 렌더링과 관련된다. 여기에서, 단일 물리적 기능이 설명되지만, 본 개시의 교시는 하나 이상의 물리적 기능이 활성된 APD(116)에 적용한다.APD 116 supports virtualization by allowing time-based sharing of APD 116 between virtual machines. In APD 116, host VM 202 is mapped to physical function 208 and guest VM 204 is mapped to virtual function 210. “Physical functions” are essentially addressing parameters in the Peripheral Component Interconnect Express (“PCIe”) standard. More specifically, the physical function allows communications involving a device coupled to the PCIe interconnect fabric to specify a particular physical function of the device such that the device can treat the communication according to the function specifically assigned to the physical function. In one example, the physical functions relate to regular graphics rendering on a graphics processing device, such as APD 116. Although a single physical function is described herein, the teachings of this disclosure apply to APD 116 with more than one physical function activated.

가상 기능은, 하드웨어 가상화를 용이하게 하며 PCIe 표준에서 어드레싱 파라미터로서 작용하는 PCIe 표준의 특징이다. 전형적으로, 한 세트의 가상 기능은 특정 물리적 기능과 연관된다. 각각의 가상 머신에는 상이한 가상 기능이 할당되고, 하이퍼바이저(206)는 VM과 가상 기능 간의 상관을 관리한다. 가상 기능과 가상 머신(202) 간에 이러한 상관은 호스트 VM(202)이 상이한 가상 기능(210) 중 임의의 기능 뿐만 아니라 물리적 기능(208)에 액세스할 수 있다는 것을 제외하고는 도 2의 시스템에서 대부분 사실이다. 이러한 점에서, 호스트 VM(202)는 APD 가상화를 위한 일종의 "마스터 가상 머신" 역할을 한다. 일부 시스템에서, 호스트 VM(202)은 존재하지 않으며, 여기서 설명된 호스트 VM(202)의 기능은 대신에 하이퍼바이저(206)에 의해 수행된다(GPU 가상화 드라이버(121)가 하이퍼바이저(206)에서 점선으로 도시된 이유이다). 본원에서 가상 기능이 가상 머신과 관련되는 것으로 때때로 설명되지만, 물리적 기능이 하나 이상의 가상 머신과 관련되는 것도 가능함에 유의한다. 전형적으로, 호스트 VM(202)은 물리적 기능과 "연관된" 것으로 간주되고, 게스트 VM(204)은 가상 기능과 연관된다. 가상 및 물리적 기능이 일부 맥락에서 유사한 방식으로 동작하는 것이 가능하기 때문에, 지정자 "가상" 또는 "물리적" 내에서 "기능"이라는 용어는 가상 기능 또는 물리적 기능 또는 집합적으로 가상 기능과 물리적 기능 둘 다를 지칭한다. 예를 들어, 일부 경우에, APD(116)가 기능들 간에 동작들을 시분할한다고 할 수도 있는데, 이는 APD(116)가 상이한 가상 기능들과, APD(116)에서 시분할에 적극적으로 참여한다면, 물리적 기능 간에 시분할됨을 의미한다. 이 시간 공유에 물리적 기능이 참여할 필요는 없지만, 이러한 물리적 기능이 참여하는 것은 가능하다.Virtual functions are a feature of the PCIe standard that facilitates hardware virtualization and acts as an addressing parameter in the PCIe standard. Typically, a set of virtual functions is associated with specific physical functions. Each virtual machine is assigned a different virtual function, and hypervisor 206 manages the correlation between VMs and virtual functions. This correlation between virtual functions and virtual machines 202 is largely the same in the system of Figure 2, except that the host VM 202 can access physical functions 208 as well as any of the different virtual functions 210. It's true. In this respect, the host VM 202 serves as a kind of “master virtual machine” for APD virtualization. In some systems, the host VM 202 is not present, and the functions of the host VM 202 described herein are instead performed by the hypervisor 206 (the GPU virtualization driver 121 operates in the hypervisor 206). This is why it is shown as a dotted line). Note that although virtual functions are sometimes described herein as being associated with virtual machines, it is also possible for physical functions to be associated with one or more virtual machines. Typically, the host VM 202 is considered “associated” with a physical function and the guest VM 204 is associated with a virtual function. Because it is possible for virtual and physical functions to behave in similar ways in some contexts, the term "function" within the designators "virtual" or "physical" can refer to either virtual functions or physical functions, or collectively both virtual and physical functions. refers to For example, in some cases, APD 116 may be said to time-share operations between functions, meaning that APD 116 may have different virtual functions and, if APD 116 actively participates in time-sharing, physical functions. This means that time is divided between the two. It is not necessary for a physical function to participate in this time sharing, but it is possible for such a physical function to participate.

위에서 설명한 바와 같이, 물리적 기능과 가상 기능은 PCIe에서 어드레싱 파라미터이다. PCIe를 통한 트랜잭션은 물리적 기능에 그리고 선택적으로, 부가적으로, 가상 기능에 연관된다. PCIe를 통한 어드레싱은 버스-디바이스-기능 번호 패러다임을 통해 명시적으로 이루어질 수 있지만, 이 어드레싱 패러다임은 일반적으로 디바이스 구성(예를 들어 PCIe 디바이스 목록) 또는 다른 상황을 위해 예약되어 있다. 보다 일반적으로, 그리고 표준 동작에서, PCIe를 통한 트랜잭션은 메모리 어드레스에 의해 이루어지며, PCIe 패브릭은 트랜잭션을 메모리 맵에 기초하여 적절한 디바이스 및 물리적 기능 및/또는 가상 기능으로 라우팅한다. 이 시나리오에서, VM은 메모리 어드레스에 액세스할 것이며 하이퍼바이저 또는 트랜슬레이트 층은 게스트 물리적메모리 어드레스 공간에 있는 제공된 메모리 어드레스를 APD(116)에 매핑되는 시스템 물리적메모리 어드레스 공간의 어드레스로 트랜슬레이트할 것이다. 이 트랜슬레이트된 어드레스는 가상 기능의 표시를 명시적으로 포함하지 않지만 메모리 맵을 통해 특정 가상 기능에 매핑되고 PCIe 패브릭의 라우팅 기능에 의해 그 가상 기능에 라우팅된다. 메모리 매핑 어드레스를 통해 행해진 PCIe를 통한 트랜잭션은 가상 또는 물리적 기능 번호를 명시적으로 특정하지 않는다.As explained above, physical functions and virtual functions are addressing parameters in PCIe. Transactions over PCIe are associated with physical functions and, optionally, additionally with virtual functions. Addressing over PCIe can be done explicitly through the bus-device-function number paradigm, but this addressing paradigm is typically reserved for device configuration (e.g. PCIe device listing) or other situations. More generally, and in standard operation, transactions over PCIe are done by memory address, and the PCIe fabric routes the transaction to the appropriate device and physical function and/or virtual function based on the memory map. In this scenario, the VM will access a memory address and the hypervisor or translation layer will translate the provided memory address in the guest physical memory address space to an address in the system physical memory address space that is mapped to APD 116. This translated address does not explicitly contain a representation of the virtual function, but is mapped to a specific virtual function through a memory map and routed to that virtual function by the PCIe fabric's routing function. Transactions over PCIe done through memory-mapped addresses do not explicitly specify virtual or physical function numbers.

본 개시는 게스트 및 시스템 물리적어드레스 공간에 대한 언급을 포함한다. 이들 어드레스 공간 간의 관계에 대해 설명한다. 시스템 물리적 어드레스 공간은 디바이스(100)의 "진정한" 물리적 어드레스 공간이다. 하이퍼바이저(206)는 이 어드레스 공간에 액세스할 수 있지만, 이 어드레스 공간은 VM으로부터 숨겨져 있다. 게스트 물리적 어드레스 공간은 특정 게스트 VM(204)에 의해 "보여지는" 가상화된 "물리" 어드레스 공간이다. 즉, 게스트 VM(204)에게, 게스트 물리적 어드레스 공간은 실제 물리적 어드레스 공간인 것으로 보인다. 제3 어드레스 공간 -게스트 가상 메모리- 은 컴퓨터 시스템에는 있지만 VM의 가상화된 환경에서 존재하는 전형적인 가상 메모리 어드레스 공간을 나타낸다. 디바이스(100)의 다른 부분(예를 들어 하드웨어-기반 페이지 테이블 워커(walker), 트랜슬레이트 캐시, 또는 다른 요소)이 상이한 어드레스 공간 간에 매핑을 관리하는 것에 연루될 수 있을지라도, 시스템 물리적 어드레스 공간과 게스트 물리적 어드레스 공간 간에 매핑은 하이퍼바이저(206)에 의해 관리되고 게스트 가상 어드레스 공간과 게스트 물리적 어드레스 공간 간에 매핑은 운영 체제(120)에 의해 관리된다.This disclosure includes reference to guest and system physical address spaces. The relationship between these address spaces will be explained. The system physical address space is the “true” physical address space of device 100. Hypervisor 206 has access to this address space, but this address space is hidden from the VM. The guest physical address space is the virtualized “physical” address space “seen” by a particular guest VM 204. That is, to the guest VM 204, the guest physical address space appears to be the actual physical address space. The third address space - guest virtual memory - represents a typical virtual memory address space that exists in the computer system but in a virtualized environment of a VM. The system physical address space and The mapping between guest physical address spaces is managed by hypervisor 206 and the mapping between guest virtual address spaces and guest physical address spaces is managed by operating system 120.

상이한 가상 머신 간에 APD(116)를 공유하는 것은 상이한 가상 머신 간에 APD(116)의 동작들을 시분할함으로써 달성되고, 상이한 가상 기능(또는 물리적 기능)은 상이한 가상 머신에 할당된다. 가상화 스케줄러(212)는 APD(116)를 시분할하는 것에 관계된 작업을 수행하는데, 이 가상 머신에 할당된 실행 시간이 경과되었을 때 현재 가상 머신에 대한 작업으로부터 전환함으로써 동작에 대해 새로운 가상 머신을 스케줄링한다. APD(116)가 상이한 가상 머신 간에 공유될지라도, 각각의 가상 머신은 이것이 실제 하드웨어 APD(116)의 개별 인스턴스를 갖는 것을 인식한다.Sharing APD 116 between different virtual machines is achieved by time-sharing the operations of APD 116 between different virtual machines, with different virtual functions (or physical functions) being assigned to different virtual machines. The virtualization scheduler 212 performs tasks related to time-sharing the APD 116, such as scheduling a new virtual machine for operation by switching from work on the current virtual machine when the execution time assigned to this virtual machine has elapsed. . Although APD 116 is shared between different virtual machines, each virtual machine knows that it has a separate instance of the actual hardware APD 116.

"가상 기능" 및 "물리적 기능"이라는 용어가 PCIe 표준의 어드레싱 파라미터를 지칭할지라도, 이들 기능은 상이한 VM에 매핑되기 때문에, 특정 가상 머신에 할당된 APD(116)의 논리적 인스턴스는 본원에서 가상 기능 또는 물리적 기능이라 지칭될 것이다. 즉, 이 개시는 "가상 기능이 타스크를 수행한다"(또는 물리적 기능) 또는 "가상 기능에 대해 또는 이에 동작이 수행된다"(또는 물리적 기능)와 같은 용어를 사용할 수 있고, 이 용어는 APD(116)가 이 타스크를 이 특정 가상 또는 물리적 기능과 연관된 VM에 할당된 시간-슬라이스 동안 또는 이 가상 또는 물리적 기능과 연관된 VM을 대신하여 수행함을 의미하는 것으로 읽혀져야 한다.Although the terms “virtual function” and “physical function” refer to addressing parameters of the PCIe standard, because these functions are mapped to different VMs, a logical instance of APD 116 assigned to a particular virtual machine is herein referred to as a virtual function. Or it will be referred to as a physical function. That is, this disclosure may use terminology such as “a virtual function performs a task” (or a physical function) or “an action is performed on or on a virtual function” (or a physical function), which terminology refers to APD ( 116) should be read to mean that this task is performed during the time-slice allocated to the VM associated with this particular virtual or physical function or on behalf of the VM associated with this virtual or physical function.

호스트 VM(202) 및 게스트 VM(204)은 운영 체제(120)을 갖는다. 호스트 VM(202)은 관리 애플리케이션(123) 및 GPU 가상화 드라이버(121)를 갖는다. 게스트 VM(204)은 애플리케이션(126), 운영 체제(120), 및 GPU 드라이버(122)를 갖는다. 이들 요소는 프로세서(102) 및 APD(116)의 동작의 다양한 특징을 제어한다.Host VM 202 and guest VM 204 have an operating system 120 . Host VM 202 has a management application 123 and GPU virtualization driver 121. Guest VM 204 has an application 126, an operating system 120, and a GPU driver 122. These elements control various aspects of the operation of processor 102 and APD 116.

전술한 바와 같이, 호스트 VM(202)은 게스트 VM(204)에 대한 APD(116)에서의 가상화의 측면들을 구성한다. 따라서 호스트 VM(202)은 관리 애플리케이션(123) 및 GPU 가상화 드라이버(121)와 같은 다른 요소의 실행을 지원하는 운영 체제(120)를 포함한다. GPU 가상화 드라이버(121)는 APD(116)의 가상화의 측면을 이해하지 않고 단순히 그래픽 렌더링(또는 다른) 커맨드를 APD(116)에 전달하고 보내는 통상적인 그래픽 드라이버가 아니다. 대신에, GPU 가상화 드라이버(121)는 가상화를 위해 APD(116)의 다양한 측면들을 구성하기 위해 APD(116)와 통신한다. 일예에서, GPU 가상화 드라이버(121)는 상이한 VM 간에 APD(116)를 공유하기 위한 시간-슬라이싱 메커니즘과 관련된 파라미터를 관리하여, 각각의 시간-슬라이스에서 얼마나 많은 시간이 있는지, 상이한 가상 기능 간에 전환이 어떻게 수행되는지, 및 기타 측면과 같은 파라미터를 제어한다. GPU 가상화 드라이버(121)는 또한 통상적인 그래픽 렌더링 커맨드를 APD(116)에 발행하거나 APD(116)의 구성과 직접 관계되지 않은 다른 타스크를 수행할 수 있는 것에 유의한다. 관리 애플리케이션(123)은 가상화를 관리하기 위한 및/또는 2 이상의 상이한 게스트 VM(204)으로부터의 데이터를 수반하는 하나 이상의 타스크를 수행한다. 일예에서, 호스트 VM(202)은 관리 애플리케이션(123)을 통해 데스크탑 합성 기능을 수행하는데, 여기서 데스크탑 합성 기능은 상이한 게스트 VM(204)으로부터의 렌더링된 프레임에 액세스하여 이들 프레임을 단일 출력 뷰로 합성한다.As described above, host VM 202 configures aspects of virtualization in APD 116 for guest VM 204. Accordingly, the host VM 202 includes an operating system 120 that supports execution of other elements such as management applications 123 and GPU virtualization drivers 121. The GPU virtualization driver 121 is not a typical graphics driver that simply transmits and sends graphics rendering (or other) commands to the APD 116 without understanding the virtualization aspects of the APD 116. Instead, GPU virtualization driver 121 communicates with APD 116 to configure various aspects of APD 116 for virtualization. In one example, GPU virtualization driver 121 manages parameters related to the time-slicing mechanism for sharing APD 116 between different VMs, such as how much time there is in each time-slice and when to switch between different virtual functions. Control parameters such as how it is performed, and other aspects. Note that GPU virtualization driver 121 may also issue conventional graphics rendering commands to APD 116 or perform other tasks not directly related to configuration of APD 116. Management application 123 performs one or more tasks for managing virtualization and/or involving data from two or more different guest VMs 204 . In one example, the host VM 202 performs a desktop compositing function through the management application 123, where the desktop compositing function accesses rendered frames from different guest VMs 204 and composites these frames into a single output view. .

게스트 VM(204)은 운영 체제(120), GPU 드라이버(122), 및 애플리케이션(126)을 포함한다. 운영 체제(120)는 프로세서(102)에서 실행될 수도 있을 임의의 유형의 운영 체제가다. GPU 드라이버(122)는 GPU 드라이버(122)가 GPU 드라이버(122)가 실행중인 게스트 VM(204)에 대한 APD(116)의 동작을 제어하여, 그래픽 렌더링 타스크 또는 다른 작업과 같은 타스크를 처리를 위해 APD(116)에 전송하는 점에서 APD(116)를 위한 "네이티브" 드라이버이다. 네이티브 드라이버는 배어-본(bare-bone) 비-가상화 계산 시스템에 존재하는 GPU용 디바이스 드라이버의 수정되지 않은 또는 약간 수정된 버전일 수 있다.Guest VM 204 includes an operating system 120, GPU drivers 122, and applications 126. Operating system 120 is any type of operating system that may run on processor 102. The GPU driver 122 controls the operation of the APD 116 for the guest VM 204 on which the GPU driver 122 is running to process tasks such as graphics rendering tasks or other tasks. It is a “native” driver for APD 116 in that it transmits to APD 116. A native driver may be an unmodified or slightly modified version of a device driver for a GPU that exists in a bare-bone, non-virtualized compute system.

GPU 가상화 드라이버(121)가 호스트 VM(202) 내에 포함되는 것으로서 설명되었지만, 다른 구현에서, GPU 가상화 드라이버(121)는 대신에 하이퍼바이저(206)에 포함된다. 이러한 구현에서, 호스트 VM(202)은 존재하지 않을 수 있고 호스트 VM(202)의 기능은 하이퍼바이저(206)에 의해 수행될 수 있다.Although GPU virtualization driver 121 is described as being included within host VM 202, in other implementations, GPU virtualization driver 121 is instead included in hypervisor 206. In this implementation, host VM 202 may not exist and the functions of host VM 202 may be performed by hypervisor 206.

호스트 VM(202) 및 게스트 VM(204)의 운영 체제(120)은 하드웨어와의 통신, 자원 및 파일 시스템 관리, 가상 메모리 관리, 네트워크 스택 관리, 및 많은 다른 기능과 같은 가상화된 환경에서 운영 체제에 대한 표준 기능을 수행한다. GPU 드라이버(122)는 예를 들어 APD(116)의 다양한 기능에 액세스하기 위해 소프트웨어(예를 들어, 애플리케이션(126))에 대한 애플리케이션 프로그래밍 인터페이스("API")를 제공함으로써 임의의 특정 게스트 VM(204)에 대한 APD(116)의 동작을 제어한다. 또한, 드라이버(122)는 APD(116)의 처리 성분(예를 들어, 이하에서 더 상세히 논의되는 SIMD 유닛(138)과 같은)에 의한 실행을 위한 프로그램을 컴파일하는 JIT(Just-In-Time) 컴파일러를 포함한다. 임의의 특정 게스트 VM(204)에 대해, GPU 드라이버(122)는 다른 VM에 대해서가 아니라 그 게스트 VM(204)와 관련된 APD(116) 상의 기능을 제어한다.The operating system 120 of the host VM 202 and the guest VM 204 provides support to the operating system in a virtualized environment, such as communicating with hardware, managing resources and file systems, managing virtual memory, managing the network stack, and many other functions. Performs standard functions for GPU driver 122 may be configured to provide an application programming interface (“API”) to software (e.g., application 126) to access various features of APD 116, for example, to access any particular guest VM (“API”). Controls the operation of the APD 116 for 204). Driver 122 may also provide just-in-time (JIT) processing to compile programs for execution by processing components of APD 116 (e.g., SIMD unit 138, discussed in more detail below). Includes compiler. For any particular guest VM 204, GPU driver 122 controls functions on APD 116 associated with that guest VM 204, but not with respect to other VMs.

APD(116)는 병렬 처리에 적합할 수 있는한 그래픽 동작 및 비-그래픽 동작과 같은 선택된 기능에 대한 커맨드 및 프로그램을 실행한다. APD(116)는 픽셀 동작, 기하학적 계산과 같은 그래픽 파이프라인 동작을 실행하고, 프로세서(102)로부터 수신된 커맨드에 기초하여 디스플레이 디바이스(118)에 이미지를 렌더링하기 위해 사용될 수 있다. APD(116)는 또한 프로세서(102)로부터 수신된 커맨드에 기초하여 비디오, 물리적 시뮬레이션, 계산 유체 역학, 또는 다른 타스크에 관계된 동작과 같은, 그래픽 동작에 직접 관련되지 않은 계산 처리 동작을 실행한다. 커맨드 프로세서(213)는 프로세서(102)(또는 또 다른 소스)로부터의 커맨드를 받아들이고, 이들 커맨드에 연관된 타스크를 그래픽 처리 파이프라인(134) 및 계산 유닛(132)과 같은 APD(116)의 다양한 요소에 위임한다. VM은 도어벨 메모리(214)를 사용하여, 도어벨 메커니즘을 통한 실행을 위한 새로운 타스크에 대해 APD(116)에 알린다.APD 116 executes commands and programs for selected functions, such as graphical operations and non-graphical operations, as long as they are suitable for parallel processing. APD 116 may be used to perform graphics pipeline operations such as pixel operations, geometric calculations, and render images on display device 118 based on commands received from processor 102. APD 116 also executes computational processing operations not directly related to graphics operations, such as operations related to video, physics simulations, computational fluid dynamics, or other tasks based on commands received from processor 102. Command processor 213 accepts commands from processor 102 (or another source) and performs the tasks associated with these commands into various elements of APD 116, such as graphics processing pipeline 134 and compute unit 132. delegate to The VM uses the doorbell memory 214 to notify the APD 116 about new tasks for execution via the doorbell mechanism.

APD(116)는 SIMD 패러다임에 따라 프로세서(102)의 요청에서 병렬 방식으로 동작을 수행하도록 구성된 하나 이상의 SIMD 유닛(138)을 포함하는 계산 유닛(132)을 포함한다. SIMD 패러다임은 다수의 처리 요소가 단일의 프로그램 제어 흐름 유닛 및 프로그램 카운터를 공유하여 이에 따라 동일한 프로그램을 실행하지만 상이한 데이터로 그 프로그램을 실행할 수 있는 것이다. 일예에서, 각각의 SIMD 유닛(138)은 16개의 레인(lane)을 포함하고, 각 레인은 SIMD 유닛(138)의 다른 레인과 동시에 동일 명령을 실행하지만 상이한 데이터로 그 명령을 실행할 수 있다. 레인은 모든 레인이 주어진 명령을 실행할 필요가 있지 않다면 프리디케이트(predication)로 오프로 전환될 수 있다. 프리디케이트는 또한 분기 제어 흐름으로 프로그램을 실행하기 위해 사용될 수 있다. 보다 구체적으로, 제어 흐름이 개별 레인에 의해 수행되는 계산에 기초하는 조건부 분지 또는 다른 명령을 가진 프로그램에 대해서, 현재 실행되고 있지 않은 제어 흐름 경로에 대응하는 레인의 프리디케이트, 및 상이한 제어 흐름 경로의 일련의 실행은 임의의 제어 흐름이 가능하게 한다.APD 116 includes a compute unit 132 that includes one or more SIMD units 138 configured to perform operations in a parallel manner at the request of processor 102 according to the SIMD paradigm. The SIMD paradigm is one in which multiple processing elements share a single program control flow unit and program counter, thereby executing the same program, but with different data. In one example, each SIMD unit 138 includes 16 lanes, each lane executing the same instructions concurrently with other lanes of SIMD unit 138 but with different data. Lanes can be switched off with predication if not all lanes need to execute a given command. Predicates can also be used to execute programs with branching control flow. More specifically, for programs with conditional branches or other instructions whose control flow is based on computations performed by individual lanes, predicates of lanes corresponding to control flow paths that are not currently executing, and Sequence of execution allows arbitrary control flow.

계산 유닛(132)에서의 실행의 기본 유닛은 작업-항목이다. 각 작업-항목은 특정 레인에서 병렬로 실행될 프로그램의 단일 인스턴스화를 나타낸다. 작업-항목들은 단일 SIMD 처리 유닛(138)에서 "웨이브프론트"로서 동시에 실행될 수 있다. 하나 이상의 웨이브프론트는 "작업 그룹"에 포함되는데, 이는 동일한 프로그램을 실행하도록 지정된 일단의 작업-항목을 포함한다. 작업 그룹은 작업 그룹을 구성하는 각 웨이브프론트를 실행함으로써 실행될 수 있다. 대안적으로, 웨이브프론트는 단일 SIMD 유닛(138)에서 순차적으로 또는 상이한 SIMD 유닛(138)에서 부분적으로 또는 완전히 병렬로 실행된다. 웨이브프론트는 단일 SIMD 유닛(138)에서 동시에 실행될 수 있는 가장 큰 일단의 작업-항목으로서 간주될 수 있다. 따라서, 프로세서(102)로부터 수신된 커맨드가 특정 프로그램이 단일 SIMD 유닛(138)에서 동시에 실행될 수 없는 정도로 병렬화되어야 한다는 것을 나타내면, 그 프로그램은 2 이상의 SIMD 유닛(138)에서 병렬화되거나 동일 SIMD 유닛(138)에서 직렬화된(또는 필요시 병렬화 및 직렬화되는) 웨이브프론트로 분할된다. 스케줄러(136)는 상이한 계산 유닛(132) 및 SIMD 유닛(138) 상에서 다양한 웨이브프론트를 스케줄링하는 것과 관련된 동작을 수행하도록 구성된다.The basic unit of execution in computation unit 132 is the work-item. Each work-item represents a single instantiation of a program to be executed in parallel on a specific lane. Work-items may be executed simultaneously as a “wavefront” in a single SIMD processing unit 138. One or more wavefronts are included in a “workgroup,” which contains a set of work-items designated to execute the same program. A task group can be executed by executing each wavefront that makes up the task group. Alternatively, the wavefronts run sequentially on a single SIMD unit 138 or partially or completely in parallel on different SIMD units 138. A wavefront can be considered the largest set of work-items that can be executed simultaneously on a single SIMD unit 138. Accordingly, if a command received from processor 102 indicates that a particular program must be parallelized to the extent that it cannot be executed simultaneously on a single SIMD unit 138, then that program may be parallelized on two or more SIMD units 138 or parallelized on the same SIMD unit 138. ) into serialized (or parallelized and serialized if necessary) wavefronts. Scheduler 136 is configured to perform operations related to scheduling various wavefronts on different compute units 132 and SIMD units 138.

계산 유닛(132)에 의해 제공되는 병렬성은 픽셀 값 계산, 버텍스 변환, 및 다른 그래픽 동작과 같은 그래픽 관련 동작에 적합하다. 따라서, 일부 경우에, 프로세서(102)로부터 그래픽 처리 커맨드를 받아들이는 그래픽 파이프라인(134)은 병렬로 실행을 위해 계산 타스크를 계산 유닛(132)에 제공한다.The parallelism provided by compute unit 132 is suitable for graphics-related operations such as pixel value calculations, vertex transformations, and other graphics operations. Accordingly, in some cases, graphics pipeline 134, which accepts graphics processing commands from processor 102, provides computational tasks to compute units 132 for execution in parallel.

또한 계산 유닛(132)은 그래픽과 관련되지 않거나 그래픽 파이프라인(134)의 "정상적인" 동작의 일부로서 수행되지 않는(예를 들어, 그래픽 파이프라인(134)의 동작을 위해 수행되는 처리를 보충하기 위해 수행되는 커스텀 동작) 계산 타스크를 수행하지 않기 위해 사용된다. 프로세서(102)에서 실행되는 애플리케이션(126) 또는 다른 소프트웨어는 이러한 계산 타스크를 정의하는 프로그램을 실행을 위해 APD(116)로 전송한다.Computation unit 132 may also be used to supplement processing that is not graphics-related or performed as part of the “normal” operation of graphics pipeline 134 (e.g., to supplement processing performed for the operation of graphics pipeline 134). It is used to avoid performing computational tasks (custom operations performed for this purpose). Application 126 or other software running on processor 102 transmits programs defining these computational tasks to APD 116 for execution.

APD(116)에서 새로운 작업이 수행될 준비가 되었다는 통지는 도어벨 메커니즘을 통해 이루어진다. 보다 구체적으로, 새로운 작업이 준비되었음을 APD(116)에 통지하기 위해, 엔티티(예를 들어, 프로세서(102))는 도어벨을 도어벨 메모리(214)에 기입한다. 도어벨은 페치되어 처리될 커맨드의 메모리 어드레스를 나타내는 커맨드 버퍼로의 포인터를 포함한다.Notification that new work is ready to be performed at APD 116 is made via a doorbell mechanism. More specifically, to notify APD 116 that a new task is ready, an entity (e.g., processor 102) writes a doorbell to doorbell memory 214. The doorbell contains a pointer to a command buffer indicating the memory address of the command to be fetched and processed.

일 구현에서, 도어벨은 원형(circular) 버퍼의 헤드의 어드레스를 포함한다. 테일(tail)의 어드레스는 APD(116)에 의해 별도로 유지된다. 헤드 포인터와 테일 포인터가 동일할 때, 어떠한 새로운 커맨드도 페치될 수 없다. 엔티티가 테일 포인터보다 큰 헤드를 포함하는 도어벨을 기입할 때, 페치될 커맨드는 헤드와 테일 사이의 어드레스에서 발견된다. APD(116)는 커맨드가 페치될 때 테일 포인터를 조정하여 커맨드 버퍼 내 커맨드를 소비한다. 헤드 및 테일 포인터가 다시 동일할 때, 커맨드 버퍼에서 가용한 새로운 커맨드는 없다. 이 구현에서, 도어벨은 작업이 수행될 준비가 되었음을 통지로서 그리고 커맨드가 발견될 메모리 어드레스의 표시로서 작용한다. 선택적으로, 도어벨 메모리(214)에 기입된 도어벨은 이 도어벨에 의해 표시된 작업이 완료될 때 또는 새로운 도어벨이 도어벨 메모리(214)에 기입될 때 처리된 것으로서 마크된다. 다른 구현에서, 도어벨은 작업이 페치되어 실행될 준비가 되었다는 표시로서만 작용할 수 있고, 이 작업의 위치의 표시는 도어벨에 의해 제공된 값과는 별도로 결정된다. 또 다른 구현에서, 도어벨은 임의의 대안적 또는 추가 목적에 사용될 수 있다.In one implementation, the doorbell includes the address of the head of a circular buffer. The address of the tail is maintained separately by the APD 116. When the head and tail pointers are the same, no new command can be fetched. When an entity writes a doorbell with a head greater than the tail pointer, the command to be fetched is found at the address between the head and tail. APD 116 consumes commands in the command buffer by adjusting the tail pointer as the command is fetched. When the head and tail pointers are the same again, there are no new commands available in the command buffer. In this implementation, the doorbell acts as a notification that a task is ready to be performed and as an indication of the memory address where the command will be found. Optionally, a doorbell written to doorbell memory 214 is marked as processed when the task indicated by that doorbell is completed or when a new doorbell is written to doorbell memory 214. In other implementations, the doorbell may serve only as an indication that a job has been fetched and is ready to run, and the indication of the location of this job is determined independently of the value provided by the doorbell. In yet other implementations, the doorbell may be used for any alternative or additional purpose.

도어벨 메커니즘은 현재 어떤 가상 머신이 APD(116)에서 작업하도록 스케쥴링되어 있는지에 대해 비동기식으로 동작한다. 이것은 특정 가상 머신이 도어벨 메모리(214)에 도어벨을 놓은 VM 이외의 VM에 대한 타스크가 APD(116)에서 실행되고 있을 때 도어벨 메모리(214)에 도어벨을 놓을 수 있음을 의미한다. 이 비동기 동작은 APD(116) 상의 시간-슬라이스된 작업과 비교하여 독립적으로 스케줄링되기 되는, 프로세서(102)에서 실행되는 소프트웨어(예를 들어, VM 상에서 실행되는 소프트웨어)에 의해 실행되기 때문에 행해진다.The doorbell mechanism operates asynchronously with respect to which virtual machines are currently scheduled to work on APD 116. This means that a particular virtual machine may place a doorbell in doorbell memory 214 when a task for a VM other than the VM that placed the doorbell in doorbell memory 214 is running on APD 116. This asynchronous operation occurs because execution by software running on processor 102 (e.g., software running on a VM) is scheduled independently compared to the time-sliced tasks on APD 116.

전술한 바와 같이, 가상화 스케줄러(212)는 상이한 가상 머신들 간에 APD(116)의 시분할을 관리한다. 각각의 시간-슬라이스에서, 가상화 스케줄러(212)는 이 시간-슬라이스와 연관된 가상 머신에 대한 작업이 APD(116)에서 속행하는 것을 허용한다. 가상화 스케줄러(212)는 APD(116)를 공유하는 VM(호스트 VM(202) 및 게스트 VM(204) 모두)에 대해 APD(116) 상에서 시간-슬라이스를 관리한다. 가상화 스케줄러(212)는 시간-슬라이스를 추적하고, 특정 VM에 대한 시간-슬라이스가 만료되었을 때 APD(116) 상에 작업을 중지하고, 다음 시간 슬라이스를 갖는 VM에 대한 작업을 시작한다. 따라서, 가상화 스케줄러(212)는 APD(116) 상에서 실행될 작업을 갖는 상이한 VM들 간에 전환한다. 상이한 VM들 간에 전환 행위는 본원에서 "가상화 컨텍스트 전환"이라 지칭된다. 가상화 스케줄러는 스케줄링 스킴을 기반으로 작업을 수행하기 위해 상이한 VM을 선택한다. 일예에서, 스케줄링 스킴은 라운드 로빈 스킴이다. 이러한 스킴에서, 각각의 VM에는 APD(116) 상에서 턴이 주어지며, VM에 주어지는 순서는 반복된다. 다른 기술적으로 가능한 스케줄링 스킴도 물론 가능하다.As described above, virtualization scheduler 212 manages time sharing of APD 116 among different virtual machines. At each time-slice, virtualization scheduler 212 allows work on the virtual machine associated with this time-slice to continue in APD 116. Virtualization scheduler 212 manages time-slices on APD 116 for VMs (both host VMs 202 and guest VMs 204) that share APD 116. Virtualization scheduler 212 tracks time-slices, stops work on APD 116 when a time-slice for a particular VM expires, and starts work on the VM with the next time slice. Accordingly, virtualization scheduler 212 switches between different VMs that have work to run on APD 116. The act of switching between different VMs is referred to herein as “virtualization context switching”. The virtualization scheduler selects different VMs to perform tasks based on a scheduling scheme. In one example, the scheduling scheme is a round robin scheme. In this scheme, each VM is given a turn on the APD 116, and the order in which the VMs are given is repeated. Other technically feasible scheduling schemes are of course possible.

특정 VM과 관련된 특정 시간-슬라이스 동안 작업을 시작하기 위해, 가상화 스케줄러(212)는 커맨드 프로세서(213)로 하여금 그래픽 처리 파이프라인(134)를 위한 및/또는 범용 계산 작업을 위한 커맨드를 특정 VM에 대해 도어벨 메모리(214)에 의해 지정된 어드레스로부터 페치하게 한다. 이어 커맨드 프로세서(213)는 APD(116)로 하여금 이들 커맨드를 실행하게 한다. 페치된 커맨드는 도어벨 메모리(214)에 저장된 도어벨에 의해 포인트된다.To initiate work during a specific time-slice associated with a specific VM, the virtualization scheduler 212 causes the command processor 213 to issue commands for the graphics processing pipeline 134 and/or for general-purpose computational tasks to the specific VM. It fetches from an address specified by the doorbell memory 214. The command processor 213 then causes the APD 116 to execute these commands. The fetched command is pointed to by the doorbell stored in the doorbell memory 214.

가상화 스케줄러(212)가 현재 APD(116) 상에서 실행되는 작업을 갖는 VM에 대한 시간-슬라이스가 만료된 것으로 결정하였을 때, 가상화 스케줄러(212)는 APD(116)로 하여금 어떠한 새로운 작업도 받아들이지 않고 그 작업을 완료하게 한다(예를 들어, 도어벨 메모리(214)에 저장된 도어벨에 의해 포인팅된 새로운 작업을 수락하지 않고 그래픽 처리 파이프라인(134) 및/또는 계산 유닛(138)에서 이미 "진행중인(in flight)" 타스크를 완료한다. 작업을 완료하는 것은 현재 APD(116)에서 진행중인 작업이 완료되고 최종 출력 값이 타겟 메모리 위치에 기입되게 하는 것을 수반한다. 예를 들어, 그래픽 렌더링에 있어, 출력 픽셀은 프레임 버퍼(또는 다른 렌더링 타겟)에 기입되어질 것이다. 대안적으로 또는 일부 상황에서, 타스크를 완료하는 대신, 기능/VM이 APD(116)에서 "턴"을 다시 받았을 때 진행중인 타스크에 대한 상태는 저장되고 다시 복원될 수 있다.When virtualization scheduler 212 determines that a time-slice for a VM with work currently running on APD 116 has expired, virtualization scheduler 212 causes APD 116 to not accept any new work and Causes work to be completed (e.g., without accepting new work pointed to by a doorbell stored in doorbell memory 214 and already "in progress" in graphics processing pipeline 134 and/or compute unit 138). Completing a task involves causing the work currently in progress in the APD 116 to be completed and the final output value to be written to the target memory location. For example, in graphics rendering, the output The pixel will be written to the frame buffer (or other rendering target). Alternatively, or in some situations, instead of completing the task, the function/VM will receive a "turn" back on the APD 116 to return the status for the task in progress. can be saved and restored again.

특정 VM에 대해 작업이 완료된 후, 가상화 스케줄러(212)는 다음 VM를 위한 시간-슬라이스로 이동하여, 커맨드 프로세서(213)가 도어벨 메모리(214)의 콘텐트에 기초하여 그 VM에 대한 타스크를 페치하고 이들 타스크를 그래픽 처리 파이프라인(134) 및/또는 계산 유닛(132)에서 직접(예를 들어, 범용 계산을 위해) 실행하게 한다. 만료된 시간-슬라이스에 대한 작업 실행을 중지하고 다음 VM에 대한 작업을 시작하는 이러한 프로세스는, 상이한 VM에 APD(116)의 시분할을 제공하기 위해, 반복적으로 수행된다.After work is completed for a particular VM, virtualization scheduler 212 moves on to the time-slice for the next VM, where command processor 213 fetches tasks for that VM based on the contents of doorbell memory 214. and execute these tasks directly in graphics processing pipeline 134 and/or computation unit 132 (e.g., for general purpose computation). This process of stopping execution of tasks for expired time-slices and starting tasks for the next VM is performed repeatedly to provide time sharing of APD 116 to different VMs.

한 VM에 대한 작업을 중지하고 또 다른 VM에 대한 작업을 시작하는 것 외에도, 가상화 컨텍스트 전환은 전환되는 VM에 대한 상태를 저장하고 전환할 VM에 대한 상태를 로딩하는 것을 수반한다. 일반적으로, 상태는 APD(116)에 대해 실행된 워크플로우의 양상들을 관리하는 APD(116) 전체에 걸쳐 또는 이에 대해 저장된 값을 포함한다. 다양한 예에서, 상태는 어떻게 그래픽이 렌더링될지, 어떻게 SIMD 작업이 실행될지, 어떻게 쉐이더가 실쟁되지를 제어하며 APD(116) 상에 동작의 다른 다양한 양상들을 제어하는 레지스터에 저장된 값을 포함할 수 있다. 상태를 저장하는 것은 사용중 위치(상태 값이 실제로 APD(116)의 동작에 영향을 미치는)로부터 상태를 VM를 위한 저장 상태 위치에 기입하는 것을 수반한다. 상태를 로딩하는 것은 VM를 위한 저장 상태 위치에서 상태를 사용중인 위치로 로드하는 것이다. 일부 구현에서, 저장 상태 위치는 메모리에 있고(APD(116) 상의 범용 메모리와 같은), 사용중 위치는 APD(116) 내의 레지스터, 전용 메모리, 등과 같은 다양한 메모리 요소를 포함한다.In addition to stopping work on one VM and starting work on another VM, virtualization context switching also involves saving state for the VM being switched and loading state for the VM being switched. Generally, state includes values stored across or for the APD 116 that manage aspects of the workflow executed on the APD 116. In various examples, states may include values stored in registers that control how graphics are rendered, how SIMD operations are executed, how shaders are run, and various other aspects of operation on APD 116. . Saving state involves writing the state from an in-use location (where the state value actually affects the operation of APD 116) to a stored state location for the VM. Loading state means loading the state from a stored state location for the VM to a location in use. In some implementations, stored state locations are in memory (such as general-purpose memory on APD 116), and in-use locations include various memory elements such as registers within APD 116, private memory, etc.

APD(116)의 다른 부분은 이의 기능이 전술한 바와 같이 가상화 작업 맥락에서 그리고 커맨드 프로세서(213)에 의해 페치된 커맨드를 실행하기 위해 가상화가 발생하지 않은 것처럼 구체적으로 설명되지 않은 것에 유의한다. 예를 들어, 그래픽 처리 파이프라인(134)은 커맨드 프로세서(213)에 의해 페치된 그래픽 렌더링 커맨드에 응답하여 그래픽 렌더링과 관련된 동작을 수행한다. 그래픽 처리 파이프라인(134)과 관련된 그래픽 렌더링 커맨드 중 적어도 일부에 대해 및/또는 범용 계산 동작에 대해, SIMD 스케줄러(136)는 커맨드 프로세서(213)에 의해 처리된 커맨드에 따라 계산 유닛(132)의 SIMD 유닛(138) 상에서 실행하기 위한 웨이브프론트를 발생하고 관리한다. 예에서, 커맨드는 그래픽 처리 파이프라인(134)의 다른 퍼실리티(facility) 중에서도, 특정 픽셀 쉐이더 프로그램을 사용하여 특정한 하나의 기하학을 렌더링하는 커맨드이다. 그래픽 처리 파이프라인(134)은 입력 어셈블러 스테이지(302), 헐 쉐이더 스테이지(306), 테셀레이터 스테이지(308), 등과 같은 그래픽 처리 파이프라인(134)의 다양한 스테이지를 통해 기하학을 처리하고, 픽셀 쉐이더 스테이지(316)에서, 기하학이 SIMD 유닛(138)에서 특정 픽셀 쉐이더로 처리되게 한다. SIMD 스케줄러(136)는 실행을 위해 픽셀 쉐이더에 대한 웨이브프론트를 관리하고 스케줄링한다.Note that other parts of APD 116 are not specifically described as their functionality is in the context of virtualized operations as described above and no virtualization has occurred to execute commands fetched by command processor 213. For example, the graphics processing pipeline 134 performs operations related to graphics rendering in response to graphics rendering commands fetched by the command processor 213. For at least some of the graphics rendering commands associated with the graphics processing pipeline 134 and/or for general-purpose compute operations, the SIMD scheduler 136 may be configured to: Generates and manages wavefronts for execution on SIMD unit 138. In the example, the command is a command that renders a particular geometry using a particular pixel shader program, among other facilities in the graphics processing pipeline 134. The graphics processing pipeline 134 processes geometry through various stages of the graphics processing pipeline 134, such as the input assembler stage 302, the hull shader stage 306, the tessellator stage 308, and the pixel shader stage. At stage 316, the geometry is processed with a specific pixel shader in SIMD unit 138. SIMD scheduler 136 manages and schedules wavefronts for pixel shaders for execution.

도 3은 도 2에 도시된 그래픽 처리 파이프라인(134)의 추가 세부사항을 도시하는 블록도이다. 그래픽 처리 파이프라인(134)은 각각 특정 기능을 수행하는 스테이지를 포함한다. 스테이지는 그래픽 처리 파이프라인(134)의 기능의 세분화를 나타낸다. 각 스테이지는 계산 유닛(132)에서 실행되는 쉐이더 프로그램으로서 부분적으로 또는 완전히 구현되거나, 또는 계산 유닛(132) 외부에서 고정 기능의 비-프로그래밍가능 하드웨어로서 부분적으로 또는 완전히 구현된다.FIG. 3 is a block diagram illustrating additional details of the graphics processing pipeline 134 shown in FIG. 2. The graphics processing pipeline 134 includes stages, each performing a specific function. Stages represent a subdivision of the functionality of the graphics processing pipeline 134. Each stage is implemented partially or fully as a shader program executing in compute unit 132, or partially or fully implemented external to compute unit 132 as fixed-function, non-programmable hardware.

입력 어셈블러 스테이지(302)는 사용자에 의해 채워지는 버퍼(예를 들어, 애플리케이션(126)과 같은, 프로세서(102)에 의해 실행되는 소프트웨어의 요청으로 채워지는 버퍼)로부터 프리미티브 데이터를 판독하고, 파이프라인의 나머지에 의해 사용하기 위해 데이터를 프리미티브로 어셈블한다. 입력 어셈블러 스테이지(302)는 사용자에 의해 채워지는 버퍼에 포함된 프리미티브 데이터에 기초하여 상이한 유형의 프리미티브를 생성할 수 있다. 입력 어셈블러 스테이지(302)는 나머지 파이프라인에 의한 사용을 위해 어셈블된 프리미티브를 포맷한다.The input assembler stage 302 reads primitive data from a buffer filled by the user (e.g., a buffer filled by requests from software executing by the processor 102, such as application 126), and the pipeline Assembles the data into primitives for use by the rest. The input assembler stage 302 may generate different types of primitives based on primitive data contained in a buffer filled by the user. The input assembler stage 302 formats the assembled primitives for use by the rest of the pipeline.

버텍스 쉐이더 스테이지(304)는 입력 어셈블러 스테이지(302)에 의해 어셈블된 프리미티브의 버텍스를 처리한다. 버텍스 쉐이더 스테이지(304)는 변환, 스키닝, 모핑, 및 버텍스당 조명과 같은 다양한 버텍스당 동작을 수행한다. 변환 동작은 버텍스의 좌표를 변환하는 다양한 동작을 포함한다. 이들 동작은 모델링 변환, 뷰잉 변환, 투영 변환, 원근 분할, 및 뷰포트 변환 중 하나 이상을 포함한다. 여기에서, 이러한 변환은 변환이 수행되는 버텍스의 좌표 또는 "위치"를 수정하는 것으로 간주된다. 버텍스 쉐이더 스테이지(304)의 다른 동작은 좌표 이외의 속성을 수정한다.The vertex shader stage 304 processes vertices of primitives assembled by the input assembler stage 302. Vertex shader stage 304 performs various per-vertex operations such as transformation, skinning, morphing, and per-vertex lighting. Transformation operations include various operations that transform the coordinates of vertices. These operations include one or more of modeling transformations, viewing transformations, projection transformations, perspective splitting, and viewport transformations. Here, such transformations are considered to modify the coordinates or "position" of the vertex on which the transformation is performed. Other operations in the vertex shader stage 304 modify properties other than coordinates.

버텍스 쉐이더 스테이지(304)는 하나 이상의 계산 유닛(132)에서 실행될 버텍스 쉐이더 프로그램으로서 부분적으로 또는 완전히 구현된다. 버텍스 쉐이더 프로그램은 프로세서(102)에 의해 제공되며 컴퓨터 프로그래머에 의해 미리 작성된 프로그램에 기초한다. 드라이버(122)는 이러한 컴퓨터 프로그램을 컴파일하여 계산 유닛(132) 내에서 실행하기에 적합한 포맷을 갖는 버텍스 쉐이더 프로그램을 생성한다.Vertex shader stage 304 is partially or fully implemented as a vertex shader program to be executed on one or more compute units 132. The vertex shader program is provided by processor 102 and is based on a program pre-written by a computer programmer. Driver 122 compiles these computer programs to produce vertex shader programs in a format suitable for execution within compute unit 132.

헐 쉐이더 스테이지(306), 테셀레이터 스테이지(308), 및 도메인 쉐이더 스테이지(310)는 프리미티브를 세분화함으로써 단순 프리미티브를 보다 복잡한 프리미티브로 바꾸는 테셀레이션을 구현하기 위해 함께 작업한다. 헐 쉐이더 스테이지(306)는 입력 프리미티브에 기초하여 테셀레이션을 위한 패치를 생성한다. 테셀레이터 스테이지(308)는 패치를 위한 샘플 세트를 생성한다. 도메인 쉐이더 스테이지(310)는 패치를 위한 샘플에 대응하는 버텍스에 대한 버텍스 위치를 계산한다. 헐 쉐이더 스테이지(306) 및 도메인 쉐이더 스테이지(310)는 계산 유닛(132)에서 실행될 쉐이더 프로그램으로서 구현될 수 있다.The hull shader stage 306, tessellator stage 308, and domain shader stage 310 work together to implement tessellation, which turns simple primitives into more complex primitives by subdividing the primitives. The hull shader stage 306 generates patches for tessellation based on input primitives. The tessellator stage 308 generates a set of samples for the patch. The domain shader stage 310 calculates vertex positions for vertices corresponding to samples for patching. Hull shader stage 306 and domain shader stage 310 may be implemented as shader programs to be executed in compute unit 132.

기하학 쉐이더 스테이지(312)는 프리미티브마다 버텍스 동작을 수행한다. 포인트 스프린트 확장, 다이내믹 파티클 시스템 동작, 퍼-핀 생성, 쉐도우 볼륨 생성, 단일 패스 렌더-큐브 맵, 프리미티브당 자료 스와핑, 및 프리미티브당 자료 셋업과 같은 동작을 포함하는, 다양한 상이한 유형의 동작이 기하학 쉐이더 스테이지(312)에 의해 수행될 수 있다. 일부 경우에, 계산 유닛(132)에서 실행되는 쉐이더 프로그램은 기하학 쉐이더 스테이지(312)를 위한 동작을 수행한다.The geometry shader stage 312 performs vertex operations for each primitive. A variety of different types of operations are available in geometry shaders, including operations such as point sprint scaling, dynamic particle system behavior, fur-fin generation, shadow volume generation, single pass render-cube map, per-primitive data swapping, and per-primitive data setup. It may be performed by stage 312. In some cases, shader programs executing in compute unit 132 perform operations for geometry shader stage 312.

래스터라이저 스테이지(314)는 단순 프리미티브를 수용하고 래스터화하여 업스트림으로 생성된다. 래스터화는 어느 스크린 픽셀(또는 서브-픽셀 샘플)이 특정 프리미티브에 의해 커버될 것인지를 결정하는 것으로 구성된다. 래스터화는 고정 기능 하드웨어에 의해 수행된다.A rasterizer stage 314 is created upstream by accepting simple primitives and rasterizing them. Rasterization consists of determining which screen pixels (or sub-pixel samples) will be covered by a particular primitive. Rasterization is performed by fixed-function hardware.

픽셀 쉐이더 스테이지(316)는 업스트림으로 생성된 프리미티브 및 래스터화의 결과에 기초하여 스크린 픽셀에 대한 출력 값을 계산한다. 픽셀 쉐이더 스테이지(316)는 텍스처 메모리로부터 텍스처를 적용할 수 있다. 픽셀 쉐이더 스테이지(316)에 대한 동작은 계산 유닛(132)에서 실행되는 쉐이더 프로그램에 의해 수행된다.Pixel shader stage 316 calculates output values for screen pixels based on primitives generated upstream and the results of rasterization. The pixel shader stage 316 can apply a texture from texture memory. Operations on the pixel shader stage 316 are performed by shader programs executing in compute unit 132.

출력 병합 스테이지(318)는 픽셀 쉐이더 스테이지(316)로부터의 출력을 받아들이고 이들 출력을 병합하여, 스크린 픽셀을 위한최종 색상을 결정하기 위해 z-테스트 및 알파 블렌딩과 같은 동작을 수행한다.The output merge stage 318 accepts the output from the pixel shader stage 316 and merges these outputs, performing operations such as z-testing and alpha blending to determine the final color for the screen pixels.

도 2를 다시 참조하면, 일부 경우에, 현재 기능은 그 기능을 위한 시간-슬라이스에 할당된 시간량이 만료되기 전에 작업을 종료하고 "아이들"이 된다. 이 시나리오에서 일부 상황에서, 가상화 스케줄러(212)는 "조기에" 가상화 컨텍스트 전환을 수행한다. 보다 구체적으로, 아이들을 학습한 후 및 시간-슬라이스가 끝나기 전에, 가상화 스케줄러(212)는 가상화 컨텍스트 전환을 현재 기능으로부터 다음 기능으로 전환시킨다. 조기에 가상화 컨텍스트 전환을 수행하는 목적은 현재 기능이 더 이상 수행할 작업이 없을 때 다른 기능이 작업을 수행하도록 허용하는 것이다. 현재 기능에 대한 나머지 시간-슬라이스 동안 APD(116)을 아이들링하는 대신, 후속 기능으로 가상화 컨텍스트 전환을 수행함으로써, APD(116)의 자원은 아이들되는 대신에 유용한 작업을 수행하기 위해 사용된다. 현재 기능이 아이들인 것을 학습하였을 때 가상화 컨텍스트 전환을 조기에 수행하는 것에 더하여, 가상화 스케줄러(212)는 또한 조기 가상화 컨텍스트 전환이 수행된 이후에 그 기능이 어떠한 작업도 수신하지 않았다면 후속의 다음 턴을 건너 뛸 수 있다. 기능이 작업을 수신했는지의 여부는 이 개시 전반에 걸쳐 설명된 도어벨 메커니즘을 통해 결정된다.Referring back to Figure 2, in some cases, the current function terminates its work and becomes "idle" before the amount of time allocated to the time-slice for that function expires. In some situations in this scenario, virtualization scheduler 212 performs a virtualization context switch “early.” More specifically, after learning the children and before the time-slice ends, virtualization scheduler 212 causes a virtualization context switch from the current function to the next function. The purpose of performing an early virtualization context switch is to allow other functions to perform work when the current function no longer has work to do. By performing a virtualization context switch to a subsequent function, rather than idling the APD 116 for the remainder of the time-slice for the current function, the resources of the APD 116 are used to perform useful work instead of being idle. In addition to performing a virtualization context switch early when it learns that the current function is idle, virtualization scheduler 212 also performs a subsequent next turn if the function has not received any work since the early virtualization context switch was performed. You can skip it. Whether a function has received a task is determined through the doorbell mechanism described throughout this disclosure.

도 4는 예에 따라, 조기 가상화 컨텍스트 전환을 수행하는 것과 관련된 디바이스(100)의 특징을 나타내는 블록도이다. 디바이스(100)의 많은 요소들이 도 4에 도시되어 있는데, 이는 가상화 스케줄러(212) 내에 포함되는 것으로 도시된 조기 가상화 컨텍스트 전환 유닛(402)을 도시한다. 조기 가상화 컨텍스트 전환 유닛(402)은 하드웨어, 소프트웨어 또는 이들의 임의의 조합으로 구현될 수 있다. 또한, 조기 가상화 컨텍스트 전환 유닛(402)이 가상화 스케줄러(212) 내에 도시되어 있지만, 본 개시는 조기 가상화 컨텍스트 전환 유닛(402)의 기능을 수행하는 성분의 물리적 배치를 제한하는 것으로서 하려는 것이 아님에 유의한다. 도 5는 예에 따라, 조기 가상화 컨텍스트 전환을 수행하기 위한 방법의 흐름도이다. 도 5의 동작이 도 1-4의 시스템과 관련하여 설명되었지만, 임의의 시스템에 의해, 도시된 바와 같이 단계로 또는 임의의 다른 기술적으로 가능한 순서로 수행되는 방법(500)은 본 개시의 범위 내에 속하는 것으로 이해되어야 한다. 도 4 및 도 5는 아래에서 함께 논의된다.FIG. 4 is a block diagram illustrating features of device 100 associated with performing an early virtualization context switch, according to an example. Many elements of device 100 are depicted in FIG. 4 , including early virtualization context switch unit 402 , shown as included within virtualization scheduler 212 . Early virtualization context switch unit 402 may be implemented in hardware, software, or any combination thereof. Additionally, although the early virtualization context switch unit 402 is shown within the virtualization scheduler 212, it is noted that the present disclosure is not intended to limit the physical placement of the components that perform the functions of the early virtualization context switch unit 402. do. 5 is a flow diagram of a method for performing an early virtualization context switch, according to an example. Although the operation of Figure 5 has been described with respect to the system of Figures 1-4, method 500 performed in steps as shown or in any other technically feasible order by any system is within the scope of this disclosure. must be understood as belonging. Figures 4 and 5 are discussed together below.

조기 가상화 컨텍스트 전환 유닛(402)은 "조기 가상화 컨텍스트 전환"을 수행하는 것이 언제 적절한지를, 그래픽 프로세서 파이프라인(134)의 상태, 또는 계산 전용 작업을 위해, SIMD 스케쥴러(136) 및 계산 유닛(134)의 상태에 기초하여, 결정하기 위해 커맨드 프로세서(213)와 통신하고 조정한다. 그래픽 파이프라인(134)의 상태는 적어도 일부 경우에 SIMD 스케줄러(136)의 상태를 포함하지만, 비-그래픽 계산 작업이 미결이라면, 조기 가상화 컨텍스트 전환을 수행할지 여부에 대한 결정은 대안적으로 또는 그래픽 처리 파이프라인(134)의 상태에 더하여 SIMD 스케줄러(136) 및 계산 유닛(134)의 상태에 의존한다.Early virtualization context switch unit 402 determines when it is appropriate to perform an “early virtualization context switch,” the state of graphics processor pipeline 134, or for compute-only tasks, SIMD scheduler 136 and compute unit 134. ), communicates with and coordinates with the command processor 213 to determine, based on the status of. The state of the graphics pipeline 134 at least in some cases includes the state of the SIMD scheduler 136, but if non-graphics computation work is outstanding, the decision whether to perform an early virtualization context switch can be made alternatively or graphically. In addition to the state of the processing pipeline 134, it depends on the state of the SIMD scheduler 136 and the computation unit 134.

커맨드 프로세서(213)는 APD(116)에서 작업을 수행하기 위한 요청을 수신하고 그래픽 처리 파이프라인(134) 및/또는 SIMD 스케줄러(136)에 작업을 디스패치하는 엔티티이다. 보다 광범위하게, 커맨드 프로세서(213)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136) 상의 높은 수준에서 워크플로우를 제어한다. 이 워크플로우 제어의 부분으로서, 커맨드 프로세서(213)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)의 다양한 서브-유닛으로부터 작업 완료 보고를 수신한다. 보다 구체적으로, 그래픽 처리 파이프라인(134) 또는 SIMD 스케줄러(136) 상에 미결 작업에 대해서, 커맨드 프로세서(213)는 이러한 작업이 완료될 때 통지를 수신한다. 또한, 커맨드 프로세서(213)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)에서 어떤 작업이 미결인지 추적한다. 작업 완료 보고를 미결 작업 추적과 상관시킴으로써, 커맨드 프로세서(213)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)가 아이들인지 아니면 작업을 수행하고 있는지를 나타내는 정보를 추적한다. SIMD 스케줄러(136)는 계산 유닛(132) 상에 미결 작업이 없다면 아이들인 것으로 간주된다. 따라서, "SIMD 스케줄러(136)가 아이들이다"라는 어구에서, 계산 유닛(132)에서 기능의 조정자로서 SIMD 스케줄러(136)의 역할에 기인하여, SIMD 스케줄러(136)는 계산 유닛(132)에 대한 프록시로서 작용한다. 일예에서, 모든 미결 작업이 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)에서 완료되면, 커맨드 프로세서(213)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)를 아이들인 것으로 간주한다.The command processor 213 is an entity that receives requests to perform work from the APD 116 and dispatches the work to the graphics processing pipeline 134 and/or SIMD scheduler 136. More broadly, command processor 213 controls workflow at a high level on graphics processing pipeline 134 and SIMD scheduler 136. As part of this workflow control, command processor 213 receives job completion reports from various sub-units of graphics processing pipeline 134 and SIMD scheduler 136. More specifically, for any work outstanding on graphics processing pipeline 134 or SIMD scheduler 136, command processor 213 receives notification when such work is completed. Additionally, the command processor 213 keeps track of which tasks are outstanding in the graphics processing pipeline 134 and SIMD scheduler 136. By correlating task completion reports with pending task tracking, command processor 213 tracks information indicating whether graphics processing pipeline 134 and SIMD scheduler 136 are idle or performing work. SIMD scheduler 136 is considered idle if there is no work outstanding on compute unit 132. Accordingly, in the phrase “SIMD scheduler 136 is idle,” due to SIMD scheduler 136's role as the coordinator of functions in compute unit 132, SIMD scheduler 136 is idle for compute unit 132. It acts as a proxy. In one example, once all outstanding work has completed in graphics processing pipeline 134 and SIMD scheduler 136, command processor 213 considers graphics processing pipeline 134 and SIMD scheduler 136 to be idle.

그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)가 아이들일 때에도, 커맨드 프로세서(213)가 처리하는 작업이 있을 수 있다. 예를 들어, 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)는 커맨드 프로세서(213)가 처리할 새로운 도어벨이 있음을 검출할 때 아이들이 될 수 있다. 따라서, APD(116)는 그래픽 처리 파이프라인(134) 및 SIMD 스케줄러(136)가 아이들이고 처리되기를 기다리거나 현재 처리중인 도어벨이 없을 때까지 완전히 아이들이 되는 것으로 간주되지 않는다. 커맨드 프로세서(213)가 이러한 상태가 발생하는 것을 검출할 때, 커맨드 프로세서(213)는 도 5의 단계(502)로서 나타낸, "아이들 결정"을 한 것으로 간주된다.Even when the graphics processing pipeline 134 and SIMD scheduler 136 are idle, there may be work for the command processor 213 to process. For example, graphics processing pipeline 134 and SIMD scheduler 136 may become idle when command processor 213 detects that there is a new doorbell to process. Accordingly, APD 116 is not considered fully idle until graphics processing pipeline 134 and SIMD scheduler 136 are idle and waiting to be processed, or until no doorbells are currently being processed. When command processor 213 detects that this condition occurs, command processor 213 is considered to have made an “idle decision,” shown as step 502 in FIG. 5.

"아이들 결정"을 행할 때, 커맨드 프로세서(213)는 이 아이들 결정의 표시를 가상화 스케줄러(212)에 제공한다. 이 통지를 수신하였을 때, 가상화 스케줄러(212)는 조기 가상화 컨텍스트 전환 결정 시퀀스를 개시한다. 조기 가상화 컨텍스트 전환 결정 시퀀스는 조기 가상화 컨텍스트 전환(현재 기능에 대해 시간-슬라이스에 할당된 시간 이전의 가상화 컨텍스트 전환)가 발생하여야할지 여부를 결정하고 이어 조기 가상화 컨텍스트 전환이 발생해야 한다면 조기 가상화 컨텍스트 전환을 수행하기 위해 몇 가지 기능을 수행한다. When making an “idle decision,” command processor 213 provides an indication of this idle decision to virtualization scheduler 212. Upon receiving this notification, virtualization scheduler 212 initiates an early virtualization context switch decision sequence. The early virtualization context switch decision sequence determines whether an early virtualization context switch (a virtualization context switch before the time assigned to the time-slice for the current function) should occur, followed by an early virtualization context switch if an early virtualization context switch should occur. It performs several functions to accomplish this.

일 구현에서, 조기 가상화 컨텍스트 전환 결정은 커맨드 프로세서(213)로부터 아이들 표시를 수신한 후 타임아웃 기간 동안 대기하고 이 타임아웃 기간 내에 도어벨이 수신되는지를 결정하는 것을 포함한다(이 결정은 도 5의 단계(504)로서 도시되었다). 이 타임아웃 기간 동안 현재 기능에 대한 어떠한 도어벨도 APD(116)에 도달하지 않으면, 가상화 스케줄러는 조기 가상화 컨텍스트 전환을 개시한다(단계(508)). 조기 가상화 컨텍스트 전환은, 현재 기능에 대한 저장 상태를 저장하고, 다음 기능에 대한 상태를 로딩하고, 다음 기능에 대한 작업이 수행되기 하는 것을 포함하여 본 개시의 다른 곳에서 설명된, 실질적으로 "정규" 가상화 컨텍스트 전환으로서 수행된다. In one implementation, the early virtualization context switch decision includes waiting for a timeout period after receiving an idle indication from command processor 213 and determining whether a doorbell is received within this timeout period (this determination is shown in FIG. 5 (shown as step 504). If no doorbell for the current function reaches APD 116 during this timeout period, the virtualization scheduler initiates an early virtualization context switch (step 508). An early virtualization context switch is essentially a "regular" context switch, as described elsewhere in this disclosure, including saving state for the current function, loading state for the next function, and allowing operations on the next function to be performed. "Performed as a virtualization context switch.

조기 가상화 컨텍스트 전환을 개시하는 것은 또한 타임아웃 기간이 종료된 후에 수신된 도어벨 메모리(214) 내의 도어벨에 기초하여 작업을 페치하는 것을 중지하기 위해 커맨드를 커맨드 프로세서(213)에 전송하는 단계를 포함한다. 가상화 스케줄러(212)가 타임아웃 기간 내에 어떠한 도어벨도 수신되지 않았다고 결정하고 작업을 페치하는 것을 중지하기 위해 커맨드 프로세서(213)에 커맨드를 전송하는 시간과 커맨드 프로세서(213)가 작업을 페치하는 것을 중지하기 위한 커맨드를 수신하는 시간 사이에는 약간의 지연이 있다. 이 지연 기간 동안 도어벨이 수신되면, 커맨드 프로세서(213)는 도어벨을 무시하거나, 또는 커맨드 프로세서(213)가 도어벨에 기초하여 작업을 페치하기 시작하였다면, 이러한 페치하는 것을 중단한다. 이 중단은 커맨드 프로세서(213)와 관련된 상태를 커맨드 프로세서(213)가 이러한 도어벨을 처리하기 시작하기 전의 상태로 재설정하는 것을 포함할 것이다. 예를 들어, 도어벨에 의해 포인팅된 커맨드 버퍼에의 포인터(예를 들어, 테일 포인터)가 도어벨을 처리하기 위해 업데이트되면, 커맨드 프로세서(213)는 이러한 포인터를 도어벨을 처리하기 전에 값으로 재설정한다.Initiating an early virtualization context switch also includes sending a command to the command processor 213 to stop fetching tasks based on the doorbell in the doorbell memory 214 received after a timeout period has expired. Includes. The time at which the virtualization scheduler 212 determines that no doorbell has been received within the timeout period and sends a command to the command processor 213 to stop fetching the task and prevent the command processor 213 from fetching the task. There is a slight delay between receiving the command to stop. If a doorbell is received during this delay period, command processor 213 ignores the doorbell, or, if command processor 213 had begun fetching jobs based on the doorbell, it stops fetching. This interruption will include resetting the state associated with the command processor 213 to the state it was in before the command processor 213 began processing this doorbell. For example, if a pointer to a command buffer pointed by a doorbell (e.g., a tail pointer) is updated to process the doorbell, the command processor 213 stores these pointers as values before processing the doorbell. Reset.

단계(504)를 다시 참조하면, 타임아웃 기간 동안 APD(116)에 의해 도어벨이 수신되면, 방법(500)은 단계(506)로 진행한다. 단계(506)에서, 가상화 스케줄러(212)는 현재 기능을 위한 시간-슬라이스에 "현저한" 시간량이 남아 있는지를 결정한다. "현저한" 시간량은 임계 이상의 시간량이다. 구현에서, 임계는 커맨드 프로세서(213)가 APD(116)가 아이들이 된 후에 도어벨이 수신되는지를 결정하는 지연 기간과 동일하다(또는 대략 동일하다). 현재 시간-슬라이스에 남은 임계 지연 기간보다 많은 시간이 남아 있다면, 방법(500)은 단계(510)로 진행하여, 가상화 스케줄러(212)는 조기 가상화 컨텍스트 전환을 발생시키지 않고 대신에 APD(116)가 도어벨에 의해 참조된 작업을 처리하는 것을 허용한다. 단계(506)를 다시 참조하여, 현재 시간 슬라이스에 임계보다 큰 시간량이 남아 있지 않으면, 방법(500)은 단계(508)로 진행하여, 가상화 스케줄러(212)는 조기 가상화 컨텍스트 전환을 수행한다.Referring back to step 504, if a doorbell is received by APD 116 during the timeout period, the method 500 proceeds to step 506. At step 506, virtualization scheduler 212 determines whether a “significant” amount of time remains in the time-slice for the current function. A “significant” amount of time is an amount of time above the threshold. In an implementation, the threshold is equal to (or approximately equal to) the delay period during which command processor 213 determines whether a doorbell is received after APD 116 becomes idle. If there is more time remaining in the current time-slice than the critical delay period remaining, the method 500 proceeds to step 510 such that the virtualization scheduler 212 does not cause a premature virtualization context switch and instead causes the APD 116 to Allows processing of tasks referenced by the doorbell. Referring back to step 506, if there is no amount of time remaining in the current time slice greater than the threshold, the method 500 proceeds to step 508, where virtualization scheduler 212 performs an early virtualization context switch.

기능에 대한 가상화 컨텍스트 전환을 수행한 후, 기능에 대한 턴이 되었으나 도어벨이 수신되지 않았다면, 가상화 스케줄러(212)는 이 기능을 스킵하고, 다른 기능(예를 들어 스케쥴링 스킴에서 "다음" 기능)에 대한 작업을 스케쥴링한다.After performing a virtualization context switch for a function, if it is the turn for the function but the doorbell has not been received, the virtualization scheduler 212 skips this function and resumes another function (e.g., a “next” function in the scheduling scheme). Schedule work on .

위에 논의에서, "조기 가상화 컨텍스트 전환"이라는 용어에서 "조기"라는 단어는 현재 기능에 할당된 시간량이 만료되기 전에 가상화 컨텍스트가 전환이 행해짐을 나타내는 것을 의미한다.In the discussion above, the word "early" in the term "early virtualization context switch" means indicating that the virtualization context switch will occur before the amount of time allocated to the current function expires.

본원에 개시에 기초하여 많은 변형이 가능하다는 것이 이해되어야 한다. 예를 들어, PCIe가 본원에서 특정 상호연결 패브릭으로서 설명되었지만, 임의의 다른 기술적으로 가능한 상호연결 패브릭이 대안적으로 사용될 수 있다. 특징 및 요소가 특정 조합으로 상술되었지만, 각각의 특징 또는 요소는 다른 특징 및 요소없이 단독으로 또는 다른 특징 및 요소와 함께 또는 이들 없이 다양한 조합으로 사용될 수 있다.It should be understood that many modifications are possible based on the disclosure herein. For example, although PCIe is described herein as a specific interconnection fabric, any other technologically feasible interconnection fabric may alternatively be used. Although features and elements are described above in specific combinations, each feature or element may be used alone or in various combinations with or without other features and elements.

제공되는 방법은 범용 컴퓨터, 프로세서, 또는 프로세서 코어에서 구현될 수 있다. 적합한 프로세서는, 예로서, 범용 프로세서, 전용 프로세서, 통상의 프로세서, 디지털 신호 프로세서(DSP), 복수의 마이크로프로세서, DSP 코어와 관련된 하나 이상의 마이크로프로세서, 제어기, 마이크로컨트롤러, ASIC(Application Specific Integrated Circuits), FPGA(Field Programmable Gate Arrays) 회로, 임의의 다른 유형의 집적회로(IC), 및/또는 상태 머신을 포함한다. 이러한 프로세서는 처리된 하드웨어 디스크립션 언어(HDL) 명령 및 넷리스트(컴퓨터 판독가능 매체에 저장될 수 있는 이러한 명령)를 포함하는 다른 중간 데이터의 결과를 사용하여 제조 프로세스를 구성함으로써 제조될 수 있다. 이러한 처리의 결과는 본 개시의 특징을 구현하는 프로세서를 제조하기 위해 반도체 제조 프로세스에서 사용되는 마스크워크일 수 있다.The provided methods may be implemented in a general-purpose computer, processor, or processor core. Suitable processors include, for example, a general-purpose processor, a dedicated processor, a conventional processor, a digital signal processor (DSP), a plurality of microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, or an Application Specific Integrated Circuits (ASIC). , Field Programmable Gate Arrays (FPGA) circuits, any other type of integrated circuit (IC), and/or state machines. Such processors may be manufactured by constructing a manufacturing process using the results of processed Hardware Description Language (HDL) instructions and other intermediate data, including a netlist (such instructions that may be stored on a computer-readable medium). The result of this processing may be a maskwork used in a semiconductor manufacturing process to fabricate a processor embodying the features of the present disclosure.

본원에 제공된 방법 또는 흐름도는 범용 컴퓨터 또는 프로세서에 의한 실행을 위해 비일시적 컴퓨터 판독가능 저장 매체에 통합된 컴퓨터 프로그램, 소프트웨어, 또는 펌웨어로 구현될 수 있다. 비일시적 컴퓨터 판독가능 저장 매체의 예는 판독 전용 메모리(ROM), 랜덤 액세스 메모리(RAM), 레지스터, 캐시 메모리, 반도체 메모리 디바이스, 내부 하드 디스크 및 착탈가능 디스크와 같은 자기 매체, 자기-광학 매체, 및 CD-ROM 및 디지털 다용도 디스크(DVD)디스크와 같은 광학 매체를 포함한다.The methods or flow diagrams provided herein may be implemented as a computer program, software, or firmware incorporated into a non-transitory computer-readable storage medium for execution by a general-purpose computer or processor. Examples of non-transitory computer readable storage media include read only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM and digital versatile disk (DVD) disks.

Claims (20)

가상화된 가속 처리 디바이스("APD")에서 조기 가상화 컨텍스트 전환을 수행하는 방법으로서,
상기 가상화된 APD 상에서 가상 머신에 대한 작업을 수행하는 것과 관련된 현재 기능을 위한 시간-슬라이스의 완료 전에, 상기 APD가 아이들인 것으로 결정하는 단계;
상기 결정에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하는 단계를 포함하고, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대해 상기 APD에 상태를 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 APD가 아이들인 것으로 결정하는 단계는:
상기 APD의 그래픽 처리 파이프라인에 대한 미결 작업이 없고 상기 APD의 계산 유닛들에 대한 미결 작업이 없는 것으로 결정하는 단계를 포함하는, 방법.
1. A method of performing an early virtualization context switch in a virtualized accelerated processing device (“APD”), comprising:
determining that the APD is idle prior to completion of a time-slice for a current function associated with performing operations on a virtual machine on the virtualized APD;
In response to the determination, performing an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing a state in the APD for the current function;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
The steps for determining that the APD is children are:
Determining that there is no outstanding work on the graphics processing pipeline of the APD and that there is no outstanding work on the compute units of the APD.
청구항 1에 있어서, 상기 후속 기능에 대한 작업을 시작하는 단계는:
상기 후속 기능에 대한 도어벨들에 기초하여 커맨드들을 페치하는 단계; 및
상기 후속 기능에 대한 상기 커맨드들을 실행하는 단계를 포함하는, 방법.
The method of claim 1, wherein starting work on the subsequent functionality includes:
fetching commands based on doorbells for the subsequent function; and
and executing the commands for the subsequent function.
삭제delete 청구항 1에 있어서, 상기 APD가 아이들인 것으로 결정하는 단계는 상기 APD의 그래픽 처리 파이프라인에 대한 미결 작업이 없고 상기 APD의 계산 유닛들에 대한 미결 작업이 없는 동안, 어떠한 도어벨도 처리되거나 수신되지 않는 것으로 결정하는 단계를 더 포함하는, 방법.The method of claim 1, wherein determining that the APD is idle comprises determining that no doorbell is processed or received while there is no outstanding work on the APD's graphics processing pipeline and no outstanding work on the APD's compute units. A method further comprising determining not to do so. 청구항 1에 있어서, 상기 APD가 아이들임을 결정하는 단계는 상기 APD가 아이들이 된 후 타임아웃 기간 동안 어떠한 도어벨도 수신되지 않는 것으로 결정하는 단계를 더 포함하는, 방법.The method of claim 1, wherein determining that the APD is idle further comprises determining that no doorbell is received during a timeout period after the APD is idle. 가상화된 가속 처리 디바이스("APD")에서 조기 가상화 컨텍스트 전환을 수행하는 방법으로서,
상기 가상화된 APD 상에서 가상 머신에 대한 작업을 수행하는 것과 관련된 현재 기능을 위한 시간-슬라이스의 완료 전에, 상기 APD가 아이들인 것으로 결정하는 단계;
상기 결정에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하는 단계, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대해 상기 APD에 상태를 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하고,
상기 APD가 아이들이지 않고 완료하는 제2 기능을 위한 제2 시간-슬라이스가 타임아웃 기간보다 더 긴 것에 응답하여, 상기 제2 시간-슬라이스가 조기 가상화 컨텍스트 전환을 수행하지 않고 상기 제2 기능에 대해 완료하도록 하는 단계를 포함하는, 방법.
1. A method of performing an early virtualization context switch in a virtualized accelerated processing device (“APD”), comprising:
determining that the APD is idle prior to completion of a time-slice for a current function associated with performing operations on a virtual machine on the virtualized APD;
In response to the determination, performing an early virtualization context switch with a subsequent function, the early virtualization context switch comprising:
storing a state in the APD for the current function;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
In response to the second time-slice for the second function completing without the APD being idle being longer than the timeout period, the second time-slice for the second function completing without performing a premature virtualization context switch. A method, comprising steps to complete.
가상화된 가속 처리 디바이스("APD")에서 조기 가상화 컨텍스트 전환을 수행하는 방법으로서,
상기 가상화된 APD 상에서 가상 머신에 대한 작업을 수행하는 것과 관련된 현재 기능을 위한 시간-슬라이스의 완료 전에, 상기 APD가 아이들인 것으로 결정하는 단계;
상기 결정에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하는 단계, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대해 상기 APD에 상태를 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하고,
제2 기능을 위해 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 것으로 결정하는 단계;
상기 제2 기능을 위한 상기 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 후 타임아웃 기간 동안 도어벨이 수신된 것으로 결정하는 단계; 및
조기 가상화 컨텍스트 전환을 수행하는 대신 상기 도어벨과 관련된 작업을 수행하는 단계를 포함하는, 방법.
1. A method of performing an early virtualization context switch in a virtualized accelerated processing device (“APD”), comprising:
determining that the APD is idle prior to completion of a time-slice for a current function associated with performing operations on a virtual machine on the virtualized APD;
In response to the determination, performing an early virtualization context switch with a subsequent function, the early virtualization context switch comprising:
storing a state in the APD for the current function;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
determining that the APD has become idle during a second time-slice for a second function;
determining that a doorbell is received during a timeout period after the APD becomes idle during the second time-slice for the second function; and
A method comprising: performing operations associated with the doorbell instead of performing an early virtualization context switch.
가상화된 가속 처리 디바이스("APD")에서 조기 가상화 컨텍스트 전환을 수행하는 방법으로서,
상기 가상화된 APD 상에서 가상 머신에 대한 작업을 수행하는 것과 관련된 현재 기능을 위한 시간-슬라이스의 완료 전에, 상기 APD가 아이들인 것으로 결정하는 단계;
상기 결정에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하는 단계, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대해 상기 APD에 상태를 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하고,
제2 기능을 위한 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 것으로 결정하는 단계;
상기 제2 기능을 위한 상기 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 후 타임아웃 기간 동안 도어벨을 수신하는 단계; 및
임계 시간량 미만이 상기 제2 시간-슬라이스에 남아 있다는 결정에 응답하여, 상기 도어벨을 수신함에도 불구하고 조기 가상화 컨텍스트 전환을 수행하는 단계를 포함하는, 방법.
1. A method of performing an early virtualization context switch in a virtualized accelerated processing device (“APD”), comprising:
determining that the APD is idle prior to completion of a time-slice for a current function associated with performing operations on a virtual machine on the virtualized APD;
In response to the determination, performing an early virtualization context switch with a subsequent function, the early virtualization context switch comprising:
storing a state in the APD for the current function;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
determining that the APD has become idle during a second time-slice for a second function;
receiving a doorbell during a timeout period after the APD becomes idle during the second time-slice for the second function; and
In response to determining that less than a threshold amount of time remains in the second time-slice, performing an early virtualization context switch despite receiving the doorbell.
가상화된 가속 처리 디바이스("APD")에서 조기 가상화 컨텍스트 전환을 수행하는 방법으로서,
상기 가상화된 APD 상에서 가상 머신에 대한 작업을 수행하는 것과 관련된 현재 기능을 위한 시간-슬라이스의 완료 전에, 상기 APD가 아이들인 것으로 결정하는 단계;
상기 결정에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하는 단계, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대해 상기 APD에 상태를 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하고,
상기 가상화 컨텍스트 전환을 수행한 후, 스케줄링 스킴에 기초하여, 상기 가상 머신에 다시 상기 APD 상에 턴이 주어질 것으로 결정하는 단계; 및
상기 가상화 컨텍스트 전환을 수행한 이후에 상기 가상 머신에 대한 어떠한 도어벨도 수신되지 않았다는 결정에 응답하여, 상기 가상 머신에 대한 상기 턴을 스킵하는 단계를 포함하는, 방법.
1. A method of performing an early virtualization context switch in a virtualized accelerated processing device (“APD”), comprising:
determining that the APD is idle prior to completion of a time-slice for a current function associated with performing operations on a virtual machine on the virtualized APD;
In response to the determination, performing an early virtualization context switch with a subsequent function, the early virtualization context switch comprising:
storing a state in the APD for the current function;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
After performing the virtualization context switch, determining, based on a scheduling scheme, that the virtual machine will be given a turn on the APD again; and
In response to determining that no doorbell for the virtual machine has been received since performing the virtualization context switch, skipping the turn for the virtual machine.
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")로서, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하고, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능에 대한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하고,
상기 가상화 스케줄러는 상기 APD의 그래픽 처리 파이프라인에 대한 미결 작업이 없고 상기 APD의 계산 유닛들에 대한 미결 작업이 없는 것으로 결정함으로써 상기 APD가 아이들인 것으로 결정하도록 구성된, 가속 처리 디바이스.
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD comprising:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
wherein the virtualization scheduler is configured to determine that the APD is idle by determining that there is no outstanding work for the APD's graphics processing pipeline and no outstanding work for the APD's compute units.
청구항 10에 있어서, 상기 가상화 스케줄러는:
상기 후속 기능에 대한 도어벨들에 기초하여 커맨드들을 페치하고;
상기 후속 기능에 대한 상기 커맨드들을 실행함으로써 상기 후속 기능에 대한 작업을 시작하도록 구성된, 가속 처리 디바이스.
The method of claim 10, wherein the virtualization scheduler:
fetch commands based on doorbells for the subsequent function;
An accelerated processing device configured to initiate work on a successor function by executing the commands for the successor function.
삭제delete 청구항 10에 있어서, 상기 가상화 스케줄러는:
상기 APD의 그래픽 처리 파이프라인에 대한 미결 작업이 없고 상기 APD의 계산 유닛들에 대한 미결 작업이 없는 동안, 어떠한 도어벨도 처리되거나 수신되지 않는 것으로 결정함으로써 상기 APD가 아이들인 것으로 결정하도록 더 구성된, 가속 처리 디바이스.
The method of claim 10, wherein the virtualization scheduler:
further configured to determine that the APD is idle by determining that no doorbell is processed or received while there is no outstanding work on the graphics processing pipeline of the APD and no outstanding work on the computational units of the APD. Accelerated processing device.
청구항 10에 있어서, 상기 가상화 스케줄러는:
상기 APD가 아이들이 된 후 타임아웃 기간 동안 어떠한 도어벨도 수신되지 않는 것으로 결정함으로써 상기 APD가 아이들인 것으로 결정하도록 구성된, 가속 처리 디바이스.
The method of claim 10, wherein the virtualization scheduler:
and determine that the APD is idle by determining that no doorbell is received during a timeout period after the APD becomes idle.
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")로서, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하고, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능에 대한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 가상화 스케줄러는, 상기 APD가 아이들이지 않고 완료하는 제2 기능을 위한 제2 시간-슬라이스가 타임아웃 기간보다 더 긴 것에 응답하여, 상기 제2 시간-슬라이스가 조기 가상화 컨텍스트 전환을 수행하지 않고 상기 제2 기능에 대해 완료하도록 구성된, 가속 처리 디바이스.
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD comprising:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
The virtualization scheduler is configured to, in response to the second time-slice for the second function completing without the APD being idle, being longer than a timeout period, the second time-slice does not perform a premature virtualization context switch. An accelerated processing device configured to complete the second function.
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")로서, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하고, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능에 대한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 가상화 스케줄러는 제2 기능을 위해 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 것으로 결정하도록;
상기 제2 기능을 위한 상기 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 후 타임아웃 기간 동안 도어벨이 수신된 것으로 결정하도록; 그리고
조기 가상화 컨텍스트 전환을 수행하는 대신 상기 도어벨과 관련된 작업을 상기 APD가 수행하도록 구성된, 가속 처리 디바이스.
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD comprising:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
the virtualization scheduler determines that the APD has become idle during a second time-slice for a second function;
determine that a doorbell has been received during a timeout period after the APD has become idle during the second time-slice for the second function; and
An accelerated processing device configured to cause the APD to perform tasks associated with the doorbell instead of performing a premature virtualization context switch.
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")로서, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하고, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능에 대한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 가상화 스케줄러는 제2 기능을 위한 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 것으로 결정하도록;
상기 제2 기능을 위한 상기 제2 시간-슬라이스 동안 상기 APD가 아이들이 된 후 타임아웃 기간 동안 도어벨을 검출하도록; 그리고
임계 시간량 미만이 상기 제2 시간-슬라이스에 남아 있다는 결정에 응답하여, 상기 도어벨을 수신함에도 불구하고 조기 가상화 컨텍스트 전환을 수행하도록 구성된, 가속 처리 디바이스.
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD comprising:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
the virtualization scheduler determines that the APD has become idle during a second time-slice for a second function;
detect a doorbell during a timeout period after the APD becomes idle during the second time-slice for the second function; and
In response to determining that less than a threshold amount of time remains in the second time-slice, the accelerated processing device is configured to perform an early virtualization context switch despite receiving the doorbell.
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")로서, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하고, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능에 대한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 가상화 스케줄러는 상기 가상화 컨텍스트 전환을 수행한 후, 스케줄링 스킴에 기초하여, 상기 가상 머신에 다시 상기 APD 상에 턴이 주어질 것으로 결정하도록; 그리고
상기 가상화 컨텍스트 전환을 수행한 이후에 상기 가상 머신에 대한 어떠한 도어벨도 수신되지 않았다는 결정에 응답하여, 상기 가상 머신에 대한 상기 턴을 스킵하도록 구성된, 가속 처리 디바이스.
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD comprising:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
After performing the virtualization context switch, the virtualization scheduler determines that the virtual machine will be given a turn on the APD again, based on a scheduling scheme; and
In response to determining that no doorbell for the virtual machine has been received since performing the virtualization context switch, skip the turn for the virtual machine.
디바이스로서,
복수의 가상 머신들을 실행하도록 구성된 프로세서; 및
조기 가상화 컨텍스트 전환을 수행할 수 있는 가속 처리 디바이스("APD")를 포함하고, 상기 APD는 하나 이상의 병렬 처리 유닛들을 포함하며, 상기 APD는:
작업을 수행하도록 구성된 것으로, 하나 이상의 병렬 처리 유닛들을 포함하는 복수의 계산 유닛들 및 그래픽 처리 파이프라인;
상기 작업과 관련된 커맨드들을 상기 복수의 계산 유닛들 및 상기 그래픽 처리 파이프라인에 발행하도록 구성된 제1 프로세서를 포함하는 커맨드 프로세서; 및
가상화 스케줄러로서,
상기 APD에서 가상 머신에 대한 작업을 수행하는 것에 연관된 현재 기능을 위한 시간-슬라이스의 완료에 앞서, 상기 APD가 아이들인 것을 결정하도록;
상기 결정한 것에 응답하여, 후속 기능으로 조기 가상화 컨텍스트 전환을 수행하도록 구성된 제2 프로세서를 포함하는, 상기 가상화 스케줄러를 포함하며, 상기 조기 가상화 컨텍스트 전환은:
상기 현재 기능에 대한 상태를 상기 APD에 저장하는 단계;
상기 APD에서 상기 후속 기능에 대한 상태를 로딩하는 단계; 및
상기 APD에서 상기 후속 기능에 대한 작업을 시작하는 단계를 포함하며,
상기 APD가 아이들인 것으로 결정하는 것은 상기 APD의 그래픽 처리 파이프라인에 대한 미결 작업이 없고 상기 APD의 계산 유닛들에 대한 미결 작업이 없는 것으로 결정하는 것을 포함하는, 디바이스.
As a device,
A processor configured to run a plurality of virtual machines; and
An accelerated processing device (“APD”) capable of performing an early virtualization context switch, the APD comprising one or more parallel processing units, the APD:
a graphics processing pipeline and a plurality of computational units, including one or more parallel processing units, configured to perform a task;
a command processor including a first processor configured to issue commands related to the task to the plurality of computational units and the graphics processing pipeline; and
As a virtualization scheduler,
determine that the APD is idle prior to completion of a time-slice for a current function associated with performing work on a virtual machine in the APD;
In response to the determination, the virtualization scheduler includes a second processor configured to perform an early virtualization context switch with a subsequent function, wherein the early virtualization context switch:
storing the status of the current function in the APD;
loading state for the subsequent function in the APD; and
Initiating work on the subsequent function in the APD,
wherein determining that the APD is idle includes determining that there is no work outstanding on the graphics processing pipeline of the APD and that there is no work outstanding on the compute units of the APD.
청구항 19에 있어서, 상기 가상화 스케줄러는:
상기 후속 기능에 대한 도어벨들에 기초하여 커맨드들을 페치함으로써; 그리고
상기 후속 기능에 대한 상기 커맨드들을 실행함으로써 상기 후속 기능에 대한 작업을 시작하도록 구성된, 디바이스.
The method of claim 19, wherein the virtualization scheduler:
by fetching commands based on doorbells for the subsequent function; and
The device is configured to start working on the successor function by executing the commands for the successor function.
KR1020207001390A 2017-06-29 2018-06-13 Early virtualization context switching for virtualized accelerated processing devices KR102605313B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US15/637,800 2017-06-29
US15/637,800 US10474490B2 (en) 2017-06-29 2017-06-29 Early virtualization context switch for virtualized accelerated processing device
PCT/US2018/037341 WO2019005485A1 (en) 2017-06-29 2018-06-13 Early virtualization context switch for virtualized accelerated processing device

Publications (2)

Publication Number Publication Date
KR20200014426A KR20200014426A (en) 2020-02-10
KR102605313B1 true KR102605313B1 (en) 2023-11-23

Family

ID=64738704

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020207001390A KR102605313B1 (en) 2017-06-29 2018-06-13 Early virtualization context switching for virtualized accelerated processing devices

Country Status (6)

Country Link
US (1) US10474490B2 (en)
EP (1) EP3646177B1 (en)
JP (1) JP7253507B2 (en)
KR (1) KR102605313B1 (en)
CN (1) CN110832457A (en)
WO (1) WO2019005485A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304177A (en) * 2017-01-13 2018-07-20 辉达公司 Calculate the execution of figure
US10459751B2 (en) * 2017-06-30 2019-10-29 ATI Technologies ULC. Varying firmware for virtualized device
US11243799B2 (en) * 2019-08-30 2022-02-08 Advanced Micro Devices, Inc. Adaptive world switching
JP7153678B2 (en) * 2020-01-22 2022-10-14 ソフトバンク株式会社 Computer
US11340942B2 (en) 2020-03-19 2022-05-24 Raytheon Company Cooperative work-stealing scheduler
US11768696B2 (en) * 2020-12-14 2023-09-26 Ati Technologies Ulc Security for microengine access
WO2023146730A1 (en) * 2022-01-25 2023-08-03 Microsoft Technology Licensing, Llc Elastically managing workers of multi-worker workloads on accelerator devices
CN116521376B (en) * 2023-06-29 2023-11-21 南京砺算科技有限公司 Resource scheduling method and device for physical display card, storage medium and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466071C (en) 2005-06-22 2009-03-04 株式会社日立制作所 Optical disk device
US20130124838A1 (en) 2011-11-10 2013-05-16 Lacky V. Shah Instruction level execution preemption
US20130174144A1 (en) 2011-12-28 2013-07-04 Ati Technologies Ulc Hardware based virtualization system
WO2017049538A1 (en) * 2015-09-24 2017-03-30 Intel Corporation Apparatus and method for pattern driven self-adaptive virtual graphics processor units

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7545381B2 (en) * 2005-11-10 2009-06-09 Via Technologies, Inc. Interruptible GPU and method for context saving and restoring
JP5469940B2 (en) 2009-07-13 2014-04-16 株式会社日立製作所 Computer system, virtual machine monitor, and virtual machine monitor scheduling method
US9086922B2 (en) * 2009-10-26 2015-07-21 Microsoft Technology Licensing, Llc Opportunistically scheduling and adjusting time slices
US20120229481A1 (en) * 2010-12-13 2012-09-13 Ati Technologies Ulc Accessibility of graphics processing compute resources
US9176794B2 (en) * 2010-12-13 2015-11-03 Advanced Micro Devices, Inc. Graphics compute process scheduling
US8803891B2 (en) * 2010-12-13 2014-08-12 Advanced Micro Devices, Inc. Method for preempting graphics tasks to accommodate compute tasks in an accelerated processing device (APD)
US9507632B2 (en) * 2010-12-15 2016-11-29 Advanced Micro Devices, Inc. Preemptive context switching of processes on ac accelerated processing device (APD) based on time quanta
US20140157287A1 (en) * 2012-11-30 2014-06-05 Advanced Micro Devices, Inc Optimized Context Switching for Long-Running Processes
US9323576B2 (en) * 2014-02-04 2016-04-26 The Boeing Company Removal of idle time in virtual machine operation
US9727451B2 (en) * 2014-03-28 2017-08-08 Fortinet, Inc. Virtualization in a multi-host environment
US9639401B1 (en) * 2014-05-08 2017-05-02 Rockwell Collins, Inc. Multicore adaptive scheduler
US20150378782A1 (en) * 2014-06-25 2015-12-31 Unisys Corporation Scheduling of tasks on idle processors without context switching
US9411629B1 (en) * 2015-03-10 2016-08-09 International Business Machines Corporation Reducing virtual machine pre-emption in virtualized environment
US20170069054A1 (en) * 2015-09-04 2017-03-09 Intel Corporation Facilitating efficient scheduling of graphics workloads at computing devices
US10545800B2 (en) * 2017-05-31 2020-01-28 Ati Technologies Ulc Direct doorbell ring in virtualized processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466071C (en) 2005-06-22 2009-03-04 株式会社日立制作所 Optical disk device
US20130124838A1 (en) 2011-11-10 2013-05-16 Lacky V. Shah Instruction level execution preemption
US20130174144A1 (en) 2011-12-28 2013-07-04 Ati Technologies Ulc Hardware based virtualization system
WO2017049538A1 (en) * 2015-09-24 2017-03-30 Intel Corporation Apparatus and method for pattern driven self-adaptive virtual graphics processor units

Also Published As

Publication number Publication date
EP3646177A4 (en) 2021-03-31
US10474490B2 (en) 2019-11-12
US20190004839A1 (en) 2019-01-03
JP7253507B2 (en) 2023-04-06
WO2019005485A1 (en) 2019-01-03
EP3646177B1 (en) 2022-10-12
EP3646177A1 (en) 2020-05-06
JP2020525913A (en) 2020-08-27
KR20200014426A (en) 2020-02-10
CN110832457A (en) 2020-02-21

Similar Documents

Publication Publication Date Title
KR102605313B1 (en) Early virtualization context switching for virtualized accelerated processing devices
CN109643291B (en) Method and apparatus for efficient use of graphics processing resources in virtualized execution environments
KR102510524B1 (en) Combined world-space pipeline shader stage
JP6918919B2 (en) Primitive culling with an automatically compiled compute shader
US11182186B2 (en) Hang detection for virtualized accelerated processing device
US9563466B2 (en) Method and apparatus for supporting programmable software context state execution during hardware context restore flow
US10509666B2 (en) Register partition and protection for virtualized processing device
US10545800B2 (en) Direct doorbell ring in virtualized processing device
JP2020513631A (en) Out-of-order cash return
US20200159581A1 (en) Variable latency request arbitration
US20220058048A1 (en) Varying firmware for virtualized device
US20230205608A1 (en) Hardware supported split barrier
US20210089423A1 (en) Flexible multi-user graphics architecture
KR20230017220A (en) Stacked Dies for Machine Learning Accelerometers
JP7308197B2 (en) Parallel data transfer to increase bandwidth in accelerated processing devices
KR20230028458A (en) Load instruction for multisample anti-aliasing

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant