WO2013090605A2 - Saving and restoring shader context state and resuming a faulted apd wavefront - Google Patents
Saving and restoring shader context state and resuming a faulted apd wavefront Download PDFInfo
- Publication number
- WO2013090605A2 WO2013090605A2 PCT/US2012/069549 US2012069549W WO2013090605A2 WO 2013090605 A2 WO2013090605 A2 WO 2013090605A2 US 2012069549 W US2012069549 W US 2012069549W WO 2013090605 A2 WO2013090605 A2 WO 2013090605A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- wavefront
- instructions
- apd
- memory
- processing
- Prior art date
Links
- 238000000034 method Methods 0.000 claims abstract description 108
- 230000015654 memory Effects 0.000 claims abstract description 105
- 238000012545 processing Methods 0.000 claims abstract description 77
- 230000004044 response Effects 0.000 claims abstract description 4
- 230000008569 process Effects 0.000 claims description 50
- 239000013598 vector Substances 0.000 claims description 20
- 230000000873 masking effect Effects 0.000 claims description 6
- 239000013256 coordination polymer Substances 0.000 description 30
- 238000004891 communication Methods 0.000 description 26
- 238000013519 translation Methods 0.000 description 12
- 239000000872 buffer Substances 0.000 description 11
- 238000004590 computer program Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 2
- 230000009249 intrinsic sympathomimetic activity Effects 0.000 description 2
- 238000004886 process control Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 229910052710 silicon Inorganic materials 0.000 description 2
- 239000010703 silicon Substances 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 241001522296 Erithacus rubecula Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000004888 barrier function Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000004880 explosion Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000012530 fluid Substances 0.000 description 1
- 230000001404 mediated effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000036962 time dependent Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3861—Recovery, e.g. branch miss-prediction, exception handling
Definitions
- Embodiments of the present invention are generally directed to computer systems.
- embodiments of the present invention are directed to saving and restoring the context state data during a context switching operation, and resuming an accelerated processing device wavefront in which a subset of elements have faulted within the computing system.
- GPU graphics processing unit
- CPU central processing unit
- GPUs have traditionally operated in a constrained programming environment, available primarily for the acceleration of graphics. These constraints arose from the fact that GPUs did not have as rich a programming ecosystem as CPUs. Their use, therefore, has been mostly limited to two dimensional (2D) and three dimensional (3D) graphics and a few leading edge multimedia applications, which are already accustomed to dealing with graphics and video application programming interfaces (APIs).
- 2D two dimensional
- 3D three dimensional
- GPU hardware can include a shader core, as well as non-shader resource components.
- the shader core includes an array of single instruction multiple data devices (SIMDs). Because SIMDs process multiple instructions simultaneously, the shader core context state can encompass up to several megabytes of data spread over registers and local data memory.
- SIMDs single instruction multiple data devices
- an external processor reading and writing the shader core context state (which is required when saving and restoring GPU context state) can be severely limited by the external processor's own read/write capabilities. It can also be limited by the bandwidth between the external processor and the GPU. These two limitations can result in extremely long context switching times. This problem also exists for the other non-shader resource components associated with the GPU context state save and restore process.
- Tasks being executed within a GPU have graphics wavefronts that have a plurality of thread operations being processed. Often a subset of threads in a wavefront may have a number of operations that have not yet been acknowledged when a context switch is requested. Therefore, when execution of the wavefront resumes, all threads, including those previously acknowledged, must be retried. Such retying all of the threads in the wavefront causes an increased latency for the GPU resources.
- Embodiments of the present invention in certain circumstances, provide efficient
- GPU context switch operations for enhancing overall system operational speed.
- An embodiment of the present invention in certain circumstances, also enables the offloading of applications from the CPU and so that the offloaded applications can be ran on the GPU.
- One embodiment of the present invention provides a system including a shader core configured to process a first set of instructions and a command processor configured for interrupting processing of the first set of instructions.
- the shader core is configured to save a context state associated with the first set of instructions after the interrupting, and process a second set of instructions after the context state has been saved.
- Another embodiment provides a method including processing, by a shader core, a first set of instructions received from a command processor and interrupting processing of the first set of instructions via the command processor.
- the method also includes saving, by the shader core, a context state associated with the first set of instructions after the interrupting and processing a second set of instructions after the context state has been saved.
- Embodiments of the present invention in certain circumstances, provide a method including, responsive to a command to restore a partially completed wavefront, restoring resources for the partially completed wavefront masking a portion of said restored partially completed wavefront.
- APD accelerated processing device
- FIG. 1 A is an illustrative block diagram of a processing system in accordance with embodiments of the present invention.
- FIG. IB is an illustrative block diagram of the APD illustrated in FIG. 1A;
- FIG. 2 is a more detailed block diagram of the APD illustrated in FIG 1 B;
- FIG. 3 is a flowchart of an exemplary method of practicing an embodiment of the present invention.
- Fig. 4 is flowchart of exemplary method of practicing another embodiment of the present invention.
- Fig. 5 is a flowchart illustrating a method for tolerating a virtual to physical address translation failure on an APD, according to an embodiment of the present invention.
- FIG. 6 is a flowchart illustrating a method for resuming a wavefront on an APD, according to an embodiment of the present invention.
- Fig. 7 is a flowchart illustrating a method for tracking acknowledgement data within a wavefront on an APD, according to an embodiment of the present invention.
- Fig. 8 is a flowchart illustrating a method for tracking the performance of threads of the wavefront on an APD, according to an embodiment of the present invention.
- Fig. 9 is an illustrative block diagram illustration of wavefront structures.
- FIG. 10 is an illustration of an example computer system in which embodiments of the present invention, or portions thereof, can be implemented as computer readable code.
- references to "one embodiment,” “an embodiment,” “an example embodiment,” etc. indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
- FIG. 1 A is an exemplary illustration of a unified computing system 100 including two processors, a CPU 102 and an APD 104.
- CPU 102 can include one or more single or multi core CPUs.
- the system 100 is formed on a single silicon die or package, combining CPU 102 and APD 104 to provide a unified programming and execution environment. This environment enables the APD 104 to be used as fluidly as the CPU 102 for some programming tasks.
- the CPU 102 and APD 104 be formed on a single silicon die. In some embodiments, it is possible for them to be formed separately and mounted on the same or different substrates.
- system 100 also includes a memory 106, an operating system
- the operating system 108 and the communication infrastructure 109 are discussed in greater detail below.
- the system 100 also includes a kernel mode driver (KMD) 1 10, a software scheduler (SWS) 112, and a memory management unit 116, such as input/output memory management unit (IOMMU).
- KMD kernel mode driver
- SWS software scheduler
- IOMMU input/output memory management unit
- Components of system 100 can be implemented as hardware, firmware, software, or any combination thereof.
- system 100 may include one or more software, hardware, and firmware components in addition to, or different from, that shown in the embodiment shown in FIG. 1 A.
- a driver such as KMD 110
- KMD 110 typically communicates with a device through a computer bus or communications subsystem to which the hardware connects.
- a calling program invokes a routine in the driver
- the driver issues commands to the device. Once the device sends data back to the driver, the driver may invoke routines in the original calling program.
- Drivers are hardware-dependent and operating-system- specific. They usually provide the interrupt handling required for any necessary asynchronous time-dependent hardware interface.
- Device drivers particularly on modern Microsoft Windows® platforms, can run in kernel-mode (Ring 0) or in user-mode (Ring 3). The primary benefit of running a driver in user mode is improved stability, since a poorly written user mode device driver cannot crash the system by overwriting kernel memory.
- Kernel space can be accessed by user module only through the use of system calls. End user programs like the UNIX shell or other GUI based applications are part of the user space. These applications interact with hardware through kernel supported functions.
- CPU 102 can include (not shown) one or more of a control processor, field programmable gate array (FPGA), application specific integrated circuit (ASIC), or digital signal processor (DSP).
- CPU 102 executes the control logic, including the operating system 108, KMD 110, SWS 112, and applications 111 , that control the operation of computing system 100.
- CPU 102 executes and controls the execution of applications 1 1 1 by, for example, distributing the processing associated with that application across the CPU 102 and other processing resources, such as the APD 104.
- APD 104 executes commands and programs for selected functions, such as graphics operations and other operations that may be, for example, particularly suited for parallel processing.
- APD 104 can be frequently used for executing graphics pipeline operations, such as pixel operations, geometric computations, and rendering an image to a display.
- APD 104 can also execute compute processing operations (e.g., those operations unrelated to graphics such as, for example, video operations, physics simulations, computational fluid dynamics, etc.), based on commands or instructions received from CPU 102.
- commands can be considered as special instructions that are not typically defined in the instruction set architecture (ISA).
- a command may be executed by a special processor such a dispatch processor, command processor, or network controller.
- instructions can be considered, for example, a single operation of a processor within a computer architecture.
- some instructions are used to execute x86 programs and some instructions are used to execute kernels on an APD compute unit.
- CPU 102 transmits selected commands to APD
- These selected commands can include graphics commands and other commands amenable to parallel execution. These selected commands, that can also include compute processing commands, can be executed substantially independently from CPU 102.
- APD 104 can include its own compute units (not shown), such as, but not limited to, one or more SIMD processing cores.
- SIMD is a pipeline, or programming model, where a kernel is executed concurrently on multiple processing elements each with its own data and a shared program counter. All processing elements execute an identical set of instructions. The use of predication enables work-items to participate or not for each issued command.
- each APD 104compute unit can include one or more scalar and/or vector floating-point units and/or arithmetic and logic units (ALUs).
- the APD compute unit can also include special purpose processing units (not shown), such as inverse-square root units and sine/cosine units.
- the APD compute units are referred to herein collectively as shader core 122.
- SIMD 104 Having one or more SIMDs, in general, makes APD 104 ideally suited for execution of data-parallel tasks such as those that are common in graphics processing.
- a compute kernel is a function containing instructions declared in a program and executed on an APD compute unit. This function is also referred to as a kernel, a shader, a shader program, or a program.
- each compute unit e.g., SIMD processing core
- a work-item is one of a collection of parallel executions of a kernel invoked on a device by a command.
- a work-item can be executed by one or more processing elements as part of a work-group executing on a compute unit.
- a work-item is distinguished from other executions within the collection by its global ID and local ID.
- a subset of work-items in a workgroup that execute simultaneously together on a SIMD can be referred to as a wavefront 136.
- the width of a wavefront is a characteristic of the hardware of the compute unit (e.g., SIMD processing core).
- a workgroup is a collection of related work-items that execute on a single compute unit. The work-items in the group execute the same kernel and share local memory and work-group barriers.
- wavefronts from a workgroup are processed on the same SIMD processing core. Instructions across a wavefront are issued one at a time, and when all work-items follow the same control flow, each work-item executes the same program. Wavefronts can also be referred to as warps, vectors, or threads.
- An execution mask and work-item predication are used to enable divergent control flow within a wavefront, where each individual work-item can actually take a unique code path through the kernel.
- Partially populated wavefronts can be processed when a full set of work-items is not available at wavefront start time.
- shader core 122 can simultaneously execute a predetermined number of wavefronts 136, each wavefront 136 comprising a multiple work-items.
- APD 104 includes its own memory, such as graphics memory 130 (although memory 130 is not limited to graphics only use). Graphics memory 130 provides a local memory for use during computations in APD 104. Individual compute units (not shown) within shader core 122 can have their own local data store (not shown). In one embodiment, APD 104 includes access to local graphics memory 130, as well as access to the memory 106. In another embodiment, APD 104 can include access to dynamic random access memory (DRAM) or other such memories (not shown) attached directly to the APD 104 and separately from memory 106.
- DRAM dynamic random access memory
- APD 104 also includes one or "n" number of command processors (CPs) 124.
- CP 124 controls the processing within APD 104.
- CP 124 also retrieves commands to be executed from command buffers 125 in memory 106 and coordinates the execution of those commands on APD 104.
- CPU 102 inputs commands based on applications 1 1 1 into appropriate command buffers 125.
- an application is the combination of the program parts that will execute on the compute units within the CPU and APD.
- a plurality of command buffers 125 can be maintained with each process scheduled for execution on the APD 104.
- CP 124 can be implemented in hardware, firmware, or software, or a combination thereof.
- CP 124 is implemented as a reduced instruction set computer (RISC) engine with microcode for implementing logic including scheduling logic.
- RISC reduced instruction set computer
- APD 104 also includes one or "n" number of dispatch controllers (DCs) 126.
- DCs dispatch controllers
- the term dispatch refers to a command executed by a dispatch controller that uses the context state to initiate the start of the execution of a kernel for a set of work groups on a set of compute units.
- DC 126 includes logic to initiate workgroups in the shader core 122. In some embodiments, DC 126 can be implemented as part of CP 124.
- System 100 also includes a hardware scheduler (HWS) 128 for selecting a process from a run list 150 for execution on APD 104.
- HWS 128 can select processes from run list 150 using round robin methodology, priority level, or based on other scheduling policies. The priority level, for example, can be dynamically determined.
- HWS 128 can also include functionality to manage the run list 150, for example, by adding new processes and by deleting existing processes from run-list 150.
- the run list management logic of HWS 128 is sometimes referred to as a run list controller (RLC).
- RLC run list controller
- CP 124 begins retrieving and executing commands from the corresponding command buffer 125.
- CP 124 can generate one or more commands to be executed within APD 104, which correspond with commands received from CPU 102.
- CP 124 together with other components, implements a prioritizing and scheduling of commands on APD 104 in a manner that improves or maximizes the utilization of the resources of APD 104 and/or system 100.
- APD 104 can have access to, or may include, an interrupt generator 146.
- Interrupt generator 146 can be configured by APD 104 to interrupt the operating system 108 when interrupt events, such as page faults, are encountered by APD 104.
- APD 104 can rely on interrupt generation logic within IOMMU 1 16 to create the page fault interrupts noted above.
- APD 104 can also include preemption and context switch logic 120 for preempting a process currently running within shader core 122.
- Context switch logic 120 includes functionality to stop the process and save its current state (e.g., shader core 122 state, and CP 124 state).
- the term state can include an initial state, an intermediate state, and/or a final state.
- An initial state is a starting point for a machine to process an input data set according to a programming order to create an output set of data.
- There is an intermediate state for example, that needs to be stored at several points to enable the processing to make forward progress. This intermediate state is sometimes stored to allow a continuation of execution at a later time when interrupted by some other process.
- Preemption and context switch logic 120 can also include logic to context switch another process into the APD 104.
- the functionality to context switch another process into running on the APD 104 may include instantiating the process, for example, through the CP 124 and DC 126 to run on APD 104, restoring any previously saved state for that process, and starting its execution.
- Memory 106 can include non-persistent memory such as DRAM (not shown).
- Memory 106 can store, e.g., processing logic instructions, constant values, and variable values during execution of portions of applications or other processing logic.
- parts of control logic to perform one or more operations on CPU 102 can reside within memory 106 during execution of the respective portions of the operation by CPU 102.
- Control logic commands fundamental to operating system 108 will generally reside in memory 106 during execution.
- Other software commands, including, for example, KMD 110 and software scheduler 112 can also reside in memory 106 during execution of system 100.
- memory 106 includes command buffers 125 that are used by CPU
- Memory 106 also contains process lists and process information (e.g., active list 152 and process control blocks 154). These lists, as well as the information, are used by scheduling software executing on CPU 102 to communicate scheduling information to APD 104 and/or related scheduling hardware. Access to memory 106 can be managed by a memory controller 140, which is coupled to memory 106. For example, requests from CPU 102, or from other devices, for reading from or for writing to memory 106 are managed by the memory controller 140.
- IOMMU 116 is a multi-context memory management unit.
- context can be considered the environment within which the kernels execute and the domain in which synchronization and memory management is defined.
- the context includes a set of devices, the memory accessible to those devices, the corresponding memory properties and one or more command-queues used to schedule execution of a kemel(s) or operations on memory objects.
- IOMMU 116 includes logic to perform virtual to physical address translation for memory page access for devices including APD 104.
- IOMMU 1 16 may also include logic to generate interrupts, for example, when a page access by a device such as APD 104 results in a page fault.
- IOMMU 1 16 may also include, or have access to, a translation lookaside buffer (TLB) 1 18.
- TLB 1 18, as an example, can be implemented in a content addressable memory (CAM) to accelerate translation of logical (i.e., virtual) memory addresses to physical memory addresses for requests made by APD 104 for data in memory 106.
- CAM content addressable memory
- communication infrastructure 109 interconnects the components of system 100 as needed.
- Communication infrastructure 109 can include (not shown) one or more of a peripheral component interconnect (PCI) bus, extended PCI (PCI-E) bus, advanced microcontroller bus architecture (AMBA) bus, advanced graphics port (AGP), or other such communication infrastructure.
- Communications infrastructure 109 can also include an Ethernet, or similar network, or any suitable physical communications infrastructure that satisfies an application's data transfer rate requirements.
- Communication infrastructure 109 includes the functionality to interconnect components including components of computing system 100.
- operating system 108 includes functionality to manage the hardware components of system 100 and to provide common services.
- operating system 108 can execute on CPU 102 and provide common services. These common services can include, for example, scheduling applications for execution within CPU 102, fault management, interrupt service, as well as processing the input and output of other applications.
- operating system 108 based on interrupts generated by an interrupt controller, such as interrupt controller 148, invokes an appropriate interrupt handling routine. For example, upon detecting a page fault interrupt, operating system 108 may invoke an interrupt handler to initiate loading of the relevant page into memory 106 and to update corresponding page tables.
- Operating system 108 may also include functionality to protect system 100 by ensuring that access to hardware components is mediated through operating system managed kernel functionality. In effect, operating system 108 ensures that applications, such as applications 111, run on CPU 102 in user space. Operating system 108 also ensures that applications 1 1 1 invoke kernel functionality provided by the operating system to access hardware and/or input/output functionality.
- applications 1 11 include various programs or commands to perform user computations that are also executed on CPU 102.
- CPU 102 can seamlessly send selected commands for processing on the APD 104.
- KMD 110 implements an application program interface (API) through which CPU 102, or applications executing on CPU 102 or other logic, can invoke APD 104 functionality.
- API application program interface
- KMD 1 10 can enqueue commands from CPU 102 to command buffers 125 from which APD 104 will subsequently retrieve the commands.
- KMD 1 10 can, together with SWS 112, perform scheduling of processes to be executed on APD 104.
- SWS 112 for example, can include logic to maintain a prioritized list of processes to be executed on the APD.
- KMD 110 can entirely bypass KMD 110 when enqueuing commands.
- SWS 1 12 maintains an active list 152 in memory 106 of processes to be executed on APD 104. SWS 1 12 also selects a subset of the processes in active list 152 to be managed by HWS 128 in the hardware. Information relevant for running each process on APD 104 is communicated from CPU 102 to APD 104 through process control blocks (PCB) 154.
- PCB process control blocks
- Processing logic for applications, operating system, and system software can include commands specified in a programming language such as C and/or in a hardware description language such as Verilog, RTL, or netlists, to enable ultimately configuring a manufacturing process through the generation of maskworks/photomasks to generate a hardware device embodying aspects of the embodiments described herein.
- computing system 100 can include more or fewer components than shown in FIG. 1A.
- computing system 100 can include one or more input interfaces, nonvolatile storage, one or more output interfaces, network interfaces, and one or more displays or display interfaces.
- FIG. IB is an embodiment showing a more detailed illustration of APD 104 shown in FIG. 1A.
- CP 124 can include CP pipelines 124a, 124b, and 124c.
- CP 124 can be configured to process the command lists that are provided as inputs from command buffers 125, shown in FIG. 1A.
- CP input 0 (124a) is responsible for driving commands into a graphics pipeline 162.
- CP inputs 1 and 2 (124b and 124c) forward commands to a compute pipeline 160.
- controller mechanism 166 for controlling operation of HWS 128.
- graphics pipeline 162 can include a set of blocks, referred to herein as ordered pipeline 164.
- ordered pipeline 164 includes a vertex group translator (VGT) 164a, a primitive assembler (PA) 164b, a scan converter (SC) 164c, and a shader-export, render-back unit (SX/RB) 176.
- VCT vertex group translator
- PA primitive assembler
- SC scan converter
- SX/RB shader-export, render-back unit
- Each block within ordered pipeline 164 may represent a different stage of graphics processing within graphics pipeline 162.
- Ordered pipeline 164 can be a fixed function hardware pipeline. Other implementations can be used that would also be within the spirit and scope of the present invention.
- Graphics pipeline 162 also includes DC 166 for counting through ranges within work-item groups received from CP pipeline 124a. Compute work submitted through DC 166 is semi-synchronous with graphics pipeline 162.
- Compute pipeline 160 includes shader DCs 168 and 170. Each of the DCs 168 and 170 is configured to count through compute ranges within work groups received from CP pipelines 124b and 124c. [0087] The DCs 166, 168, and 170, illustrated in FIG. IB, receive the input ranges, break the ranges down into workgroups, and then forward the workgroups to shader core 122.
- graphics pipeline 162 is generally a fixed function pipeline, it is difficult to save and restore its state, and as a result, the graphics pipeline 162 is difficult to context switch. Therefore, in most cases context switching, as discussed herein, does not pertain to context switching among graphics processes. An exception is for graphics work in shader core 122, which can be context switched.
- Shader core 122 can be shared by graphics pipeline 162 and compute pipeline
- Shader core 122 can be a general processor configured to run wavefronts. In one example, all work within compute pipeline 160 is processed within shader core 122. Shader core 122 runs programmable software code and includes various forms of data, such as state data.
- FIG. 2 is a block diagram showing greater detail of APD 104 illustrated in FIG.
- APD 104 includes a shader resource arbiter 204 to arbitrate access to shader core 122.
- shader resource arbiter 204 is external to shader core 122. In another embodiment, however, shader resource arbiter 204 can be external to shader core 122. In a further embodiment, shader resource arbiter 204 can be included in graphics pipeline 162. Shader resource arbiter 204 can be configured to communicate with compute pipeline 160, graphics pipeline 162, or shader core 122.
- Shader resource arbiter 204 can be implemented using hardware, software, firmware, or any combination thereof.
- shader resource arbiter 204 can be implemented as programmable hardware.
- compute pipeline 160 includes DCs 168 and 170, as illustrated in FIG. IB.
- the thread groups are broken down into wavefronts including a predetermined number of work-items.
- Each wavefront may include, for example, a shader program.
- the shader program is typically associated with a set of context state data.
- the shader program is forwarded to shader core 122 for shader core program execution.
- CP 124 of APD 104 controls the execution or processing of a command buffer (or corresponding set of instructions) on the APD.
- the CP 124 dispatches respective groups of one or more instructions for processing on the shader core 122.
- the shader core may execute a compute kernal of respective groups of one or more instructions as workgroups.
- each invocation of a shader program on a work-item has access to a number of general purpose registers (GPRs) (not shown), which are dynamically allocated in shader core 122 before running the program.
- GPRs general purpose registers
- shader resource arbiter 204 allocates the necessary GPRs.
- Shader core 122 is notified that a new workgroup is ready for execution and runs the shader core program on the wavefront.
- APD 104 includes compute units, such as one or more
- shader core 122 includes SIMDs 206A-206N for executing a respective instantiation of a particular work group or to process incoming data.
- SIMDs 206A-206N are respectively coupled to local data stores (LDSs) 208A- 208N.
- LDSs 208A-208N to provide a private memory region accessible only by their respective SIMDs and is private to a work group.
- LDSs 208A-208N store the shader program context state data.
- FIG. 3 is a flow chart 300 of an exemplary method of practicing an embodiment of the disclosed invention.
- a trap routine is executed to save one or more context states related to a first set of instructions within a shader core, such as shader core 122.
- the executing is responsive to an instruction to preempt processing of the first set of instructions.
- a second set of instructions is processed upon completion of the preemption of the first set of instructions.
- processing of the first set of instructions resumes upon completion of the processing of the second set of instructions.
- FIG. 3 includes an illustration of the processing of two sets of instructions, embodiments of the present invention are not limited to switching between two sets of instructions. Additionally, a given compute process need not be resumed, as in the case of a rogue process or a process discontinued by the operating system or discontinued by a user.
- the context state of the non-shader resources such as command processor 124, shader resource arbiter 204 and DCs 168, 170 also must be saved during a context switch operation.
- CP 124 when the RLC 150 instructs CP 124 to stop processing commands (operation 404), CP 124 saves its own context state data, such as pointers, as well as the context state of other non-shader resources. This save process can be performed by the CP 124 executing an interrupt routine, such as a trap routine (operation 406).
- an interrupt routine such as a trap routine
- RLC 150 can signal CP 124 to begin the process of restoring its own context state from memory, as well as the context states of shader resource arbiter 204 and DCs 168, 170. After successful completion of the restore operation, CP 124 resumes fetching and processing of new commands of the restored first program.
- DCs 168, 170 to suspend processing, upon receipt of a preemption command, the DCs continue launching wavefronts for the existing process until completed. All the wavefronts are saved via the trap routine. The DCs would not need to be saved/restored allowing processing of additional wavefronts.
- a disruption in the QoS occurs when all work-items are unable to access APD resources.
- Embodiments of the present invention facilitate efficiently and simultaneously launching two or more tasks to resources within APD 104, enabling all work-items to access various APD resources.
- an APD input scheme enables all work-items to have access to the APD's resources in parallel by managing the APD's workload. When the APD's workload approaches maximum levels, (e.g., during attainment of maximum I/O rates), this APD input scheme assists in that otherwise unused processing resources can be simultaneously utilized in many scenarios.
- a serial input stream for example, can be abstracted to appear as parallel simultaneous inputs to the APD.
- each of the CPs 124 can have one or more tasks to submit as inputs to other resources within APD 104, where each task can represent multiple waveffonts. After a first task is submitted as an input, this task may be allowed to ramp up, over a period of time, to utilize all the APD resources necessary for completion of the task. By itself, this first task may or may not reach a maximum APD utilization threshold. However, as other tasks are enqueued and are waiting to be processed within the APD 104, allocation of the APD resources can be managed to ensure that all of the tasks can simultaneously use the APD 104, each achieving a percentage of the APD's maximum utilization. This simultaneous use of the APD 104 by multiple tasks, and their combined utilization percentages, ensures that a predetermined maximum APD utilization threshold is achieved.
- APD 104 includes compute units, such as one or more
- shader core 122 includes SIMDs 206A-206N for executing a respective instantiation of a particular work group or to process incoming data.
- SIMDs 206A-206N are respectively coupled to local data stores (LDSs) 208A- 208N.
- LDSs 208A-208N provide a private memory region accessible only by their respective SIMDs and is private to a work group.
- LDSs 208A-208N store the shader program context state data.
- Fig. 5 is a flowchart depicting an exemplary method 500, according to an embodiment of the present invention.
- system 100 in Figs. 1A and IB, as described above, will be used to describe method 500, but is not intended to be limited thereto.
- method 500 can be used for allowing the APD to detect a fault associated with a wavefront and to replace the faulted wavefront with another wavefront that is ready to be executed The method 500 may not occur in the order shown, or require all the operations.
- the APD detects a fault in a memory.
- the detected fault can be a page fault, a memory exception or a translation look-aside buffer (TLB) miss.
- the page fault or memory exception can occur when a request for data is not in system memory.
- the TLB miss can occur if the TLB does not have an entry corresponding to a virtual address.
- the graphics memory can be a separate memory within the APD or the on-chip memory of a device, such as the SIMD.
- the first wavefront is removed from of the shader core and stored in memory queues of the SIMD upon receiving the not acknowledged response.
- the APD tracks the number of wavefronts that receive data that is not acknowledged (e.g., XNACK). If a predetermined number of a wavefronts are not acknowledged a context switching request is initiated.
- the IOMMU receives a request from the APD for a translation, the IOMMU accesses a TLB with the request for data.
- the TLB can be implemented in the IOMMU, the APD, or separately. If the TLB does not have an entry corresponding to the virtual address when accessed, then a TLB miss occurs.
- the APD sends a translation request that is associated with a first wavefront to a translation mechanism.
- the translation mechanism is a memory management unit MMU.
- the memory management unit can be IOMMU communicatively coupled to the APD.
- the IOMMU can include functionality to translate between the virtual memory address space, as seen by the APD, and the system memory physical address space.
- the IOMMU receives the translation request associated with the first wavefront from the APD.
- the IOMMU performs the translation of the requested data from the APD virtual address space to the physical address space.
- the IOMMU performs the translation of the requested data from the APD virtual address space to the physical address space.
- IOMMU attempts to retrieve the data from a memory, such as system memory 106 in
- the APD stores the first wavefront to a memory when the
- IOMMU sends a not acknowledged response, e.g., XNACK.
- the APD replaces the first wavefront with a second wavefront ready to be executed.
- the second wavefront is placed onto the shader core and executed.
- the first wavefront is periodically resumed as a new request to determine if a fault still exists.
- Fig. 6 is a flowchart depicting an exemplary method 600, according to an embodiment.
- system 100 in Figs. 1A and IB, as described above, will be used to describe method 600, but is not intended to be limited thereto.
- method 600 can be used for resuming a wavefront on an APD.
- the method 600 may not occur in the order shown, or require all the operations.
- the APD receives a command to restore a wavefront.
- the wavefront has a plurality of threads that perform a plurality of operations within the APD.
- a CP of the APD is in communication with a scheduler.
- the scheduler has access to a run-list (RL) of processes that are scheduled to run within the APD.
- the CP receives the command to restore the wavefront from the scheduler.
- RL run-list
- the command processor reads a list of context states for the wavefront from a memory.
- the memory can be a graphics memory, a system memory, or an on-chip device memory.
- the CP uses the context states that were read from the memory to create an empty shell wavefront that is used for restoring the saved wavefront.
- the empty shell wavefront launches a trap routine used to restore the wavefront.
- the trap routine could have been initially executed by the wavefront if an interference with a process was caused by a context switch.
- the wavefront of an interrupted task saves a resume instruction pointer that is used during the re-executing of the trap routine. This resume instruction pointer becomes part of the context state of the wavefront and is saved to memory.
- the empty shell wavefront re-executes the trap routine, which launches the appropriate resources for the wavefront to be restored based on the list of context states of the wavefront within the memory.
- the appropriate resources can include the architectural states of the wavefront, the size of the wavefront structure, and/or bit vectors that include the status of which threads of the wavefront were acknowledged and which threads were not acknowledged.
- a portion of not acknowledged data is masked over a portion of acknowledged data that was within the restored wavefront.
- the wavefront uses bit vectors to store the results of threads that have been acknowledged and not acknowledged. These results become part of the wavefront context state.
- Fig. 7 is a flowchart depicting an exemplary method 700, according to an embodiment.
- system 100 in Figures 1A and IB, as described above, will be used to describe method 700, but is not intended to be limited thereto.
- method 700 can be used for tracking acknowledgement data within a wavefront on an APD. The method 700 may not occur in the order shown, or require all the operations.
- the acknowledged (XAC ) threads receive an XACK signal bit
- XACK 1
- XNACK 0
- only the XNACK signal bits are used to create a masked wavefront.
- the masked XNACK signal bits become a first instruction during re-execution of the masked wavefront.
- the command processor sends the masked wavefronts to a DC.
- the DC can include logic that initiates threads of the wavefront in the shader core.
- the DC receives the masked wavefront and then dispatches the threads of the masked wavefront to the shader core for re-execution.
- Fig. 8 is a flowchart depicting an exemplary method 800, according to an embodiment.
- system 100 in Figs. 1A and IB, as described above, will be used to describe method 800, but is not intended to be limited thereto.
- method 800 can be used for tracking the performance of threads of the wavefront on an APD, The method 800 may not occur in the order shown, or require all the operations.
- the shader core receives a request to re-execute the masked wavefront from the DC.
- the masked wavefront is re-executed and a record of which threads of the operation were acknowledged and which threads were not acknowledged is maintained by the wavefront.
- operation 808b the results are again stored within the context state of the wavefront once the updates have been made.
- operation 810 a determination is made to retry all threads of the masked wavefront that were designated as not acknowledged threads. If the determination is positive, method 800 returns to operation 802 and is repeated periodically until all of the threads of the wavefront of the operation are acknowledged. If the determination is negative, the APD executes to the next scheduled wavefront.
- Fig. 9 illustrates structures 900 associated with a wavefront, according to an embodiment.
- Wavefront structures 900 includes wavefronts 902, 904, and 906.
- the wavefront structures 900 can be implemented in APD 104 on system 100 in Fig. 1A.
- an empty shell wavefront 902 is a structure that is set up by a CP using context states read from a memory.
- the memory can be a graphics memory, a system memory, or an on-chip device memory.
- the CP uses information stored in a context state list associated with the wavefront to form the architectural structure of the wavefront that will accommodate a restored wavefront.
- the information that is stored in the context state of the wavefront can include the architectural states of the wavefront, the size of the wavefront structure, and/or bit vectors that includes the status of which threads of the wavefront were acknowledged and which threads were not acknowledged.
- a restored wavefront 904 is formed when the empty shell wavefront launches a trap routine.
- the context states of the restored wavefront 904 are populated into the empty shell wavefront.
- the restored wavefront 904 maintains the results of the threads that have been previously acknowledged and previously not acknowledged by using bit vectors. For example, threads 1 through 4 of the restored wavefront 904 receive a 1 bit vector indicating that those threads have been acknowledged. Threads 5 through N of the restored wavefront 904 receives a 0 bit vector indicating that that those threads have not been acknowledged.
- a masked wavefront 906 is formed when a mask is created by using only the not acknowledged bit vectors.
- a history is maintained of all threads of the wavefront.
- the not acknowledged bit vectors are used to create a mask.
- threads 5 through N of restored wavefront 904 are used to create a mask.
- the mask is then placed over the acknowledged bits of the restored wavefront 904 to create the masked wavefront 906.
- the masked bits become the first instructions of the masked wavefront 906 during re-execution.
- a masked wavefront 906 is formed when a mask is created by using only the not acknowledged signal bit.
- a wavefront maintains a history of all thread operations.
- the not acknowledged bit vectors are used to create a mask.
- threads 5 through N of restored wavefront 904 are used to create a mask.
- the mask of not acknowledged bits is then placed over the acknowledged bits of the restored wavefront 904 to create the masked wavefront 906.
- the masked bits become the first instructions of the masked wavefront 906 during re-execution.
- FIG. 10 is an illustration of an example computer system 1000 in which embodiments of the present invention, or portions thereof, can be implemented as computer-readable code.
- the methods illustrated in the present disclosure can be implemented in system 1000.
- Various embodiments of the present invention are described in terms of this example computer system 1000. After reading this description, it will become apparent to a person skilled in the relevant art how to implement embodiments of the present invention using other computer systems and/or computer architectures.
- simulation, synthesis and/or manufacture of various embodiments of this invention may be accomplished, in part, through the use of computer readable code, including general programming languages (such as C or C++), hardware description languages (HDL) such as, for example, Verilog HDL, VHDL, Altera HDL (AHBL), or other available programming and/or schematic capture tools (such as circuit capture tools).
- This computer readable code can be disposed in any known computer- usable medium including a semiconductor, magnetic disk, optical disk (such as CD- ROM, DVD-ROM). As such, the code can be transmitted over communication networks including the Internet.
- Computer system 1000 includes one or more processors, such as processor 1004.
- Processor 1004 may be a special purpose or a general-purpose processo such as, for example, API) 104 or CPU 102 of Figure 1, respectively.
- Processor 1004 is connected to a communication infrastructure 1006 (e.g., a bus or network).
- Computer system 1000 also includes a main memory 1008, preferably random access memory (RAM), and may also include a secondary memory 1010.
- Secondary memory 1010 can include, for example, a hard disk drive 1012, a removable storage drive 1014, and/or a memory stick.
- Removable storage drive 1014 can include a floppy disk drive, a magnetic tape drive, an optical disk drive, a flash memory, or the like.
- the removable storage drive 1014 reads from and/or writes to a removable storage unit 1018 in a well-known manner.
- Removable storage unit 1018 can comprise a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 1014.
- removable storage unit 1018 includes a computer-usable storage medium having stored therein computer software and/or data.
- secondary memory 1010 can include other similar devices for allowing computer programs or other instructions to be loaded into computer system 1000.
- Such devices can include, for example, a removable storage unit 1022 and an interface 1020.
- Examples of such devices can include a program cartridge and cartridge interface (such as those found in video game devices), a removable memory chip (e.g., EPROM or PROM) and associated socket, and other removable storage units 1022 and interfaces 1020 which allow software and data to be transferred from the removable storage unit 1022 to computer system 1000.
- Computer system 1000 can also include a communications interface 1024,
- Communications interface 1024 allows software and data to be transferred between computer system 1000 and external devices.
- Communications interface 1024 can include a modem, a network interface (such as an Ethernet card), a communications port, a PCMCIA slot and card, or the like.
- Software and data transferred via communications interface 1024 are in the form of signals which may be electronic, electromagnetic, optical, or other signals capable of being received by communications interface 1024. These signals are provided to communications interface 1024 via a communications path 1026.
- Communications path 1026 carries signals and can be implemented using wire or cable, fiber optics, a phone line, a cellular phone link, a RP link or other communications channels.
- computer program medium and “computer-usable medium” are used to generally refer to media such as removable storage unit 1018, removable storage unit 1022, and a hard disk installed in hard disk drive 1012.
- Computer program medium and computer-usable medium can also refer to memories, such as main memory 1008 and secondary memory 1010, which can be memory semiconductors (e.g., DRAMs, etc.). These computer program products provide software to computer system 1000.
- Computer programs are stored in main memory 1008 and/or secondary memory 1010. Computer programs may also be received via communications interface 1024. Such computer programs, when executed, enable computer system 1000 to implement embodiments of the present invention as discussed herein. In particular, the computer programs, when executed, enable processor 1004 to implement processes of embodiments of the present invention, such as the steps in the methods illustrated by the flowcharts of the figures discussed above. Accordingly, such computer programs represent controllers of the computer system 1000. Where embodiments of the present invention are implemented using software, the software can be stored in a computer program product and loaded into computer system 1000 using removable storage drive 1014, interface 1020, hard drive 1012, or communications interface 1024.
- Embodiments of the present invention are also directed to computer program products including software stored on any computer-usable medium. Such software, when executed in one or more data processing device, causes a data processing device(s) to operate as described herein. Embodiments of the present invention employ any computer-usable or -readable medium, known now or in the future.
- Examples of computer-usable mediums include, but are not limited to, primary storage devices (e.g., any type of random access memory), secondary storage devices (e.g., hard drives, floppy disks, CD ROMS, ZIP disks, tapes, magnetic storage devices, optical storage devices, MEMS, nanotechnological storage devices, etc.), and communication mediums (e.g., wired and wireless communications networks, local area networks, wide area networks, intranets, etc.).
- primary storage devices e.g., any type of random access memory
- secondary storage devices e.g., hard drives, floppy disks, CD ROMS, ZIP disks, tapes, magnetic storage devices, optical storage devices, MEMS, nanotechnological storage devices, etc.
- communication mediums e.g., wired and wireless communications networks, local area networks, wide area networks, intranets, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Image Processing (AREA)
Abstract
Provided is a method for processing a command in a computing system including an accelerated processing device (APD) having a command processor. The method includes executing an interrupt routine to save one or more contexts related to a first set of instructions on a shader core in response to an instruction to preempt processing of the first set of instructions. Provided is also a method that resumes an accelerated processing device (APD) wavefront in which a subset of elements have faulted. A restore command for a job including a wavefront is received. A list of context states for the wavefront is read from a memory associated with a APD. An empty shell wavefront is created for restoring the list of context states. A portion of not acknowledged data is masked over a portion of acknowledged data within the restored wavefronts.
Description
SAVING AND RESTORING SHADER CONTEXT STATE AND RESUMING
A FAULTED APD WAVEFRONT
BACKGROUND
Field
[0001] Embodiments of the present invention are generally directed to computer systems.
More specifically, embodiments of the present invention are directed to saving and restoring the context state data during a context switching operation, and resuming an accelerated processing device wavefront in which a subset of elements have faulted within the computing system.
Background
[0002] The desire to use a graphics processing unit (GPU) for general computation has become much more pronounced recently due to the GPU's exemplary performance per unit power and/or cost. The computational capabilities for GPUs, generally, have grown at a rate exceeding that of the corresponding central processing unit (CPU) platforms. This growth, coupled with the explosion of the mobile computing market (e.g., notebooks, mobile smart phones, tablets, etc.) and its necessary supporting server/enterprise systems, has been used to provide a specified quality of desired user experience. Consequently, the combined use of CPUs and GPUs for executing workloads with data parallel content is becoming a volume technology.
[0003] However, GPUs have traditionally operated in a constrained programming environment, available primarily for the acceleration of graphics. These constraints arose from the fact that GPUs did not have as rich a programming ecosystem as CPUs. Their use, therefore, has been mostly limited to two dimensional (2D) and three dimensional (3D) graphics and a few leading edge multimedia applications, which are already accustomed to dealing with graphics and video application programming interfaces (APIs).
[0004] With the advent of multi-vendor supported OpenCL® and DirectCompute®, standard APIs and supporting tools, the limitations of the GPUs in traditional applications has been extended beyond traditional graphics. Although OpenCL and DirectCompute are a promising start, there are many hurdles remaining to creating an environment and
ecosystem that allows the combination of a CPU and a GPU to be used as fluidly as the CPU for most programming tasks.
[0005] Existing computing systems often include multiple processing devices. For example, some computing systems include both a CPU and a GPU on separate chips (e.g., the CPU might be located on a motherboard and the GPU might be located on a graphics card) or in a single chip package. Both of these arrangements, however, still include significant challenges associated with (i) separate memory systems, (ii) efficient scheduling, (iii) programming model, (iv) compiling to multiple target instruction set architectures, and (v) providing quality of service (QoS) guarantees between processes, (ISAs)— all while minimizing power consumption.
[0006] For example, since processes cannot be efficiently identified and/or preempted in existing computing systems, a rogue process can occupy the GPU hardware for arbitrary amounts of time. This diminishes the user's QoS.
[0007] In other eases, the ability to context switch off of the hardware is severely constrained - occurring at very coarse granularity and only at a very limited set of points in a program's execution. This constraint exists because saving the necessary architectural and microarchitectural states for restoring and resuming a process is not supported. Lack of support for precise exceptions prevents a faulted job from being context switched out and restored at a later point, resulting in lower hardware usage as the faulted threads occupy hardware resources and which sit idle during fault handling.
[0008] GPU hardware can include a shader core, as well as non-shader resource components. The shader core includes an array of single instruction multiple data devices (SIMDs). Because SIMDs process multiple instructions simultaneously, the shader core context state can encompass up to several megabytes of data spread over registers and local data memory.
[0009] During operation, an external processor, reading and writing the shader core context state (which is required when saving and restoring GPU context state) can be severely limited by the external processor's own read/write capabilities. It can also be limited by the bandwidth between the external processor and the GPU. These two limitations can result in extremely long context switching times. This problem also exists for the other non-shader resource components associated with the GPU context state save and restore process.
[0010] Another challenge associated with systems including multiple processing devices, for example, is that a discrete chip arrangement forces system and software architects to utilize chip to chip interfaces for each processor to access memory. While these external interfaces (e.g., chip to chip) negatively affect memory latency and power consumption for cooperating heterogeneous processors, the separate memory systems (i.e., separate address spaces) and driver managed shared memory create overhead that becomes unacceptable for fine grain offload.
[Θ011] Both the discrete and single chip arrangements can limit the types of commands that can be sent to the GPU for execution. By way of example, computational commands (e.g., physics or artificial intelligence commands) often cannot be sent to the GPU for execution. This limitation exists because the CPU may relatively quickly require the results of the operations performed by these computational commands. However, because of the high overhead of dispatching work to the GPU in current systems and the fact that these commands may have to wait in line for other previously-issued commands to be executed first, the latency incurred by sending computational commands to the GPU is often unacceptable.
[0012 j Given that a conventional GPU may not efficiently execute some computational commands, the commands must then be executed within the CPU. Having to execute the commands on the CPU increases the processing burden on the CPU and can hamper overall system performance.
[0013] Although conventional GPUs provide excellent opportunities for computational offloading, such GPUs may not be suitable for system-software-driven process management that is desired for efficient operation in some multi-processor environments. These limitations can create several problems.
[0014] For example, since processes cannot be efficiently identified and/or preempted, a rogue process can occupy the GPU hardware for arbitrary amounts of time. In other cases, the ability to context switch off the hardware is severely constrained - occurring at very coarse granularity and only at a very limited set of points in a program's execution. This constraint exists because saving the necessary architectural and microarchitectural states for restoring and resuming a process is not supported. Lack of support for precise exceptions prevents a faulted job from being context switched out and restored at a later
point, resulting in lower hardware usage as the faulted threads occupy hardware resources and sit idle during fault handling.
[0015] Tasks being executed within a GPU have graphics wavefronts that have a plurality of thread operations being processed. Often a subset of threads in a wavefront may have a number of operations that have not yet been acknowledged when a context switch is requested. Therefore, when execution of the wavefront resumes, all threads, including those previously acknowledged, must be retried. Such retying all of the threads in the wavefront causes an increased latency for the GPU resources.
SUMMARY
[0016] What are needed, therefore, are methods and systems that enable efficient GPU context state save and restore operations during GPU context switching applications.
[0017] Embodiments of the present invention, in certain circumstances, provide efficient
GPU context switch operations for enhancing overall system operational speed. An embodiment of the present invention, in certain circumstances, also enables the offloading of applications from the CPU and so that the offloaded applications can be ran on the GPU.
[0018] One embodiment of the present invention provides a system including a shader core configured to process a first set of instructions and a command processor configured for interrupting processing of the first set of instructions. The shader core is configured to save a context state associated with the first set of instructions after the interrupting, and process a second set of instructions after the context state has been saved.
[0019] Another embodiment provides a method including processing, by a shader core, a first set of instructions received from a command processor and interrupting processing of the first set of instructions via the command processor. The method also includes saving, by the shader core, a context state associated with the first set of instructions after the interrupting and processing a second set of instructions after the context state has been saved.
[0020] Additionally, what are needed are methods and systems for resuming a wavefront in a graphics processing unit in which only a subset of faulted elements are retried.
[0021] Embodiments of the present invention, in certain circumstances, provide a method including, responsive to a command to restore a partially completed wavefront, restoring
resources for the partially completed wavefront masking a portion of said restored partially completed wavefront.
[0022] Although GPUs, accelerated processing units (APUs), and general purpose use of the graphics processing unit (GPGPU) are commonly used terms in this field, the expression "accelerated processing device (APD)" is considered to be a broader expression. For example, APD refers to any cooperating collection of hardware and/or software that performs those functions and computations associated with accelerating graphics processing tasks, data parallel tasks, or nested data parallel tasks in an accelerated manner compared to conventional CPUs, conventional GPUs, software and/or combinations thereof.
[0023] Additional features and advantages of the embodiments described herein, as well as the structure and operation of various embodiments of the invention, are described in detail below with reference to the accompanying drawings. It is noted that the invention is not limited to the specific embodiments described herein. Such embodiments are presented herein for illustrative purposes only. Additional embodiments will be apparent to persons skilled in the relevant art(s) based on the teachings contained herein.
BRIEF DESCRIPTION OF THE DRAWINGS/FIGURES
0024] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments of the present invention and, together with the description, further serve to explain the principles of embodiments of the present invention and to enable a person skilled in the pertinent art to make and use the invention. Various embodiments of the present invention are described below with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout.
[0025] Fig. 1 A is an illustrative block diagram of a processing system in accordance with embodiments of the present invention;
[0026] Fig. IB is an illustrative block diagram of the APD illustrated in FIG. 1A;
[0027] Fig. 2 is a more detailed block diagram of the APD illustrated in FIG 1 B;
[0028] Fig. 3 is a flowchart of an exemplary method of practicing an embodiment of the present invention; and
[1)029] Fig. 4 is flowchart of exemplary method of practicing another embodiment of the present invention.
[0030] Fig. 5 is a flowchart illustrating a method for tolerating a virtual to physical address translation failure on an APD, according to an embodiment of the present invention.
[0031J Fig. 6 is a flowchart illustrating a method for resuming a wavefront on an APD, according to an embodiment of the present invention.
[0032] Fig. 7 is a flowchart illustrating a method for tracking acknowledgement data within a wavefront on an APD, according to an embodiment of the present invention.
[0033] Fig. 8 is a flowchart illustrating a method for tracking the performance of threads of the wavefront on an APD, according to an embodiment of the present invention.
[0034] Fig. 9 is an illustrative block diagram illustration of wavefront structures.
[0035] Fig. 10 is an illustration of an example computer system in which embodiments of the present invention, or portions thereof, can be implemented as computer readable code.
DETAILED DESCRIPTION
[0036] In the detailed description that follows, references to "one embodiment," "an embodiment," "an example embodiment," etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
[0037] The term "embodiments of the invention" does not require that all embodiments of the invention include the discussed feature, advantage or mode of operation. Alternate embodiments may be devised without departing from the scope of the invention, and well-known elements of embodiments of the present invention may not be described in detail or may be omitted so as not to obscure the relevant details of the embodiments described herein. In addition, the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments described herein. For example, as used herein, the singular forms "a", "an" and "the" are
intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
[0038] FIG. 1 A is an exemplary illustration of a unified computing system 100 including two processors, a CPU 102 and an APD 104. CPU 102 can include one or more single or multi core CPUs. In one embodiment of the present invention, the system 100 is formed on a single silicon die or package, combining CPU 102 and APD 104 to provide a unified programming and execution environment. This environment enables the APD 104 to be used as fluidly as the CPU 102 for some programming tasks. However, it is not an absolute requirement of this embodiment that the CPU 102 and APD 104 be formed on a single silicon die. In some embodiments, it is possible for them to be formed separately and mounted on the same or different substrates.
10039] In one example, system 100 also includes a memory 106, an operating system
108, and a communication infrastructure 109. The operating system 108 and the communication infrastructure 109 are discussed in greater detail below.
[0040] The system 100 also includes a kernel mode driver (KMD) 1 10, a software scheduler (SWS) 112, and a memory management unit 116, such as input/output memory management unit (IOMMU). Components of system 100 can be implemented as hardware, firmware, software, or any combination thereof. A person of ordinary skill in the art will appreciate that system 100 may include one or more software, hardware, and firmware components in addition to, or different from, that shown in the embodiment shown in FIG. 1 A.
[0041] In one example, a driver, such as KMD 110, typically communicates with a device through a computer bus or communications subsystem to which the hardware connects. When a calling program invokes a routine in the driver, the driver issues commands to the device. Once the device sends data back to the driver, the driver may invoke routines in the original calling program. Drivers are hardware-dependent and operating-system- specific. They usually provide the interrupt handling required for any necessary asynchronous time-dependent hardware interface.
[0042] Device drivers, particularly on modern Microsoft Windows® platforms, can run in kernel-mode (Ring 0) or in user-mode (Ring 3). The primary benefit of running a driver in user mode is improved stability, since a poorly written user mode device driver cannot crash the system by overwriting kernel memory. On the other hand, user/kernel- mode transitions usually impose a considerable performance overhead, thereby prohibiting user mode-drivers for low latency and high throughput requirements. Kernel space can be accessed by user module only through the use of system calls. End user programs like the UNIX shell or other GUI based applications are part of the user space. These applications interact with hardware through kernel supported functions.
[0043] CPU 102 can include (not shown) one or more of a control processor, field programmable gate array (FPGA), application specific integrated circuit (ASIC), or digital signal processor (DSP). CPU 102, for example, executes the control logic, including the operating system 108, KMD 110, SWS 112, and applications 111 , that control the operation of computing system 100. In this illustrative embodiment, CPU 102, according to one embodiment, initiates and controls the execution of applications 1 1 1 by, for example, distributing the processing associated with that application across the CPU 102 and other processing resources, such as the APD 104.
[0044] APD 104, among other things, executes commands and programs for selected functions, such as graphics operations and other operations that may be, for example, particularly suited for parallel processing. In general, APD 104 can be frequently used for executing graphics pipeline operations, such as pixel operations, geometric computations, and rendering an image to a display. In various embodiments of the present invention, APD 104 can also execute compute processing operations (e.g., those operations unrelated to graphics such as, for example, video operations, physics simulations, computational fluid dynamics, etc.), based on commands or instructions received from CPU 102.
[0045] For example, commands can be considered as special instructions that are not typically defined in the instruction set architecture (ISA). A command may be executed by a special processor such a dispatch processor, command processor, or network controller. On the other hand, instructions can be considered, for example, a single operation of a processor within a computer architecture. In one example, when using
two sets of ISAs, some instructions are used to execute x86 programs and some instructions are used to execute kernels on an APD compute unit.
[0046] In an illustrative embodiment, CPU 102 transmits selected commands to APD
104. These selected commands can include graphics commands and other commands amenable to parallel execution. These selected commands, that can also include compute processing commands, can be executed substantially independently from CPU 102.
[0047] APD 104 can include its own compute units (not shown), such as, but not limited to, one or more SIMD processing cores. As referred to herein, a SIMD is a pipeline, or programming model, where a kernel is executed concurrently on multiple processing elements each with its own data and a shared program counter. All processing elements execute an identical set of instructions. The use of predication enables work-items to participate or not for each issued command.
[0048] In one example, each APD 104compute unit can include one or more scalar and/or vector floating-point units and/or arithmetic and logic units (ALUs). The APD compute unit can also include special purpose processing units (not shown), such as inverse-square root units and sine/cosine units. The APD compute units are referred to herein collectively as shader core 122.
[0049] Having one or more SIMDs, in general, makes APD 104 ideally suited for execution of data-parallel tasks such as those that are common in graphics processing.
[0050] Some graphics pipeline operations, such as pixel processing, and other parallel computation operations, can require that the same command stream or compute kernel be performed on streams or collections of input data elements. Respective instantiations of the same compute kernel can be executed concurrently on multiple compute units in shader core 122 in order to process such data elements in parallel. As referred to herein, for example, a compute kernel is a function containing instructions declared in a program and executed on an APD compute unit. This function is also referred to as a kernel, a shader, a shader program, or a program.
[0051] In one illustrative embodiment, each compute unit (e.g., SIMD processing core) can execute a respective instantiation of a particular work-item to process incoming data. A work-item is one of a collection of parallel executions of a kernel invoked on a device by a command. A work-item can be executed by one or more processing elements as part of a work-group executing on a compute unit.
[0052] A work-item is distinguished from other executions within the collection by its global ID and local ID. In one example, a subset of work-items in a workgroup that execute simultaneously together on a SIMD can be referred to as a wavefront 136. The width of a wavefront is a characteristic of the hardware of the compute unit (e.g., SIMD processing core). As referred to herein, a workgroup is a collection of related work-items that execute on a single compute unit. The work-items in the group execute the same kernel and share local memory and work-group barriers.
[0053] In the exemplary embodiment, all wavefronts from a workgroup are processed on the same SIMD processing core. Instructions across a wavefront are issued one at a time, and when all work-items follow the same control flow, each work-item executes the same program. Wavefronts can also be referred to as warps, vectors, or threads.
[0054] An execution mask and work-item predication are used to enable divergent control flow within a wavefront, where each individual work-item can actually take a unique code path through the kernel. Partially populated wavefronts can be processed when a full set of work-items is not available at wavefront start time. For example, shader core 122 can simultaneously execute a predetermined number of wavefronts 136, each wavefront 136 comprising a multiple work-items.
[0055] Within the system 100, APD 104 includes its own memory, such as graphics memory 130 (although memory 130 is not limited to graphics only use). Graphics memory 130 provides a local memory for use during computations in APD 104. Individual compute units (not shown) within shader core 122 can have their own local data store (not shown). In one embodiment, APD 104 includes access to local graphics memory 130, as well as access to the memory 106. In another embodiment, APD 104 can include access to dynamic random access memory (DRAM) or other such memories (not shown) attached directly to the APD 104 and separately from memory 106.
[0056] In the example shown, APD 104 also includes one or "n" number of command processors (CPs) 124. CP 124 controls the processing within APD 104. CP 124 also retrieves commands to be executed from command buffers 125 in memory 106 and coordinates the execution of those commands on APD 104.
[0057] In one example, CPU 102 inputs commands based on applications 1 1 1 into appropriate command buffers 125. As referred to herein, an application is the
combination of the program parts that will execute on the compute units within the CPU and APD.
[0( 58] A plurality of command buffers 125 can be maintained with each process scheduled for execution on the APD 104.
[0059] CP 124 can be implemented in hardware, firmware, or software, or a combination thereof. In one embodiment, CP 124 is implemented as a reduced instruction set computer (RISC) engine with microcode for implementing logic including scheduling logic.
[0060] APD 104 also includes one or "n" number of dispatch controllers (DCs) 126. In the present application, the term dispatch refers to a command executed by a dispatch controller that uses the context state to initiate the start of the execution of a kernel for a set of work groups on a set of compute units. DC 126 includes logic to initiate workgroups in the shader core 122. In some embodiments, DC 126 can be implemented as part of CP 124.
[0061] System 100 also includes a hardware scheduler (HWS) 128 for selecting a process from a run list 150 for execution on APD 104. HWS 128 can select processes from run list 150 using round robin methodology, priority level, or based on other scheduling policies. The priority level, for example, can be dynamically determined. HWS 128 can also include functionality to manage the run list 150, for example, by adding new processes and by deleting existing processes from run-list 150. The run list management logic of HWS 128 is sometimes referred to as a run list controller (RLC).
[0062 J In various embodiments of the present invention, when HWS 128 initiates the execution of a process from RLC 150, CP 124 begins retrieving and executing commands from the corresponding command buffer 125. In some instances, CP 124 can generate one or more commands to be executed within APD 104, which correspond with commands received from CPU 102. In one embodiment, CP 124, together with other components, implements a prioritizing and scheduling of commands on APD 104 in a manner that improves or maximizes the utilization of the resources of APD 104 and/or system 100.
[0063] APD 104 can have access to, or may include, an interrupt generator 146. Interrupt generator 146 can be configured by APD 104 to interrupt the operating system 108 when interrupt events, such as page faults, are encountered by APD 104. For example, APD
104 can rely on interrupt generation logic within IOMMU 1 16 to create the page fault interrupts noted above.
[0Θ64| APD 104 can also include preemption and context switch logic 120 for preempting a process currently running within shader core 122. Context switch logic 120, for example, includes functionality to stop the process and save its current state (e.g., shader core 122 state, and CP 124 state).
[0065] As referred to herein, the term state can include an initial state, an intermediate state, and/or a final state. An initial state is a starting point for a machine to process an input data set according to a programming order to create an output set of data. There is an intermediate state, for example, that needs to be stored at several points to enable the processing to make forward progress. This intermediate state is sometimes stored to allow a continuation of execution at a later time when interrupted by some other process. There is also final state that can be recorded as part of the output data set.
[0066] Preemption and context switch logic 120 can also include logic to context switch another process into the APD 104. The functionality to context switch another process into running on the APD 104 may include instantiating the process, for example, through the CP 124 and DC 126 to run on APD 104, restoring any previously saved state for that process, and starting its execution.
[0067J Memory 106 can include non-persistent memory such as DRAM (not shown).
Memory 106 can store, e.g., processing logic instructions, constant values, and variable values during execution of portions of applications or other processing logic. For example, in one embodiment, parts of control logic to perform one or more operations on CPU 102 can reside within memory 106 during execution of the respective portions of the operation by CPU 102.
[0068] During execution, respective applications, operating system functions, processing logic commands, and system software can reside in memory 106. Control logic commands fundamental to operating system 108 will generally reside in memory 106 during execution. Other software commands, including, for example, KMD 110 and software scheduler 112 can also reside in memory 106 during execution of system 100.
[0069] In this example, memory 106 includes command buffers 125 that are used by CPU
102 to send commands to APD 104. Memory 106 also contains process lists and process information (e.g., active list 152 and process control blocks 154). These lists, as well as
the information, are used by scheduling software executing on CPU 102 to communicate scheduling information to APD 104 and/or related scheduling hardware. Access to memory 106 can be managed by a memory controller 140, which is coupled to memory 106. For example, requests from CPU 102, or from other devices, for reading from or for writing to memory 106 are managed by the memory controller 140.
[0070] Referring back to other aspects of system 100, IOMMU 116 is a multi-context memory management unit.
[0071] As used herein, context can be considered the environment within which the kernels execute and the domain in which synchronization and memory management is defined. The context includes a set of devices, the memory accessible to those devices, the corresponding memory properties and one or more command-queues used to schedule execution of a kemel(s) or operations on memory objects.
[0072] Referring back to the example shown in FIG. 1A, IOMMU 116 includes logic to perform virtual to physical address translation for memory page access for devices including APD 104. IOMMU 1 16 may also include logic to generate interrupts, for example, when a page access by a device such as APD 104 results in a page fault. IOMMU 1 16 may also include, or have access to, a translation lookaside buffer (TLB) 1 18. TLB 1 18, as an example, can be implemented in a content addressable memory (CAM) to accelerate translation of logical (i.e., virtual) memory addresses to physical memory addresses for requests made by APD 104 for data in memory 106.
[0073] In the example shown, communication infrastructure 109 interconnects the components of system 100 as needed. Communication infrastructure 109 can include (not shown) one or more of a peripheral component interconnect (PCI) bus, extended PCI (PCI-E) bus, advanced microcontroller bus architecture (AMBA) bus, advanced graphics port (AGP), or other such communication infrastructure. Communications infrastructure 109 can also include an Ethernet, or similar network, or any suitable physical communications infrastructure that satisfies an application's data transfer rate requirements. Communication infrastructure 109 includes the functionality to interconnect components including components of computing system 100.
[0074] In this example, operating system 108 includes functionality to manage the hardware components of system 100 and to provide common services. In various embodiments, operating system 108 can execute on CPU 102 and provide common
services. These common services can include, for example, scheduling applications for execution within CPU 102, fault management, interrupt service, as well as processing the input and output of other applications.
[0075] In some embodiments, based on interrupts generated by an interrupt controller, such as interrupt controller 148, operating system 108 invokes an appropriate interrupt handling routine. For example, upon detecting a page fault interrupt, operating system 108 may invoke an interrupt handler to initiate loading of the relevant page into memory 106 and to update corresponding page tables.
[0076J Operating system 108 may also include functionality to protect system 100 by ensuring that access to hardware components is mediated through operating system managed kernel functionality. In effect, operating system 108 ensures that applications, such as applications 111, run on CPU 102 in user space. Operating system 108 also ensures that applications 1 1 1 invoke kernel functionality provided by the operating system to access hardware and/or input/output functionality.
[0077] By way of example, applications 1 11 include various programs or commands to perform user computations that are also executed on CPU 102. CPU 102 can seamlessly send selected commands for processing on the APD 104.
0078] In one example, KMD 110 implements an application program interface (API) through which CPU 102, or applications executing on CPU 102 or other logic, can invoke APD 104 functionality. For example, KMD 1 10 can enqueue commands from CPU 102 to command buffers 125 from which APD 104 will subsequently retrieve the commands. Additionally, KMD 1 10 can, together with SWS 112, perform scheduling of processes to be executed on APD 104. SWS 112, for example, can include logic to maintain a prioritized list of processes to be executed on the APD.
[0079] In other embodiments of the present invention, applications executing on CPU
102 can entirely bypass KMD 110 when enqueuing commands.
[0080] In some embodiments, SWS 1 12 maintains an active list 152 in memory 106 of processes to be executed on APD 104. SWS 1 12 also selects a subset of the processes in active list 152 to be managed by HWS 128 in the hardware. Information relevant for running each process on APD 104 is communicated from CPU 102 to APD 104 through process control blocks (PCB) 154.
[0081] Processing logic for applications, operating system, and system software can include commands specified in a programming language such as C and/or in a hardware description language such as Verilog, RTL, or netlists, to enable ultimately configuring a manufacturing process through the generation of maskworks/photomasks to generate a hardware device embodying aspects of the embodiments described herein.
[0082] A person of skill in the art will understand, upon reading this description, that computing system 100 can include more or fewer components than shown in FIG. 1A. For example, computing system 100 can include one or more input interfaces, nonvolatile storage, one or more output interfaces, network interfaces, and one or more displays or display interfaces.
[0083] FIG. IB is an embodiment showing a more detailed illustration of APD 104 shown in FIG. 1A. In FIG. IB, CP 124 can include CP pipelines 124a, 124b, and 124c. CP 124 can be configured to process the command lists that are provided as inputs from command buffers 125, shown in FIG. 1A. In the exemplary operation of FIG. IB, CP input 0 (124a) is responsible for driving commands into a graphics pipeline 162. CP inputs 1 and 2 (124b and 124c) forward commands to a compute pipeline 160. Also provided is a controller mechanism 166 for controlling operation of HWS 128.
[0084] In FIG. IB, graphics pipeline 162 can include a set of blocks, referred to herein as ordered pipeline 164. As an example, ordered pipeline 164 includes a vertex group translator (VGT) 164a, a primitive assembler (PA) 164b, a scan converter (SC) 164c, and a shader-export, render-back unit (SX/RB) 176. Each block within ordered pipeline 164 may represent a different stage of graphics processing within graphics pipeline 162. Ordered pipeline 164 can be a fixed function hardware pipeline. Other implementations can be used that would also be within the spirit and scope of the present invention.
[0085] Although only a small amount of data may be provided as an input to graphics pipeline 162, this data will be amplified by the time it is provided as an output from graphics pipeline 162. Graphics pipeline 162 also includes DC 166 for counting through ranges within work-item groups received from CP pipeline 124a. Compute work submitted through DC 166 is semi-synchronous with graphics pipeline 162.
[0086] Compute pipeline 160 includes shader DCs 168 and 170. Each of the DCs 168 and 170 is configured to count through compute ranges within work groups received from CP pipelines 124b and 124c.
[0087] The DCs 166, 168, and 170, illustrated in FIG. IB, receive the input ranges, break the ranges down into workgroups, and then forward the workgroups to shader core 122.
[0088] Since graphics pipeline 162 is generally a fixed function pipeline, it is difficult to save and restore its state, and as a result, the graphics pipeline 162 is difficult to context switch. Therefore, in most cases context switching, as discussed herein, does not pertain to context switching among graphics processes. An exception is for graphics work in shader core 122, which can be context switched.
[0089] After the processing of work within graphics pipeline 162 has been completed, the completed work is processed through a render back unit 176, which does depth and color calculations, and then writes its final results to memory 130.
[0090] Shader core 122 can be shared by graphics pipeline 162 and compute pipeline
160. Shader core 122 can be a general processor configured to run wavefronts. In one example, all work within compute pipeline 160 is processed within shader core 122. Shader core 122 runs programmable software code and includes various forms of data, such as state data.
Say ing and Re
[0091] FIG. 2 is a block diagram showing greater detail of APD 104 illustrated in FIG
IB. In the illustration of FIG. 2, APD 104 includes a shader resource arbiter 204 to arbitrate access to shader core 122. In FIG. 2, shader resource arbiter 204 is external to shader core 122. In another embodiment, however, shader resource arbiter 204 can be external to shader core 122. In a further embodiment, shader resource arbiter 204 can be included in graphics pipeline 162. Shader resource arbiter 204 can be configured to communicate with compute pipeline 160, graphics pipeline 162, or shader core 122.
[0092] Shader resource arbiter 204 can be implemented using hardware, software, firmware, or any combination thereof. For example, shader resource arbiter 204 can be implemented as programmable hardware.
[0093] As discussed above, compute pipeline 160 includes DCs 168 and 170, as illustrated in FIG. IB. The thread groups are broken down into wavefronts including a predetermined number of work-items. Each wavefront may include, for example, a shader program. The shader program is typically associated with a set of context state data. The shader program is forwarded to shader core 122 for shader core program execution.
[0094] CP 124 of APD 104 controls the execution or processing of a command buffer (or corresponding set of instructions) on the APD. During the execution of a command buffer on APD 104, the CP 124 dispatches respective groups of one or more instructions for processing on the shader core 122. The shader core may execute a compute kernal of respective groups of one or more instructions as workgroups.
[0095] During operation, each invocation of a shader program on a work-item has access to a number of general purpose registers (GPRs) (not shown), which are dynamically allocated in shader core 122 before running the program. When a workgroup is ready to be processed, shader resource arbiter 204 allocates the necessary GPRs. Shader core 122 is notified that a new workgroup is ready for execution and runs the shader core program on the wavefront.
[0096] As referenced in FIG. 1, APD 104 includes compute units, such as one or more
SIMDs. In FIG. 2, for example, shader core 122 includes SIMDs 206A-206N for executing a respective instantiation of a particular work group or to process incoming data. SIMDs 206A-206N are respectively coupled to local data stores (LDSs) 208A- 208N. LDSs 208A-208N to provide a private memory region accessible only by their respective SIMDs and is private to a work group. LDSs 208A-208N store the shader program context state data.
[0097] FIG. 3 is a flow chart 300 of an exemplary method of practicing an embodiment of the disclosed invention. Referring to FIG. 3, at operation 302, a trap routine is executed to save one or more context states related to a first set of instructions within a shader core, such as shader core 122. The executing is responsive to an instruction to preempt processing of the first set of instructions.
[0098] In operation 304, a second set of instructions is processed upon completion of the preemption of the first set of instructions.
[0099] In operation 306, processing of the first set of instructions resumes upon completion of the processing of the second set of instructions. Although FIG. 3 includes an illustration of the processing of two sets of instructions, embodiments of the present invention are not limited to switching between two sets of instructions. Additionally, a given compute process need not be resumed, as in the case of a rogue process or a process discontinued by the operating system or discontinued by a user.
[0100] In another embodiment, as illustrated in FIG. 4, after receiving the preemption command (operation 402), the context state of the non-shader resources such as command processor 124, shader resource arbiter 204 and DCs 168, 170 also must be saved during a context switch operation. According to an embodiment, when the RLC 150 instructs CP 124 to stop processing commands (operation 404), CP 124 saves its own context state data, such as pointers, as well as the context state of other non-shader resources. This save process can be performed by the CP 124 executing an interrupt routine, such as a trap routine (operation 406).
[0101] After performing the context switch of a first program, and when the first program is to be restored to execute, the contents of the non-shader core resources must be restored. RLC 150 can signal CP 124 to begin the process of restoring its own context state from memory, as well as the context states of shader resource arbiter 204 and DCs 168, 170. After successful completion of the restore operation, CP 124 resumes fetching and processing of new commands of the restored first program.
[0102] In an alternative embodiment, instead of CP 124 instructing the compute pipeline
DCs 168, 170 to suspend processing, upon receipt of a preemption command, the DCs continue launching wavefronts for the existing process until completed. All the wavefronts are saved via the trap routine. The DCs would not need to be saved/restored allowing processing of additional wavefronts.
Resuming Faulted APD Wave front
[0103] A disruption in the QoS occurs when all work-items are unable to access APD resources. Embodiments of the present invention facilitate efficiently and simultaneously launching two or more tasks to resources within APD 104, enabling all work-items to access various APD resources. In one embodiment, an APD input scheme enables all work-items to have access to the APD's resources in parallel by managing the APD's workload. When the APD's workload approaches maximum levels, (e.g., during attainment of maximum I/O rates), this APD input scheme assists in that otherwise unused processing resources can be simultaneously utilized in many scenarios. A serial input stream, for example, can be abstracted to appear as parallel simultaneous inputs to the APD.
[0104] By way of example, each of the CPs 124 can have one or more tasks to submit as inputs to other resources within APD 104, where each task can represent multiple
waveffonts. After a first task is submitted as an input, this task may be allowed to ramp up, over a period of time, to utilize all the APD resources necessary for completion of the task. By itself, this first task may or may not reach a maximum APD utilization threshold. However, as other tasks are enqueued and are waiting to be processed within the APD 104, allocation of the APD resources can be managed to ensure that all of the tasks can simultaneously use the APD 104, each achieving a percentage of the APD's maximum utilization. This simultaneous use of the APD 104 by multiple tasks, and their combined utilization percentages, ensures that a predetermined maximum APD utilization threshold is achieved.
[0105] As referenced in FIG. 1 , APD 104 includes compute units, such as one or more
SIMDs. In FIG. 2, for example, shader core 122 includes SIMDs 206A-206N for executing a respective instantiation of a particular work group or to process incoming data. SIMDs 206A-206N are respectively coupled to local data stores (LDSs) 208A- 208N. LDSs 208A-208N provide a private memory region accessible only by their respective SIMDs and is private to a work group. LDSs 208A-208N store the shader program context state data.
[0106] Fig. 5 is a flowchart depicting an exemplary method 500, according to an embodiment of the present invention. For ease of explanation, system 100 in Figs. 1A and IB, as described above, will be used to describe method 500, but is not intended to be limited thereto. In one example, method 500 can be used for allowing the APD to detect a fault associated with a wavefront and to replace the faulted wavefront with another wavefront that is ready to be executed The method 500 may not occur in the order shown, or require all the operations.
[0107] In operation 502, the APD detects a fault in a memory. For example, the detected fault can be a page fault, a memory exception or a translation look-aside buffer (TLB) miss. The page fault or memory exception can occur when a request for data is not in system memory. The TLB miss can occur if the TLB does not have an entry corresponding to a virtual address.
[0108] According to an embodiment, the graphics memory can be a separate memory within the APD or the on-chip memory of a device, such as the SIMD. The first wavefront is removed from of the shader core and stored in memory queues of the SIMD upon receiving the not acknowledged response. According to an embodiment, the APD
tracks the number of wavefronts that receive data that is not acknowledged (e.g., XNACK). If a predetermined number of a wavefronts are not acknowledged a context switching request is initiated.
[0109] According to an embodiment, the IOMMU receives a request from the APD for a translation, the IOMMU accesses a TLB with the request for data. The TLB can be implemented in the IOMMU, the APD, or separately. If the TLB does not have an entry corresponding to the virtual address when accessed, then a TLB miss occurs.
[0110] In operation 504, the APD sends a translation request that is associated with a first wavefront to a translation mechanism. In one example, the translation mechanism is a memory management unit MMU. The memory management unit can be IOMMU communicatively coupled to the APD. The IOMMU can include functionality to translate between the virtual memory address space, as seen by the APD, and the system memory physical address space.
[0111] In operation 506, the IOMMU receives the translation request associated with the first wavefront from the APD.
[0112] In operation 508, the IOMMU performs the translation of the requested data from the APD virtual address space to the physical address space. In one example, the
IOMMU attempts to retrieve the data from a memory, such as system memory 106 in
Figure 1.
[0113] In operation 510, if a determination is made that the request translation is not in the system memory, a memory exception or a page fault is triggered.
[0114] In operation 512, the APD stores the first wavefront to a memory when the
IOMMU sends a not acknowledged response, e.g., XNACK.
[0115] In operation 514, the APD replaces the first wavefront with a second wavefront ready to be executed. For example, the second wavefront is placed onto the shader core and executed. In another example, the first wavefront is periodically resumed as a new request to determine if a fault still exists.
[0116] Fig. 6 is a flowchart depicting an exemplary method 600, according to an embodiment. For ease of explanation, system 100 in Figs. 1A and IB, as described above, will be used to describe method 600, but is not intended to be limited thereto. In one example, method 600 can be used for resuming a wavefront on an APD. The method 600 may not occur in the order shown, or require all the operations.
[0117] In operation 602, the APD receives a command to restore a wavefront. The wavefront has a plurality of threads that perform a plurality of operations within the APD. In one example, a CP of the APD is in communication with a scheduler. The scheduler has access to a run-list (RL) of processes that are scheduled to run within the APD. The CP receives the command to restore the wavefront from the scheduler.
[0118] In operation 604, the command processor reads a list of context states for the wavefront from a memory. The memory can be a graphics memory, a system memory, or an on-chip device memory.
[0119] In operation 606, the CP uses the context states that were read from the memory to create an empty shell wavefront that is used for restoring the saved wavefront. For example, the empty shell wavefront launches a trap routine used to restore the wavefront. The trap routine could have been initially executed by the wavefront if an interference with a process was caused by a context switch. The wavefront of an interrupted task saves a resume instruction pointer that is used during the re-executing of the trap routine. This resume instruction pointer becomes part of the context state of the wavefront and is saved to memory.
[0120] In operation 608, the empty shell wavefront re-executes the trap routine, which launches the appropriate resources for the wavefront to be restored based on the list of context states of the wavefront within the memory. The appropriate resources can include the architectural states of the wavefront, the size of the wavefront structure, and/or bit vectors that include the status of which threads of the wavefront were acknowledged and which threads were not acknowledged.
[0121] In operation 610, a portion of not acknowledged data is masked over a portion of acknowledged data that was within the restored wavefront. In one example, the wavefront uses bit vectors to store the results of threads that have been acknowledged and not acknowledged. These results become part of the wavefront context state.
[0122] Fig. 7 is a flowchart depicting an exemplary method 700, according to an embodiment. For ease of explanation, system 100 in Figures 1A and IB, as described above, will be used to describe method 700, but is not intended to be limited thereto. In one example, method 700 can be used for tracking acknowledgement data within a wavefront on an APD. The method 700 may not occur in the order shown, or require all the operations.
[0123] In operation 702, the acknowledged (XAC ) threads receive an XACK signal bit
(e.g., XACK = 1) and the not acknowledged XNACK threads receive a signal bit (e.g., XNACK = 0). In one example, only the XNACK signal bits are used to create a masked wavefront.
[§124] In operation 704, the XNACK bits are masked over the XACK bits of the restored wavefront.
[0125] In operation 706, the masked XNACK signal bits become a first instruction during re-execution of the masked wavefront.
[0126] Additionally, or alternatively, in operation 708, the command processor sends the masked wavefronts to a DC. The DC can include logic that initiates threads of the wavefront in the shader core.
[0127] Additionally, or alternatively, in operation 710 the DC receives the masked wavefront and then dispatches the threads of the masked wavefront to the shader core for re-execution.
[0128] Fig. 8 is a flowchart depicting an exemplary method 800, according to an embodiment. For ease of explanation, system 100 in Figs. 1A and IB, as described above, will be used to describe method 800, but is not intended to be limited thereto. In one example, method 800 can be used for tracking the performance of threads of the wavefront on an APD, The method 800 may not occur in the order shown, or require all the operations.
[0129] In operation 802, the shader core receives a request to re-execute the masked wavefront from the DC. In one example, the masked wavefront is re-executed and a record of which threads of the operation were acknowledged and which threads were not acknowledged is maintained by the wavefront.
[0130] In operation 804, if all of the wavefront threads were acknowledged, the wavefront proceeds to update the bit vectors related to all threads.
[0131] In operation 808a, the results are stored within the context state of the wavefront once the updates have been made.
[0132] In operation 806, some of the threads of the wavefront receive not acknowledged indicators and are designated as not acknowledged threads.
[0133] In operation 808b, the results are again stored within the context state of the wavefront once the updates have been made.
[0134] In operation 810, a determination is made to retry all threads of the masked wavefront that were designated as not acknowledged threads. If the determination is positive, method 800 returns to operation 802 and is repeated periodically until all of the threads of the wavefront of the operation are acknowledged. If the determination is negative, the APD executes to the next scheduled wavefront.
[0135] Fig. 9 illustrates structures 900 associated with a wavefront, according to an embodiment. Wavefront structures 900 includes wavefronts 902, 904, and 906. For example, the wavefront structures 900 can be implemented in APD 104 on system 100 in Fig. 1A.
[0136] In one example, an empty shell wavefront 902 is a structure that is set up by a CP using context states read from a memory. The memory can be a graphics memory, a system memory, or an on-chip device memory. The CP uses information stored in a context state list associated with the wavefront to form the architectural structure of the wavefront that will accommodate a restored wavefront. The information that is stored in the context state of the wavefront can include the architectural states of the wavefront, the size of the wavefront structure, and/or bit vectors that includes the status of which threads of the wavefront were acknowledged and which threads were not acknowledged.
[0137] In one example, a restored wavefront 904 is formed when the empty shell wavefront launches a trap routine. The context states of the restored wavefront 904 are populated into the empty shell wavefront. The restored wavefront 904 maintains the results of the threads that have been previously acknowledged and previously not acknowledged by using bit vectors. For example, threads 1 through 4 of the restored wavefront 904 receive a 1 bit vector indicating that those threads have been acknowledged. Threads 5 through N of the restored wavefront 904 receives a 0 bit vector indicating that that those threads have not been acknowledged.
[0138] In yet another example, a masked wavefront 906 is formed when a mask is created by using only the not acknowledged bit vectors. In one example, a history is maintained of all threads of the wavefront. The acknowledged threads receive a 1 bit vector (e.g. XACK = 1) and the not acknowledged threads receive a 0 bit vector (e.g. XNACK = 0). The not acknowledged bit vectors are used to create a mask. For example, threads 5 through N of restored wavefront 904 are used to create a mask. In another example, the mask is then placed over the acknowledged bits of the restored wavefront 904 to create
the masked wavefront 906. The masked bits become the first instructions of the masked wavefront 906 during re-execution.
[0139] In yet another example, a masked wavefront 906 is formed when a mask is created by using only the not acknowledged signal bit. In one example, a wavefront maintains a history of all thread operations. The acknowledged threads receive a 1 bit vector (e.g. XACK = 1) and the not acknowledged threads receive a 0 bit vector (e.g. XNACK = 0). The not acknowledged bit vectors are used to create a mask. For example, threads 5 through N of restored wavefront 904 are used to create a mask. In another example, the mask of not acknowledged bits is then placed over the acknowledged bits of the restored wavefront 904 to create the masked wavefront 906. The masked bits become the first instructions of the masked wavefront 906 during re-execution.
[0140] Various aspects of embodiments of the present invention may be implemented in software, firmware, hardware, or a combination thereof. Figure 10 is an illustration of an example computer system 1000 in which embodiments of the present invention, or portions thereof, can be implemented as computer-readable code. For example, the methods illustrated in the present disclosure can be implemented in system 1000. Various embodiments of the present invention are described in terms of this example computer system 1000. After reading this description, it will become apparent to a person skilled in the relevant art how to implement embodiments of the present invention using other computer systems and/or computer architectures.
[0141] It should be noted that the simulation, synthesis and/or manufacture of various embodiments of this invention may be accomplished, in part, through the use of computer readable code, including general programming languages (such as C or C++), hardware description languages (HDL) such as, for example, Verilog HDL, VHDL, Altera HDL (AHBL), or other available programming and/or schematic capture tools (such as circuit capture tools). This computer readable code can be disposed in any known computer- usable medium including a semiconductor, magnetic disk, optical disk (such as CD- ROM, DVD-ROM). As such, the code can be transmitted over communication networks including the Internet. It is understood that the functions accomplished and/or structure provided by the systems and techniques described above can be represented in a core (e.g., a GPU core) that is embodied in program code and can be transformed to hardware as part of the production of integrated circuits.
Computer system 1000 includes one or more processors, such as processor 1004.
Processor 1004 may be a special purpose or a general-purpose processo such as, for example, API) 104 or CPU 102 of Figure 1, respectively. Processor 1004 is connected to a communication infrastructure 1006 (e.g., a bus or network).
Computer system 1000 also includes a main memory 1008, preferably random access memory (RAM), and may also include a secondary memory 1010. Secondary memory 1010 can include, for example, a hard disk drive 1012, a removable storage drive 1014, and/or a memory stick. Removable storage drive 1014 can include a floppy disk drive, a magnetic tape drive, an optical disk drive, a flash memory, or the like. The removable storage drive 1014 reads from and/or writes to a removable storage unit 1018 in a well-known manner. Removable storage unit 1018 can comprise a floppy disk, magnetic tape, optical disk, etc. which is read by and written to by removable storage drive 1014. As will be appreciated by persons skilled in the relevant art, removable storage unit 1018 includes a computer-usable storage medium having stored therein computer software and/or data.
In alternative implementations, secondary memory 1010 can include other similar devices for allowing computer programs or other instructions to be loaded into computer system 1000. Such devices can include, for example, a removable storage unit 1022 and an interface 1020. Examples of such devices can include a program cartridge and cartridge interface (such as those found in video game devices), a removable memory chip (e.g., EPROM or PROM) and associated socket, and other removable storage units 1022 and interfaces 1020 which allow software and data to be transferred from the removable storage unit 1022 to computer system 1000.
Computer system 1000 can also include a communications interface 1024,
Communications interface 1024 allows software and data to be transferred between computer system 1000 and external devices. Communications interface 1024 can include a modem, a network interface (such as an Ethernet card), a communications port, a PCMCIA slot and card, or the like. Software and data transferred via communications interface 1024 are in the form of signals which may be electronic, electromagnetic, optical, or other signals capable of being received by communications interface 1024. These signals are provided to communications interface 1024 via a communications path 1026. Communications path 1026 carries signals and can be implemented using wire or
cable, fiber optics, a phone line, a cellular phone link, a RP link or other communications channels.
[0146] In this document, the terms "computer program medium" and "computer-usable medium" are used to generally refer to media such as removable storage unit 1018, removable storage unit 1022, and a hard disk installed in hard disk drive 1012. Computer program medium and computer-usable medium can also refer to memories, such as main memory 1008 and secondary memory 1010, which can be memory semiconductors (e.g., DRAMs, etc.). These computer program products provide software to computer system 1000.
[0147] Computer programs (also called computer control logic) are stored in main memory 1008 and/or secondary memory 1010. Computer programs may also be received via communications interface 1024. Such computer programs, when executed, enable computer system 1000 to implement embodiments of the present invention as discussed herein. In particular, the computer programs, when executed, enable processor 1004 to implement processes of embodiments of the present invention, such as the steps in the methods illustrated by the flowcharts of the figures discussed above. Accordingly, such computer programs represent controllers of the computer system 1000. Where embodiments of the present invention are implemented using software, the software can be stored in a computer program product and loaded into computer system 1000 using removable storage drive 1014, interface 1020, hard drive 1012, or communications interface 1024.
[0148] Embodiments of the present invention are also directed to computer program products including software stored on any computer-usable medium. Such software, when executed in one or more data processing device, causes a data processing device(s) to operate as described herein. Embodiments of the present invention employ any computer-usable or -readable medium, known now or in the future. Examples of computer-usable mediums include, but are not limited to, primary storage devices (e.g., any type of random access memory), secondary storage devices (e.g., hard drives, floppy disks, CD ROMS, ZIP disks, tapes, magnetic storage devices, optical storage devices, MEMS, nanotechnological storage devices, etc.), and communication mediums (e.g., wired and wireless communications networks, local area networks, wide area networks, intranets, etc.).
- 77 -
CONCLUSION
[0149] The Summary and Abstract sections may set forth one or more but not all exemplary embodiments of the present invention as contemplated by the inventor(s), and thus, are not intended to limit the embodiments described herein and the appended claims in any way.
[0150] Embodiments of the present invention have been described above with the aid of functional building blocks illustrating the implementation of specified functions and relationships thereof. The boundaries of these functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternate boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed.
[0151] The foregoing description of the specific embodiments will so fully reveal the general nature of the embodiments described herein that others can, by applying knowledge within the skill of the art, readily modify and/or adapt for various applications such specific embodiments, without undue experimentation, without departing from the general concepts of the embodiments described herein. Therefore, such adaptations and modifications are intended to be within the meaning and range of equivalents of the disclosed embodiments, based on the teaching and guidance presented herein. It is to be understood that the phraseology or terminology herein is for the purpose of description and not of limitation, such that the terminology or phraseology of the present specification is to be interpreted by the skilled artisan in light of the teachings and guidance.
[0152] The breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.
Claims
1. A method for processing a command in a computing system including an accelerated processing device (APD) having a command processor, the method comprising:
responsive to an instruction to preempt processing of a first set of instructions, executing an interrupt routine to save one or more contexts related to the first set of instructions on a shader core.
2. The method of claim 1 , wherein the interrupt routine is a trap routine.
3. The method of claim 1, wherein the one or more contexts include context of wavefronts implementing one or more of the first set of instructions.
4. The method of claim 3, wherein the one or more contexts include contexts of respective work-items of the wavefronts.
5. The method of claim 1, wherein the one or more contexts include contents of at least one of general purpose registers and local memory.
6. The method of claim I, further comprising processing a second set of instructions upon completion of the preemption of the first set of instructions; and
resuming processing of the first set of instructions upon completion of the processing of the second set of instructions.
7. The method of claim 6, further comprising resuming processing of the first set of instructions from a point of preemption.
8. The method of claim I, further comprising restoring the one or more contexts related to the first set of instructions.
9. The method of claim 1, wherein the instruction to preempt processing of the first instruction is transmitted via the command processor.
10. The method of claim 9, further comprising transmitting the instruction to preempt processing of the first instruction to the shader core.
1 1. A computer readable media storing commands wherein said commands when executed are configured to process work-items on an accelerated processing device (APD) to perform a method for:
responsive to an instruction to preempt processing of a first set of instructions, executing an interrupt routine to save one or more contexts related to a first set of instructions on a shader core.
12. An apparatus, comprising:
a memory; and
an accelerated processing device (APD) coupled to the memory, wherein the APD is configured to, based on a command stored in the memory:
execute an interrupt routine to save one or more contexts related to a first set of instructions on a shader core in response to an instruction to preempt processing of the first set of instructions.
13. The apparatus of claim 12, wherein the interrupt routine is a trap routine.
14. The apparatus of claim 13, wherein the one or more contexts include context of wavefronts implementing one or more of the first set of instructions.
1 5. The apparatus of claim 14, wherein the one or more contexts include contexts of respective work-items of the wavefronts.
16. The apparatus of claim 15, wherein the one or more contexts include contents of at least one of general purpose registers and local memory.
1 7. The apparatus of claim 16, wherein the APD is further configured to process a second set of instructions upon completion of the preemption of the first set of instructions; and
resume processing of the first set of instructions upon completion of the processing of the second set of instructions.
18. The apparatus of claim 17, wherein the APD is further configured to resume processing of the first set of instructions from a point of preemption.
19. The apparatus of claim 18, wherein the APD is further configured to restore the one or more contexts related to the first set of instructions.
20. The apparatus of claim 19, wherein the APD includes a command processor and wherein the instruction to preempt processing of the first instruction is transmitted by the command processor.
21. A method comprising :
responsive to a command to restore a partially completed wavefront, restoring resources for the partially completed wavefront; and
masking a portion of said restored partially completed wavefront.
22. The method of claim 21, wherein restoring resources for the partially completed wavefront further comprises restoring resources based on the list of context states of the wavefront within a memory.
23. The method of claim 21, wherein the masking comprises using bit vectors identifying at least one of portions of the wavefront that has been acknowledged and portions of the wavefront that have not been acknowledged.
24. The method of claim 23, wherein the portions of the wavefront that have or have not been acknowledged comprise threads.
25. The method of claim 24, further comprising:
sending the masked wavefront from a command processor to a dispatch controller; and
receiving, within a shader core, the masked wavefront from the dispatch controller for re-execution.
26. The method of claim 25, further comprising structuring the empty shell wavefront based on a size of the restored wavefront.
27. The method of claim 26, further comprising restoring, using a trap routine, the context states into the empty shell wavefront.
28. The method of claim 21, further comprising tracking, using the wavefront, a plurality of threads that receive not acknowledged and acknowledged data within a bit vectors.
29. The method of claim 28, further comprising periodically retrying a plurality of threads that receive not acknowledged data.
30. A computer readable storage medium having stored thereon computer executable instructions that, if executed by a computing device, cause the computing device to perform a method comprising:
responsive to a command to restore a partially completed wavefront, restoring resources for the partially completed wa vefront; and
masking a portion of said restored partially completed wavefront.
31. The computer readable storage medium of claim 30, wherein restoring resources for the partially completed wavefront further comprises restoring resources based on the list of context states of the wavefront within a memory.
32. The computer readable storage medium of claim 31, wherein the masking comprises using bit vectors identifying at least one of portions of the wavefront that has been acknowledged and portions of the wavefront that have not been acknowledged.
33. The computer readable storage medium of claim 32, wherein the portions of the wavefront that have or have not been acknowledged comprise threads.
34. An apparatus, comprising:
a memory; and
an accelerated processing device coupled to the memory, wherein the accelerated processing device is configured to, based on instructions stored in the memory:
responsive to a command to restore a partially completed wavefront, restore resources for the partially completed wavefront; and
mask a portion of said restored partially completed wavefront.
35. The apparatus of claim 34, wherein restoring resources for the partially completed wavefront further comprises restoring resources based on the list of context states of the wavefront within a memory. The apparatus of claim 35, wherein the masking comprises using bit vectors identifying at least one of portions of the wavefront that has been acknowledged and portions of the wavefront that have not been acknowledged.
The apparatus of claim 36, wherein the portions of the wavefront that have or have not been acknowledged comprise threads.
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/325,339 | 2011-12-14 | ||
US13/325,339 US20130155079A1 (en) | 2011-12-14 | 2011-12-14 | Saving and Restoring Shader Context State |
US13/325,298 | 2011-12-14 | ||
US13/325,298 US9329893B2 (en) | 2011-12-14 | 2011-12-14 | Method for resuming an APD wavefront in which a subset of elements have faulted |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2013090605A2 true WO2013090605A2 (en) | 2013-06-20 |
WO2013090605A3 WO2013090605A3 (en) | 2014-05-08 |
Family
ID=47472089
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2012/069549 WO2013090605A2 (en) | 2011-12-14 | 2012-12-13 | Saving and restoring shader context state and resuming a faulted apd wavefront |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2013090605A2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647046A (en) * | 2014-12-26 | 2018-10-12 | 英特尔公司 | For controlling the device and method for executing flow |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6208361B1 (en) * | 1998-06-15 | 2001-03-27 | Silicon Graphics, Inc. | Method and system for efficient context switching in a computer graphics system |
US7545381B2 (en) * | 2005-11-10 | 2009-06-09 | Via Technologies, Inc. | Interruptible GPU and method for context saving and restoring |
US8368701B2 (en) * | 2008-11-06 | 2013-02-05 | Via Technologies, Inc. | Metaprocessor for GPU control and synchronization in a multiprocessor environment |
US8854381B2 (en) * | 2009-09-03 | 2014-10-07 | Advanced Micro Devices, Inc. | Processing unit that enables asynchronous task dispatch |
US20120194528A1 (en) * | 2010-12-15 | 2012-08-02 | Advanced Micro Devices, Inc. | Method and System for Context Switching |
-
2012
- 2012-12-13 WO PCT/US2012/069549 patent/WO2013090605A2/en active Application Filing
Non-Patent Citations (1)
Title |
---|
None |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108647046A (en) * | 2014-12-26 | 2018-10-12 | 英特尔公司 | For controlling the device and method for executing flow |
CN108647046B (en) * | 2014-12-26 | 2023-11-21 | 英特尔公司 | Apparatus and method for controlling execution flow |
Also Published As
Publication number | Publication date |
---|---|
WO2013090605A3 (en) | 2014-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2652615B1 (en) | Graphics compute process scheduling | |
US8667201B2 (en) | Computer system interrupt handling | |
EP2652614B1 (en) | Graphics processing dispatch from user mode | |
US10242420B2 (en) | Preemptive context switching of processes on an accelerated processing device (APD) based on time quanta | |
US20120229481A1 (en) | Accessibility of graphics processing compute resources | |
US20140022263A1 (en) | Method for urgency-based preemption of a process | |
US9256465B2 (en) | Process device context switching | |
EP2652575A1 (en) | Optimizing communication of system call requests | |
US9122522B2 (en) | Software mechanisms for managing task scheduling on an accelerated processing device (APD) | |
US8803891B2 (en) | Method for preempting graphics tasks to accommodate compute tasks in an accelerated processing device (APD) | |
US20130145202A1 (en) | Handling Virtual-to-Physical Address Translation Failures | |
US20120194526A1 (en) | Task Scheduling | |
US20120188259A1 (en) | Mechanisms for Enabling Task Scheduling | |
US20120198458A1 (en) | Methods and Systems for Synchronous Operation of a Processing Device | |
US20120194525A1 (en) | Managed Task Scheduling on a Graphics Processing Device (APD) | |
US20130135327A1 (en) | Saving and Restoring Non-Shader State Using a Command Processor | |
US10255104B2 (en) | System call queue between visible and invisible computing devices | |
WO2012082556A2 (en) | Computer system interrupt handling | |
US9329893B2 (en) | Method for resuming an APD wavefront in which a subset of elements have faulted | |
US20130141446A1 (en) | Method and Apparatus for Servicing Page Fault Exceptions | |
WO2013085794A1 (en) | Method and apparatus for servicing page fault exceptions | |
WO2013090605A2 (en) | Saving and restoring shader context state and resuming a faulted apd wavefront | |
US20130155079A1 (en) | Saving and Restoring Shader Context State | |
US20120194528A1 (en) | Method and System for Context Switching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 12809488 Country of ref document: EP Kind code of ref document: A2 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 12809488 Country of ref document: EP Kind code of ref document: A2 |