Mapping of logical slots to hardware slots for a graphics processor - Patents.com
By employing techniques such as dynamic slot allocation and affinity-based scheduling to distribute work across multiple shader cores, the challenges of managing performance and power consumption in GPUs are addressed, resulting in improved efficiency and reduced power usage.
Patent Information
- Application Number
- JP2024162393
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-08-11
- Filing Date
- 2024-09-19
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-07-20
AI Technical Summary
As the number of shader cores in GPUs increases, existing work distribution and scheduling techniques struggle to efficiently manage performance and power consumption across multiple replicated processing elements.
The implementation of various techniques for distributing work from logic kick slots to distributed hardware slots, including mapping logic slots to distributed hardware slots, dynamic slot allocation, and affinity-based scheduling, to optimize performance and reduce power consumption.
These techniques enhance the performance of graphics processors by improving work distribution efficiency and reducing power consumption, particularly in scenarios with a large number of shader cores.
Smart Images

Figure 0007675912000005 
Figure 0007675912000006 
Figure 0007675912000007
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to graphics processors, and more particularly to techniques for distributing graphics work in graphics processors having multiple replicated processing elements. [Background technology]
[0002] Given the increasing computational power, graphics processing units (GPUs) are now widely used for large-scale workloads. The workloads may include, for example, vertex shaders, fragment shaders, and computational tasks. APIs such as Metal and OpenCL provide software developers with interfaces to access the computational power of GPUs for their applications. In recent years, software developers have been moving a significant portion of their applications to use GPUs.
[0003] As process technologies shrink and GPUs become more powerful, they can contain many shader cores. Software or firmware can provide units of work to be executed, called "kicks." Data master circuits (e.g., compute data masters, vertex data masters, and pixel data masters) can distribute the work from these kicks to multiple replicated shader cores, for example, via a communication fabric. As the number of shaders scales, work distribution and scheduling techniques can substantially impact performance and power consumption. [Brief description of the drawings]
[0004] [Figure 1A] FIG. 2 illustrates an overview of an exemplary graphics processing operation in accordance with some embodiments.
[0005] [Figure 1B] FIG. 2 is a block diagram illustrating an exemplary graphics unit, in accordance with some embodiments.
[0006] [Diagram 2] FIG. 2 is a block diagram illustrating an example primary control circuit configured to map logical slots to distributed hardware slots in accordance with some embodiments.
[0007] [Diagram 3] FIG. 2 is a block diagram illustrating a primary control circuit and an exemplary grouping of GPU hardware subunits, according to some embodiments.
[0008] [Figure 4] A diagram illustrating three exemplary distributed modes for mapping logical slots to distributed hardware slots, according to some embodiments.
[0009] [Diagram 5] FIG. 2 illustrates an example mapping of multiple logical slots to distributed hardware using different distribution modes, according to some embodiments.
[0010] [Figure 6] FIG. 2 is a block diagram illustrating detailed example elements of a primary control circuit according to some embodiments.
[0011] [Figure 7] FIG. 2 illustrates an example distributed slot state and kernel residency information, according to some embodiments.
[0012] [Figure 8] FIG. 1 is a flow diagram illustrating an example method for mapping logical slots to distributed mGPU hardware slots, according to some embodiments.
[0013] [Figure 9] FIG. 2 illustrates an example software override field, according to some embodiments.
[0014] [Figure 10A] FIG. 1 is a flow diagram illustrating an example technique for selecting hardware slots based on hardware slot states for different example distributed modes, according to some embodiments. [Figure 10B] FIG. 1 is a flow diagram illustrating an example technique for selecting hardware slots based on hardware slot states for different example distributed modes, according to some embodiments. [Figure 10C] FIG. 1 is a flow diagram illustrating an example technique for selecting hardware slots based on hardware slot states for different example distributed modes, according to some embodiments.
[0015] [Figure 11A] A diagram illustrating exemplary logical slot retention status values according to some embodiments.
[0016] [Figure 11B] FIG. 1 is a flow diagram illustrating an example technique for reclaiming hardware slots, according to some embodiments.
[0017] [Figure 12] FIG. 11 is a flow diagram illustrating an exemplary software controlled hardware slot retention procedure, according to some embodiments.
[0018] [Figure 13] FIG. 2 illustrates an example reserved hardware slot in an mGPU for a higher priority logical slot, according to some embodiments.
[0019] [Figure 14A] 1 illustrates an exemplary cache flush invalidation command that encodes an unconditional field, according to some embodiments. [Figure 14B] 1 illustrates an exemplary flash control circuit according to some embodiments.
[0020] [Figure 15]FIG. 1 is a block diagram illustrating an example affinity map illustrated by a set of graphical works in accordance with some embodiments.
[0021] [Figure 16] FIG. 2 is a block diagram illustrating an example kernel walker circuit for affinity-based scheduling, according to some embodiments.
[0022] [Figure 17] FIG. 1 illustrates an exemplary iteration of a kernel based on software-directed affinity, according to some embodiments.
[0023] [Figure 18] FIG. 2 is a block diagram illustrating an exemplary worksharing control circuit according to some embodiments.
[0024] [Figure 19A] FIG. 2 is a block diagram illustrating an example logical slot manager with dependency tracking and status circuitry in accordance with some embodiments; [Figure 19B] 1 shows exemplary tracking and status fields.
[0025] [Figure 20] FIG. 2 illustrates an example register prefetch buffer for a kick slot manager in accordance with some embodiments.
[0026] [Figure 21] FIG. 1 illustrates an example state machine for the top slot processed by the kick slot manager according to some embodiments.
[0027] [Figure 22] FIG. 1 is a flow diagram illustrating an exemplary method, according to some embodiments. [Diagram 23] FIG. 1 is a flow diagram illustrating an exemplary method, according to some embodiments. [Figure 24]FIG. 1 is a flow diagram illustrating an exemplary method, according to some embodiments. [Diagram 25] FIG. 1 is a flow diagram illustrating an exemplary method, according to some embodiments.
[0028] [Figure 26] FIG. 1 is a block diagram illustrating an exemplary computing device, according to some embodiments.
[0029] [Figure 27] FIG. 1 illustrates an exemplary application of the disclosed systems and devices, according to some embodiments.
[0030] [Figure 28] FIG. 1 is a block diagram illustrating an exemplary computer-readable medium for storing circuit design information, according to some embodiments. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0031] The present disclosure is directed to various techniques relating to logical kick slots and distribution of work from logical kick slots to distributed hardware. FIGS. 1A-1B provide an overview of a graphics processor. FIGS. 2-8 provide an overview of techniques for mapping logical slots to distributed hardware slots for graphics processing. FIG. 9 illustrates an example software override that may affect the mapping. FIGS. 10-14 illustrate example techniques for implementing distributed mode, reusing hardware slots, preserving hardware slots, providing logical slot priorities, and handling cache flush operations in the context of logical slot mapping. FIGS. 15-18 illustrate example techniques for affinity based scheduling. FIGS. 19-21 illustrate a kick slot manager that interfaces with software and configures logical slots. The remaining figures illustrate example methods, systems, applications, and the like. In various embodiments, the disclosed techniques may advantageously improve the performance or reduce power consumption of a graphics processor over conventional techniques, as described in more detail below. Graphics Processing Overview
[0032] Referring to FIG. 1A, a flow diagram illustrating an exemplary process flow 100 for processing graphics data is shown. In some embodiments, a transform and lighting procedure 110 may involve processing lighting information for vertices received from an application based on specified light source locations, reflectance, etc., assembling vertices into polygons (e.g., triangles), and converting the polygons to the correct size and orientation based on their position in three-dimensional space. A clip procedure 115 may involve discarding polygons or vertices that are outside the viewable area. A rasterization procedure 120 may involve defining fragments within each polygon and assigning initial color values for each fragment based, for example, on the texture coordinates of the polygon's vertices. A fragment may specify attributes of pixels where the fragment overlaps, but the actual pixel attributes may be determined based on combining multiple fragments (e.g., in a frame buffer), ignoring one or more fragments (e.g., if a fragment is obscured by another object), or both. A shading procedure 130 may involve modifying pixel components based on lighting, shadows, bump mapping, translucency, etc. The shaded pixels may be assembled in frame buffer 135. Modern GPUs typically include programmable shaders that allow customization of shading and other processing steps by application developers. Thus, in various embodiments, the example elements of FIG. 1A may be performed in various orders, in parallel, or omitted. Additional processing steps may also be implemented.
[0033] 1B, a simplified block diagram illustrating graphics unit 150 is shown, according to some embodiments. In the illustrated embodiment, graphics unit 150 includes programmable shaders 160, vertex pipe 185, fragment pipe 175, texture processing unit (TPU) 165, image write unit 170, and memory interface 180. In some embodiments, graphics unit 150 is configured to process both vertex and fragment data using programmable shaders 160, which may be configured to process graphics data in parallel using multiple execution pipelines or instances.
[0034] In the illustrated embodiment, vertex pipe 185 may include various fixed function hardware configured to process vertex data. Vertex pipe 185 may be configured to communicate with programmable shader 160 to coordinate vertex processing. In the illustrated embodiment, vertex pipe 185 is configured to send processed data to fragment pipe 175 or programmable shader 160 for further processing.
[0035] In the illustrated embodiment, fragment pipe 175 may include various fixed function hardware configured to process pixel data. Fragment pipe 175 may be configured to communicate with programmable shader 160 to coordinate fragment processing. Fragment pipe 175 may be configured to perform rasterization on polygons from vertex pipe 185 or programmable shader 160 to generate fragment data. Vertex pipe 185 and fragment pipe 175 may be coupled to memory interface 180 (coupling not shown) to access the graphics data.
[0036] In the illustrated embodiment, programmable shader 160 is configured to receive vertex data from vertex pipe 185 and fragment data from fragment pipe 175 and TPU 165. Programmable shader 160 may be configured to perform vertex processing tasks on the vertex data, which may include various transformations and adjustments of the vertex data. Programmable shader 160 in the illustrated embodiment is also configured to perform fragment processing tasks on the pixel data, such as, for example, texturing and shading. Programmable shader 160 may include multiple sets of multiple execution pipelines to process data in parallel.
[0037] In some embodiments, a programmable shader includes pipelines configured to execute one or more different SIMD groups in parallel. Each pipeline may include various stages configured to perform operations in a given clock cycle, such as fetch, decode, issue, and execute. The concept of a processor "pipeline" is well understood and refers to the concept of dividing the "work" a processor performs on instructions into multiple stages. In some embodiments, instruction decode, dispatch, execution (i.e., performance), and retirement may be examples of different pipeline stages. By varying the order of elements / parts, many different pipeline architectures are possible. The various pipeline stages perform such steps on an instruction during one or more processor clock cycles and then pass the instruction or operations associated with the instruction to other stages for further processing.
[0038] The term "SIMD group" is intended to be interpreted according to its well-understood meaning and includes a set of threads where the processing hardware processes the same instruction in parallel using different input data for the different threads. Various types of computer processors may include a set of pipelines configured to execute SIMD instructions. For example, graphics processors often include a programmable shader core configured to execute instructions for a set of related threads in a SIMD manner. Other examples of names that may be used for a SIMD group include wavefront, clique, or warp. A SIMD group may be part of a larger thread group that may be divided into several SIMD groups based on the parallel processing capabilities of the computer. In some embodiments, each thread is assigned to a hardware pipeline that fetches operands for that thread and performs a specified operation in parallel with other pipelines of the set of threads. It should be noted that a processor may have multiple pipelines such that multiple separate SIMD groups may also execute in parallel. In some embodiments, each thread has private operand storage, for example in a register file. Thus, reading a particular register from the register file may provide a version of the register for each thread in the SIMD group.
[0039] In some embodiments, the GPU includes multiple programmable shader units 160. In these embodiments, a global control circuit can allocate work to different sub-portions of the GPU, which in turn can allocate work to shader cores that are processed by shader pipelines.
[0040] In the illustrated embodiment, TPU 165 is configured to schedule fragment processing tasks from programmable shader 160. In some embodiments, TPU 165 is configured to pre-fetch texture data and assign initial colors to fragments for further processing by programmable shader 160 (e.g., via memory interface 180). TPU 165 may be configured to provide fragment components in normalized integer or floating point format, for example. In some embodiments, TPU 165 is configured to provide fragments in groups of four in 2×2 format ("fragment quads") for processing by groups of four execution pipelines in programmable shader 160.
[0041] In some embodiments, image writing unit (IWU) 170 is configured to store processed tiles of an image and can perform operations on the rendered image before it is transferred to memory for display or storage. In some embodiments, graphics unit 150 is configured to perform tile-based deferred rendering (TBDR), in which different portions of screen space (e.g., squares or rectangles of pixels) can be processed separately. Memory interface 180 can facilitate communication with one or more of various memory hierarchies in various embodiments.
[0042] As mentioned above, a graphics processor typically includes dedicated circuitry configured to perform specific graphics processing operations requested by a computing system. This may include, for example, fixed-function vertex processing circuitry, pixel processing circuitry, or texture sampling circuitry. A graphics processor may also perform non-graphics computational tasks that may use GPU shader cores but may not use fixed-function graphics hardware. As an example, machine learning workloads (which may include inference, training, or both) are often assigned to GPUs due to their parallel processing capabilities. Thus, the computation kernels executed by the GPU may include program instructions that specify machine learning tasks, such as implementing neural network layers or other aspects of a machine learning model to be executed by the GPU shaders. In some scenarios, non-graphics workloads may also utilize dedicated graphics circuitry, for example, for purposes other than those originally intended.
[0043] Furthermore, various circuits and techniques described herein with reference to a graphics processor may be implemented in other types of processors in other embodiments. Other types of processors may include general-purpose processors, such as CPUs, or machine learning or artificial intelligence accelerators with dedicated parallel processing capabilities. These other types of processors may not be configured to execute graphics instructions or perform graphics operations. For example, other types of processors may not include fixed-function hardware included in a typical GPU. Machine learning accelerators may include dedicated hardware for some operations, such as implementing neural network layers or other aspects of machine learning models. Generally speaking, there may be design trade-offs between memory requirements, computational power, power consumption, and programmability of machine learning accelerators. Thus, different implementations may focus on different performance goals. Developers may choose among multiple potential hardware targets for a given machine learning application, for example, among general-purpose processors, GPUs, and different specialized machine learning accelerators. Work distribution and logical slots overview
[0044] 2 is a block diagram illustrating exemplary primary control circuitry and graphics processor subunits according to some embodiments. In the illustrated embodiment, the graphics processor includes primary 210 and subunits 220A-220N.
[0045] The primary control circuitry 210 may be, for example, a compute data master, a vertex data master, or a pixel data master. Thus, in some embodiments, the graphics processor includes multiple instances of the primary control circuitry 210 that send different types of work to the same set of subunits. The primary control circuitry 210 may receive kicks from software, firmware, or both via an interface. As used herein, the term "software" refers broadly to executable program instructions and encompasses, for example, firmware, operating systems, and third party applications. Thus, it should be understood that various references to software herein may alternatively or additionally apply to firmware. The primary control circuitry 210, in the illustrated embodiment, includes a logical slot to distributed hardware slot mapping control circuitry 215. The control circuitry 215 may distribute work from logical slots (which may be referred to as "kick slots") to distributed hardware slots on all or a portion of the graphics processor (e.g., according to different distribution modes discussed below with reference to FIG. 4).
[0046] Various circuits are described herein as controlling logical slots. The term "logical" means that the assignment of work to a logical slot does not imply which hardware actually executes the graphics instructions of the assigned work. The control circuitry may include hardware that maintains information about the logical slots and assigns work from the logical slots to hardware slots for actual execution. Thus, upon initial assignment to a logical slot, it is not known which hardware slot will execute a set of work. As described in more detail below, logical slots may provide various advantages in terms of performance and power consumption when scheduling graphics work, especially in graphics processors with multiple shader cores.
[0047] Multiple "kicks" may be executed to render a frame of graphics data. In some embodiments, a kick is a unit of work from a single context that may include multiple threads to be executed (and potentially other types of graphics work not performed by shaders). A kick may not provide any guarantees regarding memory synchronization between threads (other than that specified by the threads themselves), concurrency between threads, or firing order between threads. In some embodiments, a kick may be identified as being dependent on the result of another kick, which may allow memory synchronization without requiring hardware memory coherency support. Typically, the graphics firmware or hardware program sets configuration registers for each kick before sending the work to the pipeline(s) for processing. Often, once a kick is initiated, it will not access the memory hierarchy beyond a certain level until the kick is completed (at which point the results may be written to another level in the hierarchy). Information about a given kick may include state information, location of shader program(s) to execute, buffer information, location of texture data, available address space, etc., required to complete the corresponding graphics operation. The graphics firmware or hardware may schedule the kick and, for example, detect an interrupt when the kick is completed. In some embodiments, portions of the graphics unit are configured to act on a single kick at a time. As described in more detail herein, a tracking slot (also called a "top slot") and a logical kick slot may be used to control the kick before assigning it to the shader hardware. A kick may include a set of one or more rendering commands, which may include commands to draw procedural geometry, set a shadow sampling method, draw meshes, obtain textures, perform generative calculations, and the like. A kick may be executed at one of various stages during the rendering of a frame.Examples of rendering stages include, but are not limited to, camera rendering, light rendering, projection, texturing, fragment shading, etc. A kick may be scheduled for, for example, compute work, vertex work, or pixel work.
[0048] The subunits 220 are, in some embodiments, scaling units that may be replicated to increase the processing power of the GPU. Each GPU subunit 220 may be capable of independently processing instructions of a graphics program. The subunits 220, in the illustrated embodiment, include circuitry to implement respective distributed hardware slots 230. These hardware slots may also be referred to herein as "dSlots." Each subunit may include multiple hardware slots 230. The subunits may also be referred to herein as "mGPUs." In some embodiments, the primary control circuitry 210 allocates work from logical slots to at most one distributed hardware slot in each subunit 220. In some embodiments, each subunit includes fragment generation circuitry, shader core circuitry configured to execute shader programs, memory system circuitry (which may include one or more caches and memory management units), geometry processing circuitry, and distributed work load distribution circuitry (which may cooperate with the primary control circuitry 210 to distribute work to shader pipelines).
[0049] Each distributed hardware slot may include various circuitry configured to process an assigned kick or a portion thereof, including configuration registers, a work queue, circuitry configured to iterate through work in the queue (e.g., a batch of computational work items), circuitry for ordering context loads / stores, and work distribution tracking circuitry. Each subunit 220 may include multiple shaders that accept work from distributed slots in the subunit and execute the work using a pipeline. For example, each shader may include a queue for each distributed hardware slot and may select work from the queue based on work priority.
[0050] In some embodiments, a given subunit 220 includes multiple programmable shaders 160 of FIG.
[0051] As described in more detail below, the logical slot to distributed hardware slot mapping control circuit 215 can distribute the kick across the subunits 220 based on various parameters, software control inputs, and so on.
[0052] FIG. 3 is a block diagram illustrating a more detailed example of a primary control circuit and grouped processor subunits, according to some embodiments. In the illustrated embodiment, the primary control circuit 210 communicates with a kick slot manager (KSM) 350 and includes configuration registers 312. These configuration registers may include both setup and execution registers. The setup phase registers may be a global structure independent of the distributed hardware used to execute the kick, while the execution registers may be per subunit structure. Although generally shown within the primary control circuit 210, the configuration registers may be included within a variety of suitable circuits (e.g., within the distributed control circuit 340) and may have different scopes (e.g., some registers may be boot-scoped, some may be associated with logical slots, and some may be associated with distributed slots). Some configuration registers may be shared and may set the same value in both the global register circuit and the per-subunit register circuit. The configuration register data may be stored in memory in a defined format, retrieved, and unpacked to populate the physical configuration registers for a given kick.
[0053] In the illustrated embodiment, mGPUs 320A-320N are grouped together and primary control circuitry 210 communicates with multiple such groups. An mGPU is an example of a subunit 220. Each group of mGPUs 305 shares a cache 360 in the illustrated embodiment. This may be, for example, a level 2 cache in an embodiment where each mGPU 320 maintains a level 1 cache. This shared cache may be used to store instructions, data, or both. As described in more detail below, scheduling work with data affinity properties for the same group 305 may be beneficial for cache efficiency. In some embodiments, each group of mGPUs 305 is implemented on the same die or semiconductor substrate, for example in a multi-die implementation.
[0054] Each mGPU 320, in the illustrated embodiment, includes distributed control circuitry that may receive work from primary control circuitry 210, allocate work within the mGPU, and report work completion (e.g., via a communications fabric) to primary control circuitry 210. The signals that allocate work may not include the actual instructions to execute or the data to be operated on, but may identify the location of the program instructions to be executed.
[0055] Kick slot manager 350, in the illustrated embodiment, is configured to receive kicks from the software / firmware interface and communicate the kicks to primary control circuitry 210 for allocation to logical slots. Exemplary communications between kick slot manager 350 and the control circuitry are described in detail below with reference to FIG. 6, and a detailed exemplary embodiment of kick slot manager 350 is described below with reference to FIG.
[0056] 4 and 5, described in detail below, provide examples of techniques implemented by embodiments of control circuitry 215 to distribute work from logical slots, according to some embodiments.
[0057] FIG. 4 illustrates three exemplary distribution modes, according to some embodiments. In general, the distribution mode indicates the breadth of distribution. In the illustrated example, each mGPU implements three distributed hardware slots (DS0-DS2), and two groups (Group 0 and Group 1) each include two mGPUs (mGPU0 and mGPU1). Note that various numbers of hardware slots per mGPU, mGPUs per group, and groups per graphics processor may be implemented in various embodiments. Although embodiments having different specific exemplary numbers of elements are discussed herein for purposes of illustration, these examples are not intended to limit the scope of the present disclosure.
[0058] As explained above, in all three exemplary modes, a logical slot can occupy at most one hardware slot of a given mGPU. The hardware slots to which work from a logical slot is distributed are shown with diagonal lines in FIG. 4. Note further that the control circuitry 215 can dynamically adjust the logical-to-hardware slot mapping in certain circumstances. The logical slot distributes the work to the distributed control circuitry in the mGPU to which the hardware slot is assigned. The distributed control circuitry can then distribute the work to shaders in the mGPU.
[0059] Mode A, in the illustrated example, is a single mGPU distributed mode, in which control circuitry 215 allocates work from logical slots to a single hardware slot on a single mGPU.
[0060] Mode B, in the illustrated example, is a single-group distribution mode, in which control circuitry 215 allocates work from logical slots to slots on each mGPU in a group of mGPUs (in this example, group 0).
[0061] Mode C, in the illustrated example, is a larger multi-group distributed mode in which control circuitry 215 allocates work from logical slots to slots within each mGPU of multiple groups of mGPUs (e.g., in some embodiments, every group on a graphics processor).
[0062] The control circuitry 215 may determine the distribution mode for a logical slot (or the portion of a kick that is assigned to a logical slot, e.g., for a kernel) based on various considerations, which are described in more detail below. In general, the control circuitry 215 may select the distribution mode based on the amount of work that the primary control circuitry is managing at a particular time, based on the size of the set of work, or both. Additionally, software override features may allow software or firmware to adjust the distribution of work in a kick. Additionally, priority, dynamic remapping, and reclamation techniques may affect the logical to hardware slot mapping.
[0063] The control circuitry 215 may report hardware slot allocations and deallocations to the kick slot manager 350, which may allow software or firmware to query information regarding the current logical slot mapping (e.g., distribution mode, specific mapping, etc.).
[0064] Note that for purposes of illustration, the group / mGPU / hardware slot level organization is included, but is not intended to limit the scope of the present disclosure. In some embodiments, the "group" level organization may be omitted, which may result in only two distributed modes: single mGPU or multiple mGPUs. In some embodiments, additional levels of organization may be implemented that may be associated with additional distributed modes (e.g., in addition to single mGPU mode and single group mode, groups of groups, which may result in single group of group modes and multiple groups of group modes).
[0065] 5 is a diagram illustrating an example filling of available hardware slots from multiple logical slots, according to some embodiments. In the illustrated example, control circuitry 215 maps nine logical slots 510A-510I to 48 distributed slots (in four groups of four mGPUs) using multiple distribution modes.
[0066] In the illustrated example, circuitry 215 uses the single mGPU distributed mode for logical slots 510A, 510D, 510G, and 510I. For example, logical slot 510A receives a single distributed slot, DS0, in mGPU0 of group 0.
[0067] Circuit 215 uses the single-group distributed mode for logical slots 510B, 510E, and 510H. For example, logical slot 510B receives distributed slot DS0 on each mGPU in group 1.
[0068] Circuit 215 uses a multi-group distribution mode for logical slots 510C and 510F. For example, logical slot 510C receives distributed slots on each mGPU shown.
[0069] Note that not all hardware slots are assigned at all times, but in general, filling the available slots can improve performance. When a kick assigned to a logical slot is completed, another kick can be assigned to that logical slot, and logical slots can be remapped to physical slots. Exemplary Control Circuit
[0070] Figure 6 is a block diagram illustrating a detailed example of control circuitry, according to some embodiments. In the illustrated embodiment, the kick slot manager communicates with mapping control circuitry 215, which in the illustrated embodiment includes dSlot resource allocator 620, control stream processors (CSPs) 630A-N, kernel processors 640A-N, mGPU allocation circuits 650A-N, and kick slot arbiter 660. In some embodiments, each logical slot supported by a processor has an assigned set of elements 630, 640, and 650. It should be noted that while the specific details of Figure 6 relate to computational work, similar techniques can be used for other types of work, such as vertex shading and pixel shading.
[0071] The kick slot manager 350, in the illustrated embodiment, assigns kicks to logical slots and sends the kick information to a corresponding control stream processor 630. The control stream processor 630 can notify the kick slot manager 350 when a kick has completed processing.
[0072] The control stream processor 630, in the illustrated embodiment, manages the ordering of those kick slots, fetches and executes the control stream for the kick, and tracks kick completion. The control stream processor 630 can operate at a kernel granularity (kernels can be fetched from the control stream for a kick). The control stream processor 630 can communicate with the dSlot resource allocator 620 to obtain dSlot resources for those logical slots. The control stream processor 630 is configured to determine the distribution mode for the kernels and send the kernels with their distribution mode and distributed slot allocation to the kernel processor 640.
[0073] The dSlot resource allocator 620, in some embodiments, includes circuitry configured to receive requests from multiple logical slots and process requests to allocate dSlots to kernels. In some embodiments, the dSlot resource allocator 620 selects a distribution mode and allocates dSlots to portions of kicks (e.g., at kernel granularity), although other granularities are contemplated. In some embodiments, the dSlot resource allocator 620 allocates logical slots first based on kick priority and then based on kick age, as described in more detail below. For example, the DRA 620 may reserve some distribution slots for kernels from kicks that have a priority level greater than a threshold.
[0074] The kernel processor 640, in the illustrated embodiment, is included in the primary compute data master. The kernel processor 640 is configured to create batches of workgroups from kernels and send the batches with their distribution modes and distribution slot assignments to the mGPU allocation circuit 650. The kernel processor 640 can select the batches for distribution based on affinity, load balancing, or both, as described in more detail below. The kernel processor 640 can receive an indication of the assigned dSlots and a target mask that indicates which mGPUs are allowed to be targeted by the kernel.
[0075] As used herein, the term "compute kernel" in a graphics context is intended to be interpreted according to its well-understood meaning, including routines compiled for acceleration hardware such as a graphics processor. A kernel may be specified by a separate programming language, such as OpenCL C, written as a compute shader in a shading language such as OpenGL, or embedded in application code in a high-level language. A compute kernel typically includes several workgroups, which include several work items (also called threads). It should be noted that the various techniques described herein with respect to compute kernels may be applied to other types of work, such as vertex or pixel processing tasks.
[0076] The mGPU allocation circuit 650, in the illustrated embodiment, receives the batch and sends the batch to a target mGPU. The circuit 650 may receive the batch along with a mask of acceptable mGPU targets, which may be a function of the distribution mode. Using the mask, the circuit 650 can select an mGPU target based on load distribution.
[0077] The kick slot arbiter 660, in the illustrated embodiment, selects among the available batches to send to the destination mGPU. For example, the kick slot arbiter 660 may select one or more logical kick slots to send a batch to each cycle. The selected batch (and return information associated with the execution status) may be transmitted over a communications fabric. The fabric may be dedicated to control signaling, for example, as described in U.S. Patent Application Publication No. 17 / 158,943, filed January 26, 2021, and entitled “Shared Control Bus for Graphics Processors.”
[0078] Various additional functions performed by the circuitry of FIG. 6 are described in detail below in sections describing specific functions such as, for example, dynamic mapping, software overrides, priorities, retention techniques, reclamation techniques, cache flushing, and affinity. Per-kernel mapping techniques
[0079] In some embodiments, per-kernel mapping during execution of computation kicks can provide dynamic allocation that would be difficult at kick granularity (determining how many distributed slots a kick should occupy before executing the kick can be difficult). As briefly described above, the control stream processor 630 and dSlot resource allocator 620 can facilitate these techniques.
[0080] 7 is a diagram illustrating exemplary distributed slot state and kernel resident information, which can facilitate dynamic mapping, in accordance with some embodiments.
[0081] A dslot_status is maintained for each dSlot in the illustrated example, indicating whether the dSlot is invalid, running, empty, flushing, or retained. The invalid state indicates that the dSlot is not owned by any logical slot. The running state indicates that the dSlot is owned by a logical slot and is currently running. The empty state indicates that the dSlot is owned by a logical slot and has finished executing. The flushed state indicates that the dSlot is owned by a logical slot, such as in the process of a cache flush (e.g., flush invalidate by memory hierarchy). The retained state indicates that the dSlot is owned by a logical slot and is being retained after kernel completion (e.g., after kernel exit cache flush invalidate), e.g., to save performance data. It should be noted that while these states are included for illustrative purposes, in other embodiments other states may be implemented, states may be omitted, or both.
[0082] The dslot_owner state is maintained for each dSlot in the illustrated example and indicates the logical slot that owns the dSlot. Since no logical slot owns an invalid dSlot, this field is not relevant for the invalid state.
[0083] A per_kernel_residency state is maintained for each kernel and each mGPU in the illustrated example, indicating whether the kernel was assigned to an mGPU. Note that the various information maintained per kernel for computational work may similarly be maintained for kicks or portions of kicks for other types of work that do not utilize kernels.
[0084] FIG. 8 is a flow diagram illustrating an example method for mapping a kernel of a kick, according to some embodiments.
[0085] At 810, in the illustrated embodiment, the control circuitry waits until kernel dependencies are cleared and the logical slot assigned to the kick has an idle kernel processor, allowing the preceding kernel to finish iterating before starting the next kernel for the kick.
[0086] At 820, in the illustrated embodiment, the CSP determines the distribution mode and sends a request with the distribution mode to the DRA 620.
[0087] The DRA 620 responds with a distributed slot allocation at 830. An exemplary DRA arbitration algorithm is described in detail below.
[0088] At 840, in the illustrated embodiment, the primary control circuitry performs several activities. First, it sends a distributed slot start message to all mGPUs that have dSlots assigned to the kernel. Next, it sends a register write command to the register copy unit, including a dSlot mask indicating which dSlots are affected. The register copy unit writes the distributed slot scope control registers for the kernel. (The register copy unit may have already written the logical slot scope control registers for the kick.) Finally, the primary control circuitry sends the work to the indicated mGPUs. Note that work may be fenced until all register writes by the register copy unit are complete.
[0089] The primary control circuitry can also track the completion status of all kernels it distributes, for example detecting when all dSlots in which a kernel was running have transitioned from running to empty. Software Override Technique Example
[0090] In some embodiments, the software can provide various directives to override the default distribution mode of a kernel, allowing the software to, for example, parallelize important work rather than risking it being assigned to a single mGPU. Additionally, this may allow the software to assign a kernel to a specific group of mGPUs.
[0091] FIG. 9 illustrates exemplary software override fields. Software or firmware can adjust these fields to control kernel distribution. The mGPU mask field, in the illustrated embodiment, indicates which mGPUs may be used by this kick. For example, the mask may include a bit for each mGPU. This may allow software to indicate to avoid or target a specific mGPU for the kick. The distribution mode field allows software to select a distribution mode. A default value may allow the control stream processor 630 for the logical slot to select a distribution mode. Other values may specify a distribution mode that may be implemented by the control stream processor 630 regardless of the mode the control stream processor 630 would have selected (at least in the operating mode in which the software override is enabled). In the default mode, the mGPU allocation circuit 650 may select dSlots according to a distribution mode flexibly selected by the CSP based on load distribution, and in other modes, the mGPU allocation circuit may follow the restrictions specified by the software override.
[0092] The force group field allows software to select a group to perform the kick. This may be specified, for example, with a single mGPU or single group distribution mode. The policy field allows software to specify a scheduling policy for single mGPU or single group distribution. In the illustrated example, software may specify a "first option selection" policy (which may be the default) or a round robin policy. The first option selection policy may select the first available element (e.g., mGPU or group) according to their index, which may avoid fragmentation and leave more contiguous dSlots free for other slices. The round robin policy may randomize resource usage and may distribute small slices across multiple groups, avoiding the location of selected resources that may cause substantial performance fluctuations. In other embodiments, various policies may be specified. A detailed example of arbitration that takes into account the software override field is described below. Exemplary Arbitration Techniques
[0093] 10A-10C are flow diagrams illustrating an example technique for hardware slot arbitration for different distribution modes, according to some embodiments. Note that the disclosed techniques generally allow for a wide distribution of consecutive kernels in the same logical slot (e.g., if kernel A is a single mGPU kernel that is assigned dSlot in mGPU0, kernel B, also a single mGPU kernel, will be assigned dSlot in mGPU1, which can prioritize completing execution of a logical slot while allowing fewer logical slots to run simultaneously).
[0094] In some embodiments, DRA 620 leaves dSlots empty as long as possible, for example, to allow subsequent kernels from the same logical slot to use the dSlot(s). This may reduce cache flush invalidations and execution configuration register writes for newly allocated dSlots. In some embodiments, an empty dSlot owned by another logical slot must go through a reclamation process (described below with reference to FIG. 11) and transition to invalid before it can be assigned to a new logical slot.
[0095] In general, as described in more detail below, DRA 620 uses the following priority scheme to select a dSlot for a kernel: Highest priority are empty dSlots already owned by logical slots. These dSlots have control registers written and are free for immediate execution. Medium priority are invalid dSlots, which are newly allocated and may require control register writes, but are free for immediate execution. Lowest priority are running dSlots already owned by distributed slots. These dSlots have control registers written but may need to wait behind another kernel.
[0096] 10A illustrates an arbitration method for single mGPU distributed mode. At 1010, in the illustrated embodiment, DRA 620 determines a set of allowable mGPUs for a kernel based on its force group and mGPU mask fields. This set may omit any group of mGPUs not selected by software.
[0097] At 1012, in the illustrated embodiment, DRA 620 selects an mGPU whose logical slot for the kernel already owns an empty dSlot. Note that if there is a tie among elements 1012, 1016, and 1018, DRA 620 uses a determined policy (e.g., in some embodiments, a default, software-specified, or single type policy) to select a hardware resource. For example, if there are multiple mGPUs that satisfy element 1012, DRA 620 may apply the policy to select an mGPU. If more than one mGPU meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0098] At 1014, in the illustrated embodiment, DRA 620 selects an mGPU with at least one invalid dSlot whose logical slot does not already own the dSlot. If one or more mGPUs meet these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0099] At 1016, in the illustrated embodiment, DRA 620 selects the mGPU with the most disabled slots. If more than one mGPU meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0100] At 1018, in the illustrated embodiment, DRA 620 selects an mGPU that already owns the hardware slot in which the logical slot is running. If more than one mGPU meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0101] At 1020, in the illustrated embodiment, the DRA 620 attempts a reclamation procedure. An example of such a procedure is described in more detail below with reference to Figure 11. If the reclamation fails, the flow proceeds.
[0102] At 1022, in the illustrated embodiment, DRA 620 restarts the allocation machine and re-arbitrates. For various distribution modes, re-arbitration may occur until a sufficient number of hardware slots are available to satisfy the distribution mode.
[0103] 10B illustrates an arbitration method for the single group distributed mode. At 1030, in the illustrated embodiment, the DRA 620 determines a set of allowable mGPUs, similar to element 1010 of FIG.
[0104] At 1032, in the illustrated embodiment, DRA 620 selects a group where all mGPUs in the group have dSlots owned by the kernel's logical slots in an empty or disabled state. In the event of a tie, DRA 620 selects the group with the fewest disabled dSlots. If more than one group meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow continues.
[0105] At 1034, in the illustrated embodiment, DRA 620 selects a group where all mGPUs in the group have dSlots owned by logical slots that are running, disabled, or empty. In the event of a tie, DRA 620 selects the group with the fewest mGPUs with slots in the running state. DRA 620 may apply a policy if there is still a tie. If more than one group meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0106] At 1038 and 1040, the dRA 620 attempts reclamation and then restarts and re-arbitrates the allocation machine, similar to elements 1020 and 1022 described above.
[0107] 10C illustrates an arbitration method for multi-group distributed mode. At 1050, in the illustrated embodiment, DRA 620 determines the set of allowable mGPUs based on the mGPU mask (rather than based on a force group command, since all groups are used in this example).
[0108] At 1052, in the illustrated embodiment, DRA 620 performs the operations of elements 1054-1058 for each target mGPU in the set of allowable mGPUs. At 1054, the DRA selects a dSlot that is free or already owned by a logical slot of a kernel that is in a running state. If one or more dSlots meet these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds.
[0109] At 1056, in the illustrated embodiment, DRA 620 selects an invalid dSlot. If more than one dSlot meets these criteria, one of them is selected and arbitration for that logical slot ends until the kernel finishes. If not, the flow proceeds. At 1058, in the illustrated embodiment, DRA 620 attempts reclamation.
[0110] If the operation of element 1052 was not successful in allocating dSlots in each mGPU to the kernels, flow proceeds to 1060, where DRA 620 restarts the allocation machine and re-arbitrates.
[0111] It should be noted that while the various techniques described above take into account a software override field, in other embodiments, software override may not be implemented or may be disabled in certain operating modes, in which case the DRA may operate as described above but without consideration of software override. Slot Reuse
[0112] In some embodiments, the control circuitry is configured to allow a logical slot to reuse a hardware slot assigned to another logical slot. In some embodiments, only higher priority logical slots are permitted to reuse hardware slots from other logical slots. Exemplary techniques for implementing logical slot priority are described below, but in general, priority may be indicated by software. In some embodiments, only hardware slots that are in an empty state are eligible to be reused by another logical slot.
[0113] In general, the control circuitry may attempt to keep hardware slots empty for as long as possible, which may avoid the overhead of performing cache flush invalidations and writing configuration registers when switching a hardware slot to a new logical slot (since keeping a hardware slot empty may allow the same logical slot to send another kernel from the same kick to use the hardware slot, which avoids this overhead). However, this may improve performance by allowing other important logical slots to take such hardware slots.
[0114] 11A is a diagram illustrating example values of a hold signal used for hardware slot reclamation, according to some embodiments. The hold signal may also be referred to as a persistence signal. Each CSP 630 can send a hold signal to the DRA 620 indicating the extent to which it wants to hold its hardware slot (e.g., depending on the distance the CSP 630 is performing its kick).
[0115] In the illustrated example, the hold signal has one of three values, although other sets of values are possible in other embodiments. A low value indicates that the logical slot has reached the end of control stream signal for a kick and that there are no kernels remaining in the kernel queue to process. In this case, the logical slot does not require another hardware slot for a kick. A medium value indicates that the logical slot has not reached the end of control stream, but there is currently no kernel ready to request a hardware slot for execution. A high value indicates that the logical slot has a kernel requesting a hardware slot for execution.
[0116] In some embodiments, DRA 620 is configured to reclaim slots only if enough hardware slots can be reclaimed to satisfy the request. If not, the reclamation attempt may fail. If the reclamation is successful, DRA 620 restarts its state machine and re-arbitrates for the logical slots. DRA 620 may initiate a cache flush invalidation with the memory hierarchy for any reclaimed slots. This may cause those slots to transition to a flushed state, but those slots may become available for arbitration once they have finished transitioning to the flushed and invalidated state.
[0117] 11B is a flow diagram illustrating an example technique for reclaiming one or more hardware slots currently assigned to another logical slot, according to some embodiments. At 1110, in the illustrated embodiment, DRA 620 finds that all dSlots are in a flushing state. It may generate a data structure indicating the set of dSlots in the flushing_set. If these dSlots are sufficient to process the kernel's request, DRA 620 cancels the reclamation and waits for the flush to finish. If not, the flow proceeds.
[0118] At 1120, in the illustrated embodiment, DRA 620 finds all dSlots owned by logical slots that have been emptied and (a) do not store context and (b) do not have any flushing dSlots. It may generate a data structure that indicates the set of dSlots in this allowed_set. If the dSlots in the allowed_set with low retention values combined with the dSlots in the flushing_set are sufficient to service the request, DRA 620 reclaims those dSlots and initiates cache flush invalidation for those dSlots. If not, the flow proceeds.
[0119] At 1130, in the illustrated embodiment, DRA 620 first determines whether the request is for a low or high priority logical slot and acts accordingly. Note that in other embodiments, other priority granularities may be supported. For a low priority requester, DRA 620 generates a do_set of slots that are slots in the allowed_set that have a medium retention value owned by the low priority logical slot. DRA 620 finds dSlots in both the flushing_set and the do_set. If these dSlots are sufficient to process the request, DRA 620 reclaims these dSlots and initiates cache flush invalidation for these dSlots. If not, the flow proceeds.
[0120] For high priority requesters, DRA 620 generates a do_set of slots that are slots in the allowed_set with medium retention values owned by high priority logical slots. DRA 620 finds dSlots in both the flushing_set and the do_set. If these dSlots are sufficient to process the request, DRA 620 reclaims these dSlots and initiates cache flush invalidation for these dSlots. If not, the flow proceeds.
[0121] At 1140, in the illustrated embodiment, DRA 620 adds to the do_set those slots that are in the allowed_set, have high retention values, and belong to logical slots with lower priority and lower age. DRA 620 finds dSlots in both the flushing_set and the updated do_set. If these dSlots are sufficient to process the request, DRA 620 reclaims these dSlots and initiates cache flush invalidation for these dSlots. If not, it can cancel the reclamation and restart arbitration.
[0122] In various embodiments, the disclosed techniques may advantageously provide a balance between keeping hardware slots free for current logical slots (to avoid overhead) while still allowing those hardware slots to be reused by other logical slots in certain scenarios. Slot Retention
[0123] In some embodiments, the control circuitry is configured to retain hardware slots for logical slots until instructed (e.g., by software) to release the slots. This may allow software to query various kick information, such as performance registers, memory, or other data affected by the kick execution. In some embodiments, each kick includes a retain_slots field (e.g., a bit) that indicates whether to wait for the hardware slots that are mapped to the logical slots to be deallocated.
[0124] In some embodiments, if a kick with a held slot is assigned to a logical slot, no other slots can reclaim resources from that logical slot, regardless of priority.
[0125] 12 is a flow diagram illustrating an exemplary method performed by the primary control circuitry for processing a kick with a slot held, according to some embodiments. This procedure may be performed in communication with the KSM 350 to enable software communication. At 1210, in the illustrated example, the primary control circuitry 210 initiates a kick with the retain_slots field set, indicating that the slot hardware slot should be retained.
[0126] At 1220, in the illustrated example, the kick completes its work and the device performs the finalization of the kernel flash process. The hardware slots remain mapped.
[0127] At 1230, the primary control circuit 210 sends a kick_done signal to the KSM 350. It also transitions dSlot to the hold state.
[0128] At 1240, software or firmware may query performance registers, memory, etc. that are affected by the kick. At 1250, KSM 350 sends a release_slots signal (e.g., based on a software instruction indicating that the query is complete).
[0129] At 1260, the primary control circuit 210 completes the process of deallocating the hardware slot, and the hardware slot transitions to an invalid state where it is now available for another logical slot. At 1270, the primary control circuit 210 sends a deallocate message to the KSM 350 notifying it that the deallocation is complete.
[0130] In some embodiments, to avoid hang conditions, kick retained slots always use multi-group distributed mode and cannot be blocked from completing. Thus, when arbitrating between logical slots with retention and logical slots without retention, logical slots with retention may always have priority. Furthermore, KSM 350 may only schedule up to a threshold number of logical slots with retention set, corresponding to, for example, the number of dSlots per mGPU. In some embodiments, all logical slots with retention set are promoted to high priority. Reserved slot for high priority kicks
[0131] As briefly discussed above, different logical slots can have different priority levels, e.g., as specified by software. In some embodiments, on a given mGPU, a subset of hardware slots are reserved for logical slots that meet a threshold priority (e.g., higher priority slots in a system with two priority levels).
[0132] Figure 13 is a block diagram illustrating some hardware slots of an mGPU. In some embodiments, one or more dSlots (shown in solid black in Figure 13) are reserved for high priority logical slots, and one or more dSlots (shown in horizontal shading in Figure 13) are available to all logical slots (and are the only hardware slots available to low priority logical slots).
[0133] In some embodiments, the high priority logical slots first attempt to use reserved hardware slots of the mGPU before attempting to use other slots, while in other embodiments, the high priority logical slots can attempt to use all hardware slots of the mGPU equally, for example using a round robin technique.
[0134] In some embodiments, low priority logical slots are not allowed to reclaim hardware slots from high priority logical slots unless the high priority logical slots have had an opportunity to use them.
[0135] In various embodiments, the disclosed prioritization techniques may advantageously allow software to affect the distribution of important work to reduce interference from less important work. Flash Technology
[0136] As mentioned above, a cache flush invalidation (CFI) may be performed every time a hardware slot is assigned to a new logical slot. In addition, the primary control circuit 210 must execute any CFI included in the control stream for a computation kick. However, because hardware slots may be dynamically mapped at the kernel level, the set of hardware slots to flush for a control stream CFI may not be deterministic. The following description provides techniques to address this phenomenon. In particular, an "unconditional" CFI is introduced that flushes all relevant mGPUs (e.g., all mGPUs in a graphics processor in some implementations).
[0137] 14A is a diagram illustrating an example cache flush invalidation command with an unconditional field, according to some embodiments. Each CFI includes an "unconditional" field in this example. A standard (non-unconditional) CFI applies to all hardware slots owned by a logical slot at the time the standard CFI is issued. An unconditional CFI is sent to all mGPUs, even if the logical slot does not own a hardware slot in any mGPU.
[0138] 14B is a block diagram illustrating one embodiment of a dSlot resource allocator configured to handle unconditional CFIs, according to some embodiments. In the illustrated example, the DRA 620 includes an end of kernel flush control register 1330 and a deallocate flush control register 1340. In some embodiments, the primary control circuit 210 implements a state machine such that at most one unconditional CFI can be outstanding at any given time. A logical slot can arbitrate for this resource.
[0139] The kernel flush control register 1330 may maintain a set of bits indicating which mGPUs should be flushed at the end of the kernel. The deallocation flush control register 1340 may maintain a set of bits indicating which mGPUs to flush upon dSlot deallocation in the middle of a kick (note that this may be a subset of the bits specified by the end of kernel flush).
[0140] DRA 620 may implement the following procedure when a dSlot is deallocated: First, if the dSlot is not the last mGPU in the group that has a dSlot allocated for the logical slot, DRA 620 uses the deallocation flush control register 1340, which can potentially flush-invalidate fewer caches (e.g., one or more L1 caches, but not the L2 cache shared by the group). If the dSlot is in the last mGPU of the group, DRA 620 uses the end of kernel flush control register 1330 to determine which cache(s) to flush.
[0141] In various embodiments, the disclosed techniques may advantageously avoid non-deterministic flush behavior, improve cache efficiency, or both. Affinity-Based Distribution
[0142] In embodiments where multiple GPU subunits share a cache (e.g., subunits 320A-320N of group 305), the control circuitry can schedule portions of a kernel that access the same memory region(s) to subunits that share the cache. This can improve cache efficiency, especially among kernels of the same kick.
[0143] In some embodiments, the primary control circuitry 210 defines a set of affinity regions, which may correspond to sets of hardware that share resources, such as caches. In some embodiments, there is a fixed relationship between affinity regions and target groups of mGPUs (although this relationship may vary depending on the kernel dimensions). The primary control circuitry 210 may include control registers that store several affinity maps. Each affinity map may specify a relationship between kernel portions and affinity regions. In this way, each kernel may refer to an affinity map that reflects its memory accesses (e.g., determined by software that may configure affinity maps and specify affinity maps for each kernel). Thus, software may program potential affinity patterns using configuration registers that may also be shared among multiple data masters. Within a kernel, different kernels may be distributed according to different affinity maps.
[0144] FIG. 15 illustrates an example affinity technique for a set of graphics work (e.g., a compute kernel), according to some embodiments. In the illustrated embodiment, the set of graphics work (e.g., a kernel) includes an affinity map indicator 1515 that specifies an affinity map 1520. The indicator may be, for example, a pointer or index into a table of affinity maps. The affinity map indicates corresponding target groups 305 of the mGPU for the N portions of the kernel. Note that the "portion" of the kernel may not actually be a field in the affinity map, but may be implied based on the index of the entry. For example, the third entry in the affinity map may correspond to the 3 / Nth portion of the kernel. A device may include a configuration register that is configurable to specify multiple different affinity maps. Furthermore, a given affinity map may be referenced by multiple kernels.
[0145] In some embodiments, rather than directly mapping portions of a set of graphics work to target groups, an affinity map may use an indirect mapping that maps portions of a set of graphics work to affinity regions and then maps the affinity regions to sets of hardware (e.g., to groups of mGPUs).
[0146] The control circuitry may distribute the set of graphics work based on the indicated affinity map. Multiple portions of the set of graphics work 1510 that target the same group may be assigned to the same group / affinity region (and thus may share a cache shared by the mGPUs of the group, which may improve cache efficiency).
[0147] It should be noted that although the disclosed embodiments specify affinity at the granularity of a group of mGPUs, affinity may be specified and implemented at any of a variety of suitable granularities, for example, with shared caches at various levels in a memory hierarchy. It should be noted that the disclosed embodiments are included for illustrative purposes and are not intended to limit the scope of the present disclosure.
[0148] FIG. 16 is a block diagram illustrating an example circuit configured to distribute batches of workgroups from kernels based on affinity, according to some embodiments. In the illustrated embodiment, the control circuitry for one logical slot includes a control stream processor 630, a primary kernel walker 1610, group walkers 1620A-1620N, a group walker arbiter 1630, an mGPU allocation circuit 650, a kick slot arbiter 660, and a communication fabric 1660. Similar circuitry may be instantiated for each logical slot supported by the device. Note that elements 1610, 1630, and 1640 may be included in the kernel processor 640 described above, and similarly numbered elements may be configured as described above with reference to FIG. 6.
[0149] Each kernel can be organized into work-groups in multiple dimensions (typically three dimensions). These work-groups can include multiple threads (also called work items). The primary kernel walker 1610, in the illustrated embodiment, is configured to iterate through the kernel to provide affinity sub-kernels that include portions of the kernel that target groups of mGPUs according to a specified affinity map. The primary kernel walker 1610 can indicate the sub-kernels assigned to a given group walker 1620 using the coordinates of the sub-kernel's initial work-group. It should be noted that the various kernel data transmitted between the elements of FIG. 16 may not include actual work, but rather may be control signaling indicating the location of the work to be assigned, for example, using coordinates with the kernel.
[0150] For kernels with different dimensions, the primary kernel walker 1610 can divide the kernel into N affinity regions. For example, in an embodiment with N affinity regions per affinity map, the primary kernel walker 1610 can use all N regions for a one-dimensional kernel. For a two-dimensional kernel, the primary kernel walker 1610 can divide the kernel into
number
number
number
number
[0151] The group walker 1620, in the illustrated embodiment, is configured to independently walk each affinity sub-kernel and generate batches, each batch including one or more work groups. A batch may be the granularity at which computational work is dispatched to an mGPU. Note that a given affinity sub-kernel may be divided into multiple thread-restricted walk order sub-kernels, as described in more detail below with reference to FIG. 17. Various techniques for controlling kernel walk order are discussed in U.S. Patent Application Publication No. 17 / 018,913, filed September 11, 2020, and may be used by the group walker 1620 to walk the affinity sub-kernels.
[0152] The group walker arbiter 1630, in the illustrated embodiment, is configured to arbitrate among the available batches, and the mGPU allocation circuitry 650 is configured to allocate selected batches to walkers.
[0153] The allocation circuit 650 can use mGPU masks and load balancing to allocate mGPUs according to any software overrides. The kick slot arbiter 660 arbitrates between the prepared batches and sends them to the target mGPUs via the communications fabric 1660. The communications fabric 1660 may be a work load balancing shared bus (WDSB) configured to transmit control signaling indicating characteristics of the assigned work and tracking signaling indicating work completion, as described, for example, in the above-referenced U.S. Patent Application Publication No. 17 / 158,943.
[0154] In some embodiments, a device can turn off affinity-based scheduling, for example, under software control or using control circuitry under certain conditions. In this situation, the primary kernel walker 1610 can assign an entire kernel to a single group walker 1620.
[0155] Each instance of the distributed control circuitry 340 in an mGPU may include an input queue and a batch execution queue for storing received batches before assigning workgroups to shader pipelines for execution.
[0156] 17 is a diagram illustrating an exemplary kernel iteration, according to some embodiments. In the illustrated embodiment, a kernel 1710 includes multiple portions (M portions in one dimension and X portions in another dimension). Each of these portions may be referred to as an affinity sub-kernel and may be mapped to an affinity region (note that multiple affinity sub-kernels may be mapped to the same affinity region).
[0157] In the illustrated example, portion A0 includes multiple thread-limited sub-kernel portions A-N. Within each affinity sub-kernel, group walker 1620A can use limited iterations as described in U.S. Patent Application Publication No. 17 / 018,913. As shown, thread-limited sub-kernel portion A is divided into several batches (where each square in a batch represents a workgroup) that can be distributed over communication fabric 1660. In the disclosed embodiment, all batches from portion A0 may be assigned to the same group of mGPUs (note that other portions of kernel 1710 may also be targeted to this group of mGPUs). In various embodiments, the disclosed affinity techniques can advantageously improve cache efficiency.
[0158] In some embodiments, affinity-based scheduling may temporarily degrade performance in some situations, e.g., for non-homogeneous kernels. For example, some groups of mGPUs may still be working on complex parts of a kernel when other groups have finished less complex parts. Thus, in some embodiments, the graphics processor implements work-stealing techniques to override affinity-based scheduling, e.g., at the end of a kernel. In these embodiments, groups of mGPUs that are idle on a kernel can take work from groups that are still working on the kernel, which can advantageously reduce the overall execution time of the kernel.
[0159] In some embodiments, the control circuitry selects one or more donor groups of mGPUs (e.g., the group(s) with the most work remaining) and selects other groups of mGPUs that are in a state (e.g., have completed all of their work for a kernel, or at least a threshold amount of their work) as work recipient groups. The work recipient groups can receive batches from affinity subkernels assigned to them, thereby overriding the affinity techniques in certain circumstances.
[0160] 18 is a block diagram illustrating an example circuit configured to facilitate worksharing, according to some embodiments. In the illustrated embodiment, the primary kernel mGPU 1610 includes circuitry 1810A-1810N configured to track remaining portions of kernels (e.g., affinity sub-kernels) targeted to each group of mGPUs. For example, if a given group is targeted by seven affinity sub-kernels and receives four affinity sub-kernels, then three affinity sub-kernels remain for that group.
[0161] Work sharing control circuitry 1820, in the illustrated embodiment, is configured to select work provider group(s) and recipient group(s) based on information maintained by circuitry 1810. Information identifying these groups is maintained in circuits 1830 and 1840, in the illustrated embodiment. In some embodiments, a group is eligible to do work only if it is associated with an affinity region in the kernel's affinity map. In some embodiments, a group becomes eligible to do work for a kernel once it has dispatched all of the work assigned to it (assigned via the affinity map).
[0162] In some embodiments, the work provider group is the group furthest back (with the largest number of pieces remaining to dispatch). When a group is eligible to receive work, it can lock onto the provider group. As shown, the primary kernel walker 1610 can send state information (e.g., affinity sub-kernel coordinate-based information) for synchronization of such recipient groups.
[0163] The group kernel walker for the provider (1620A in this example) generates and sends batches of workgroups to mGPUs in its corresponding group or to any mGPUs in the work demander group. The set of eligible mGPUs may be specified by an mGPU mask from the group walker 1620A, for example, so that the mGPU allocation circuit 650 can select from among the set of eligible mGPUs based on load balancing.
[0164] In some embodiments, once a donor group finishes dispatching its current portion (e.g., an affinity sub-kernel), the receiver is unlocked and a new donor can be selected, and the process can continue until the entire kernel has been dispatched. Kickslot manager circuit example
[0165] 19A is a block diagram illustrating an example kick slot manager, according to some embodiments. In the illustrated embodiment, the kick slot manager 350 implements a software interface and includes a register copy engine 1910 and a dependency tracking status circuit 1920 (e.g., a scoreboard). In the illustrated embodiment, the kick slot manager 350 communicates with a memory interface 1930, a control register interface 1940, and the primary control circuitry 210.
[0166] In some embodiments, kick slot manager 350 implements multiple "top slots" to which software can assign kicks. These top slots are also referred to herein as "tracking slots." Kick slot manager 350 can then handle software-specified dependencies between kicks, map kicks from the tracking slots to logical slots in primary control circuitry 210, track kick execution status, and provide status information to software. In some embodiments, a dedicated kick slot manager circuit may advantageously reduce kick-to-kick transition times compared to software-controlled implementations.
[0167] The register copy engine 1910, in some embodiments, is configured to obtain register data (e.g., for kick configuration registers) from memory via the memory interface 1930 and program the configuration registers via the interface 1940 for the kick. In some embodiments, the register copy engine 1910 is configured to prefetch the configuration register data into an internal buffer (not explicitly shown in FIG. 19A ) before allocating shader resources for the kick. This may, in various embodiments, reduce kick-to-kick transition time when starting a new kick. The register copy engine 1910 can access control register data via the memory interface 1930 and can write to control registers via the control register interface 1940.
[0168] In some embodiments, the register copy engine 1910 is configured to prefetch data for kicks in priority and may not wait for the first requested register data to be retrieved before requesting additional data (which may absorb memory latency associated with reading register data). In some embodiments, the register copy engine 1910 supports masked broadcast register programming, e.g., based on an mGPU mask, so that the appropriate distribution slots are programmed. In some embodiments, the register copy engine 1910 can be used to program control registers to offload work from the primary firmware processor.
[0169] In some embodiments, the kick slot manager 350 is configured to schedule the kick and send work allocation information to the primary control circuitry 210 prior to programming of all configuration registers for the kick. In general, the initial kick scheduling may be pipelined. This may include setup phase register programming, the primary control circuitry identifying distributed slots, the register copy engine 1910 programming the control registers in parallel with the primary control circuitry queuing the work, and the queued work starting after the final control register is written. This allows downstream circuitry to receive and queue work allocations and begin processing as soon as the configuration registers are written, further reducing transition time from kick to kick in some embodiments. Notably, this may save latency associated with multiple control bus traversals versus waiting to queue work until all control registers are programmed.
[0170] The dependency tracking and status circuit 1920 can store information received from software and provide status information to the software via a software interface, as described in more detail below. In some embodiments, tracking slots are shared by multiple types of primary control circuits (e.g., computational, pixel, and vertex control circuits). In other embodiments, particular tracking slots may be reserved for particular types of primary control circuits.
[0171] 19B is a diagram illustrating exemplary tracking and status data for each tracking slot, according to some embodiments. In the illustrated embodiment, the circuit 1920 maintains the following information for each tracking slot: identifier, status, data identification, dependencies, execution data, and configuration. Each of these example fields is described in detail below. In some embodiments, the status and execution data fields are software read-only, while the other fields are software configurable.
[0172] Each tracking slot may be assigned a unique ID. Thus, the kick slot manager 350 may support a maximum number of tracking slots. In various embodiments, the number of supported tracking slots may be selected such that it is fairly rare that non-dependent kicks small enough to use all available tracking slots can be scheduled in parallel. In some embodiments, the number of supported tracking slots is greater than the number of supported logical slots.
[0173] The status field, in some embodiments, indicates the current state of the slot and whether the slot is valid. This field may also indicate the logical slot and any distributed slots assigned to the tracked slot, if applicable. In some embodiments, the status field supports the following status values: empty, programming complete, register fetch start, waiting for parent, waiting for resource, waiting for distributed slot, running, request stopped, deallocated, dequeue by kick slot manager, dequeue by primary control circuitry, save context, and done. In other embodiments, the status field may support other states, a subset of the described states, or the like. Exemplary states are described in more detail below with reference to the state machine of FIG. 21.
[0174] The data identification field, in some embodiments, indicates the location of the control register data for the kick. This may be specified as, for example, an initial register address and some configuration registers. It may also include a register context identifier. In some embodiments, the data identification field also indicates other resources used by the kick, such as a sampler or memory aperture. Some of these resources may be hard resources, such that the kick cannot proceed until they are available, while other resources may be soft resources, and the kick may proceed without them or with only some of the requested resources in some circumstances. As an example, memory apertures may be considered soft resources, and the kick may be allowed to proceed (potentially with a notification sent to the requesting software) even if those soft resources are not available.
[0175] The dependency field, in some embodiments, indicates any dependency of the slot on kicks in other slots. As an example, the circuit 1920 may implement an N×N matrix (where N is the number of tracking slots), where each slot includes an entry for each other slot indicating whether the slot depends on the other slot. The entry may be cleared when the kick from the other slot is completed. In other embodiments, other techniques may be used to encode the dependency. The kick slot manager 350 may assign tracking slots to logical slots according to the indicated dependency (e.g., by waiting to assign a kick to a logical slot until all tracking slots on which the kick depends are completed). Moving dependency tracking from software / firmware control to dedicated hardware may enable more efficient use of logical slots and may reduce kick-to-kick transitions.
[0176] The execution data field, in some embodiments, provides information regarding the execution status of the kick. For example, this field can provide a timestamp for assigning the kick to a logical slot when it starts executing on the distributed slot and when it finishes. Various other performance or debug information can be indicated as well. In some embodiments, various tracking slot information is retained for slots with the retain field set, and their mapped hardware resources are not released either (potentially allowing access to status registers at the logical slot level, the distributed slot level, or both).
[0177] The configuration field, in some embodiments, indicates the type of primary control circuitry controlling the slot (e.g., compute, pixel, or vertex), the priority of the slot, a hold slot indication, a kill on kick interrupt indication, or any combination thereof. This configuration field can be programmable by software, for example, to indicate the configuration of the slot, and can provide specific software override information. Kernel interrupt termination can be set globally, or can be set to trigger on every kick (or to trigger after a threshold number of kicks). This can advantageously reduce firmware time spent handling interrupts (by omitting interrupts in certain circumstances), while still preserving interrupt functionality when needed.
[0178] In various embodiments, the disclosed tracking circuitry may enable software to process several kicks in parallel (e.g., with the ability to start, stop, query, and modify the execution of these kicks).
[0179] 20 is a diagram illustrating an exemplary register prefetch buffer configuration, according to some embodiments. In the illustrated embodiment, the registers are organized by type (e.g., in this example, all the setup registers are at the beginning of the buffer and the execution registers are at the end of the buffer). Generally speaking, the setup registers are used to configure the kick before it begins, and the execution registers are used for the distributed execution of the kick. In the illustrated embodiment, the buffer indicates the offset in the configuration register space where the register is located and its payload.
[0180] This organization of prefetched register data may advantageously allow overriding of previous registers, for example, for kick-to-kick buffer reuse, while still allowing new registers to be saved at the beginning or end of a block of registers of a given type. In various embodiments, two or more different types of registers may be grouped together by type to facilitate such techniques. In some embodiments, the register prefetch buffer is SRAM. In other embodiments, the register prefetch buffer is a cache, and entries may be evicted (e.g., according to a least-recently-used algorithm or another suitable eviction algorithm) if additional space is needed.
[0181] FIG. 21 is a state machine diagram illustrating exemplary kick slot manager states, according to some embodiments. From the Empty state 2110, the control circuitry is configured to enable the slot in order to allocate it for a kick. When the slot's data has been programmed (e.g., dependencies and configurations described above with reference to FIG. 19B), the state transitions to a "programming complete" state 2112. After the register copy engine 1910 accepts the fetch request, the state transitions to register fetch start 2114 (note that in the illustrated embodiment, this is a prefetch before allocating resources to the tracked slot). After the register copy engine 1910 indicates that the fetch is complete, the state transitions to a "waiting for parent" state 2116. When all dependencies are satisfied for the tracked slot, the state transitions to a "waiting for resources" state 2118.
[0182] As shown, if a stop is requested in any of states 2110-2118, the state transitions to "dequeue from KSM" 2126. When the slot is reset, the state transitions back to empty state 2110. Note that state 2116 may require substantially fewer deallocation operations than the other stop states described in more detail below, for example, because resources have not yet been allocated to the slot.
[0183] Once the resources are allocated, the state transitions to "waiting for dSlot state" 2120 and the KSM waits for a control response (e.g. from the primary control circuit) at 2124. Once the dSlot(s) are allocated, the state transitions to running state 2122. If a stop is requested in these states (as shown at 2128), the KSM waits for a control response at 2130. If a kick is made after a stop request or from the running state 2122, the slots are deallocated at 2132 and the kick is completed at 2138.
[0184] If a pause is requested in states 2120 or 2122 and the control response 2130 indicates the logical slot is stored, the state transitions to deallocate state 2134 and waits for the context to be stored at 2140 before resetting the slot. If the control response at 2130 indicates dequeue, the state transitions to deallocate 2136 and then to “dequeue from primary control circuit” 2142 before resetting the slot (this may be a more graceful dequeue that does not require a context store of the logical slot for states 2134 and 2140). Generally speaking, the disclosed techniques may advantageously enable the primary control circuit to pause scheduling of work at multiple levels and enable firmware to interact with hardware in a safe manner.
[0185] When a slot is reset from states 2138, 2140, or 2142, the kick slot manager determines if the hold field is set, and if not, returns to the empty state 2110. If the hold field is set, the KSM waits for the allocated logical slot to be deallocated (e.g., based on software control) at 2148. Generally speaking, tracking slots may be recycled automatically unless explicitly held.
[0186] As mentioned above, the dependency tracking and status circuit 1920 can provide the software with the current state of each slot.
[0187] In some embodiments, kick slot manager 350 is scalable across multiple GPU sizes, for example, by allowing variation in the number of tracked slots supported. The disclosed dynamic hierarchical scheduling of tracked slots (by firmware or software), then logical slots (by primary control circuitry), then distributed slots may advantageously provide efficient distribution with distributed scheduling intelligence across hierarchical levels.
[0188] In some embodiments, the kick slot manager 350 is configured to perform one or more power control operations based on the tracking slot. For example, the control circuitry may reduce the power state of one or more circuits (e.g., by clock gating, power gating, etc.). In some embodiments with a large number of tracking slots, the control circuitry may reduce the power state of other circuits even when the other circuits have work queued in a tracking slot. For example, the control circuitry may reduce the power state of the pixel data master even if it has a kick in the tracking slot.
[0189] In some embodiments, the first action for a scheduled tracking slot is to increase the power state of any associated circuitry if it is in a lower power state than desired. For example, the control circuitry may initiate a pixel kick by writing to a power-up register for the pixel data master. Generally speaking, the device may power-gate various types of logic (e.g., caches, filtering logic, ray tracing circuitry, etc.) and power those logic blocks when the tracking slot will use that logic. In some embodiments, the kick slot manager 350 maintains one or more flags for each tracking slot that indicate whether the kick assigned to the tracking slot uses one or more types of circuitry. The kick slot manager 350 may cause these types of circuits to meet the required power state in response to scheduling these tracking slots. Exemplary Methods
[0190] 22 is a flow diagram illustrating an exemplary method for distributing graphics work using logical slots, according to some embodiments. The method illustrated in FIG. 22 may be used with, among other things, any of the computer circuits, systems, devices, elements, or components disclosed herein. In various embodiments, some of the method elements illustrated may be performed simultaneously, in a different order than that illustrated, or may be omitted. Additional method elements may be performed as desired.
[0191] At 2210, in the illustrated embodiment, the control circuitry allocates first and second sets of graphics work to first and second logical slots. In some embodiments, the circuitry implements a plurality of logical slots, and the sets of graphics processor subunits each implement a plurality of distributed hardware slots. In some embodiments, the graphics processor subunits are organized into a plurality of groups of subunits, and subunits within the same group share a cache. In some embodiments, the subunits of a given group are implemented on the same physical die. In some embodiments, the subunits include separate fragment generation circuitry, shader core circuitry, memory system circuitry including a data cache and memory management unit, geometry processing circuitry, and distributed work load distribution circuitry. In some embodiments, the distributed hardware slots each include a configuration register, a batch queue circuit, and a batch iteration circuit. In various embodiments, the shader circuitry in the subunits is configured to receive and execute work from the plurality of distributed hardware slots.
[0192] The statement "a set of graphics processor subunits each implementing a plurality of distributed hardware slots" means that the set of graphics processor subunits includes at least two subunits, each of which implements a plurality of distributed hardware slots. In some embodiments, the device may have additional graphics processor subunits (not in the set) that do not necessarily implement a plurality of distributed hardware slots. Thus, the phrase "a set of graphics processor subunits each implementing a plurality of distributed hardware slots" should not be interpreted as meaning that in all cases, all subunits in the device implement a plurality of distributed hardware slots, but merely provides the possibility that in some cases this is the case and in other cases this is not the case. A similar interpretation is intended for other statements herein that use the term "each."
[0193] At 2220, in the illustrated embodiment, the control circuitry determines a distribution rule for a first set of graphics work indicating distribution to all of the graphics processor subunits in the set.
[0194] At 2230, in the illustrated embodiment, the control circuitry determines a distribution rule for the second set of graphics work that indicates distribution across fewer than all of the graphics processor subunits in the set. In some embodiments, the distribution rule determined for the second set of graphics work indicates distribution of the first set of graphics work across a single group of subunits. Alternatively, the distribution rule determined for the second set of graphics work may indicate distribution of the second set of graphics work across a single subunit.
[0195] The control circuitry may select the first and second distribution rules based on the amount of work in the first and second sets of graphics work. The control circuitry may determine the first distribution rule based on one or more software overrides signaled by the graphics program being executed. These may include any suitable combination of the following types of exemplary software overrides: mask information indicating which subunits are available for the first work set, a specified distribution rule, group information indicating a group of subunits to which the first work set should be spread, and policy information indicating a scheduling policy. In some embodiments, the control circuitry determines respective retention values for slots of the plurality of logical slots, the retention values indicating a status of the kernel for the logical slots. The control circuitry may enable a logical slot with a first priority level to reuse a hardware slot assigned to a logical slot with a second, lower priority level based on one or more of the respective retention values.
[0196] The first and second sets of graphics work may be kicks. The first and second sets of graphics work may be computational kernels in the same kick or different kicks. Thus, in some embodiments, the first set of graphics work is a first kernel of a computational kick assigned to a first logical slot, the computational kick including at least one other kernel, and the apparatus is configured to select a different distribution rule for the at least one other kernel than the first kernel.
[0197] At 2240, in the illustrated embodiment, the control circuitry determines a mapping between the first logical slot and a first set of one or more distributed hardware slots based on the first distribution rule.
[0198] At 2250, in the illustrated embodiment, the control circuitry determines a mapping between the second logical slot and a second set of one or more distributed hardware slots based on the second distribution rule.
[0199] At 2260, in the illustrated embodiment, the control circuit distributes the first and second sets of graphics work to one or more of the graphics processor subunits in accordance with the determined mapping.
[0200] In some embodiments, the control circuitry for the logical slots includes a control stream processor (e.g., CSP 630) configured to determine first and second distribution rules, a kernel processor (e.g., circuit 640) configured to generate batches of computational workgroups, and a subunit allocation circuit (e.g., circuit 650) configured to allocate the batches of computational workgroups to the subunits. In some embodiments, the control circuitry includes a hardware slot resource allocator circuit (e.g., circuit 620) configured to allocate hardware slots to control the stream processors based on the indicated distribution rules, and a logical slot arbiter circuit (e.g., circuit 660) configured to arbitrate between batches from different logical slots for distribution to the assigned subunits. In some embodiments, the hardware slot resource allocator circuit is configured to allocate hardware slots based on the state of the hardware slots. The states of the different hardware slots may include at least, for example, invalid, running, empty, and flushed.
[0201] In some embodiments, the device is configured to perform multiple types of cache flush invalidation operations, which may include a first type of cache flush invalidation operation that flushes and invalidates caches only for one or more subunits to which a kernel is assigned, and an unconditional type of cache flush invalidation operation that flushes and invalidates all caches for a set of graphics processor subunits at one or more cache levels.
[0202] 23 is a flow diagram illustrating an exemplary method for prioritizing logical slots, according to some embodiments. The method illustrated in FIG. 23 may be used with, among other things, any of the computer circuits, systems, devices, elements, or components disclosed herein. In various embodiments, some of the illustrated method elements may be performed simultaneously, in a different order than that illustrated, or may be omitted. Additional method elements may be performed as desired.
[0203] At 2310, in the illustrated embodiment, the control circuitry receives a first set of software specified graphics work and software directed priority information for the first set of graphics work.
[0204] At 2320, in the illustrated embodiment, the control circuitry assigns a first set of graphics work to a first logical slot of a plurality of logical slots implemented by the device.
[0205] At 2330, in the illustrated embodiment, the control circuitry determines a mapping between logical slots and distributed hardware slots implemented by the graphics subunits of the device, the mapping reserving a threshold number of hardware slots in each subunit for logical slots whose priority is above a threshold priority level. In some embodiments, a first subset of the logical slots are high priority slots and the remaining logical slots are low priority slots. In these embodiments, the control circuitry may assign a first set of graphics work to a first logical slot based on software-directed priority information. In other embodiments, priority may be encoded and tracked using a variety of other techniques.
[0206] At 2340, in the illustrated embodiment, the control circuit distributes the first set of graphics work to one or more of the graphics processor subunits according to one of the mappings.
[0207] In some embodiments, the control circuitry (e.g., a distributed slot resource allocator circuitry) is configured to perform a reclamation procedure that enables a logical slot having a first software-directed priority level to reuse a hardware slot that was assigned to a logical slot having a second, lower priority level.
[0208] In some embodiments, based on a software input (e.g., a hold slot command) for the first set of graphics work, the control circuitry is configured to maintain the mapping of the distributed hardware slot for the first logical slot after completion of processing for the first set of graphics work. In some embodiments, the control circuitry assigns the mapped distributed hardware slot for the first set of graphics work to another logical slot only after a software input indicating to release the mapped distributed slot.
[0209] In some embodiments, the control circuitry provides status information for the first set of graphics work to the software. The control circuitry may support various status states, including, but not limited to, waiting for dependencies, waiting for configuration data for the first set of graphics work, waiting for allocated distributed slots, waiting for hardware resources, empty, programming complete, waiting for logical slots, deallocated, and stored context. The status information may, for example, identify the first logical slot, identify the allocated distributed hardware slot, or indicate timestamp information associated with the execution of the first set of graphics work.
[0210] The control circuitry can support various software control or override functions in addition to or in lieu of the priority information, including, but not limited to, specified distribution rules indicating whether to distribute to only a portion of the graphics processor subunits in the set or to all of the graphics processor subunits in the set, group information indicating groups of subunits to which the first set of graphics work should be spread, mask information indicating which subunits are available for the first set of graphics work, and policy information indicating a scheduling policy.
[0211] In some embodiments, the device includes a control stream processor circuit configured to determine a distribution rule for the mapping, and a distribution slot resource allocator circuit configured to determine the mapping based on software input, the determined distribution rule from the control stream processor circuit, and distribution slot state information.
[0212] 24 is a flow diagram illustrating an exemplary method for affinity-based scheduling, according to some embodiments. The method illustrated in FIG. 24 can be used with, among other things, any of the computer circuits, systems, devices, elements, or components disclosed herein. In various embodiments, some of the illustrated method elements may be performed simultaneously, in a different order than that illustrated, or may be omitted. Additional method elements may be performed as desired.
[0213] At 2410, in the illustrated embodiment, a control circuit (e.g., a kernel walker circuit) receives a software specified set of graphics work (e.g., a compute kernel) and a software directed mapping of portions of the set of graphics work to groups of graphics processor subunits. A first group of subunits may share a first cache, and a second group of subunits may share a second cache. Note that the mapping may or may not identify a particular group of graphics subunits. Rather, the mapping may specify that multiple portions of a compute kernel should be assigned to the same group of graphics processor subunits, but allow hardware to determine which group of graphics processor subunits to actually assign.
[0214] At 2420, in the illustrated embodiment, the control circuitry assigns a first subset of the set of graphics work to a first group of graphics subunits and assigns a second subset of the set of graphics work to a second group of graphics subunits based on the mapping.
[0215] The control circuitry may be configured to store, in a configuration register, a plurality of mappings of portions of a set of graphics work to groups of graphics processor subunits.
[0216] The kernel walker circuit may include a primary kernel walker circuit (e.g., element 1610 of FIG. 16 ) configured to determine a portion of the compute kernel, a first group walker circuit (e.g., element 1620 of FIG. 16 ) configured to iterate through the portion of the compute kernel assigned to the first group of graphics subunits to determine a batch of workgroups, and a second group walker circuit configured to iterate through the portion of the compute kernel assigned to the second group of graphics subunits to determine a batch of workgroups. The kernel walker circuit may further include a group walker arbitration circuit (e.g., element 1630 of FIG. 16 ) configured to select among the batches of workgroups determined by the first and second group walker circuits, and a subunit allocation circuit (e.g., mGPU allocation circuit 650) configured to allocate the batch selected by the group walker arbitration circuit to one or more graphics subunits in the group of subunits corresponding to the selected group walker circuit.
[0217] In some embodiments, the device includes work sharing control circuitry configured to determine a set of one or more other groups of subunits that have dispatched all of their assigned portions for the computation kernel, and to assign at least a first portion of the computation kernel indicated by the mapping as targeting the first group of subunits to a group of the one or more other groups of subunits.
[0218] In some embodiments, the control circuitry disables affinity-based work distribution in one or more operating modes. The control circuitry may support mapping of portions of a compute kernel to groups of graphics processor subunit affinity maps for compute kernels of multiple dimensions, including one-dimensional kernels, two-dimensional kernels, and three-dimensional kernels.
[0219] In some embodiments, a non-transitory computer-readable medium having instructions executable by a computing device stored thereon performs operations including receiving a compute kernel and a corresponding mapping of portions of the compute kernel to groups of graphics processor subunits, where the compute kernel and the mapping are specified by the instructions, where the mapping indicates cache affinity for a set of portions of the compute kernel mapped to a given group of graphics processor subunits, and assigning a first subset of the compute kernel to the first group of graphics subunits and a second subset of the compute kernel to the second group of graphics subunits based on the mapping.
[0220] 25 is a flow diagram illustrating an exemplary method for kick slot manager operation, according to some embodiments. The method illustrated in FIG. 25 may be used with, among other things, any of the computer circuits, systems, devices, elements or components disclosed herein. In various embodiments, some of the illustrated method elements may be performed simultaneously, in a different order than that illustrated, or may be omitted. Additional method elements may be performed as desired.
[0221] At 2510, in the illustrated embodiment, the control circuitry (e.g., slot manager circuitry) uses entries in the tracking slot circuitry to store software-specified information for a set of graphics work, the information including the type of work, dependencies on other sets of graphics work, and the location of the data for the set of graphics work.
[0222] In some embodiments, the track slot circuitry is software accessible to query various information associated with the set of graphics work. This may include, for example, a status for the set of graphics work, timestamp information associated with the execution of the set of graphics work, information indicative of a logical primary slot, and information indicative of one or more distributed hardware slots. In some embodiments, the track slot circuitry supports status values indicative of at least the following status conditions for the set of graphics work: empty, register fetch started, waiting for one or more other sets of graphics work, waiting for logical slot resources, waiting for distributed hardware slot resources, and running.
[0223] At 2520, in the illustrated embodiment, the control circuitry prefetches configuration register data for the set of graphics work from the location prior to allocating shader core resources for the set of graphics work. Note that the prefetching may occur after configuration of a tracking slot for the set of graphics work, but before the control circuitry decides to initiate the set of graphics work (e.g., before all of its dependencies are satisfied). The control circuitry may utilize various criteria for determining when to initiate the prefetching. The prefetching may be performed from a shared memory (which may be shared among multiple instances of the control circuitry, shared with non-GPU processors, or both) to an SRAM memory element of the slot manager circuitry.
[0224] In some embodiments, the control circuitry transmits the portion of the set of graphics work to a hardware slot assigned to the set of graphics work prior to completion of programming of the configuration registers, and the hardware slot may include queuing circuitry for the received portion of the set of graphics work.
[0225] At 2530, in the illustrated embodiment, the control circuitry uses the prefetched data to program configuration registers for the set of graphics work. The configuration registers may specify properties of the set of graphics work, locations of data for the set of graphics work, parameters for processing the set of graphics work, etc. The configuration registers may be different from the data registers that store the data to be processed by the set of graphics work.
[0226] At 2540, in the illustrated embodiment, the control circuitry initiates processing of the set of graphics work by the graphics processor circuitry according to the dependencies. The control circuitry may assign the set of graphics work to a logical primary slot (at least a portion of the configuration register data may be for the configuration registers of the logical primary slot) and may assign the logical slot to one or more distributed hardware slots (at least a portion of the configuration register data may be for the configuration registers of the one or more distributed hardware slots).
[0227] In some embodiments, the control circuitry is configured to initiate a set of graphics work from an entry in the tracking slot circuitry and, based on information about the set of graphics work, initiate an increase from a low power mode to a high power mode for one or more circuits associated with the set of graphics work.
[0228] In some embodiments, the graphics instruction specifies storing information about the set of graphics work (e.g., indicating the type of work, dependencies on other sets of graphics work, and location of data for the set of graphics work) and queries the tracking slot circuitry to determine status information about the set of graphics work (e.g., status from among empty, register fetch start, waiting for one or more other sets of graphics work, waiting for logical slot resources, waiting for distributed hardware slot resources, and running, timestamp information associated with execution of the set of graphics work, information indicating the assigned logical primary slot, and information indicating the assigned distributed hardware slot).
[0229] In some embodiments, in response to a stop command for the set of graphics work, the control circuitry is configured to perform different operations depending on the current status of the tracking slots. For example, the control circuitry may reset an entry in the tracking slots circuitry in response to a determination that the logical primary slot is not assigned. As another example, the control circuitry may deallocate the logical primary slot and reset an entry in the tracking slots circuitry in response to a determination that the logical primary slot is assigned. As yet another example, the control circuitry may perform one or more context switch operations to deallocate one or more distributed hardware slots, deallocate the logical primary slot, and reset an entry in the tracking slots circuitry in response to a determination that one or more distributed hardware slots are assigned. Exemplary Devices
[0230] 26, a block diagram illustrating an example embodiment of a device 2600 is shown. In some embodiments, elements of device 2600 may be included within a system-on-chip. In some embodiments, device 2600 may be included in a mobile device that may be battery powered. Thus, power consumption by device 2600 may be an important design consideration. In the illustrated embodiment, device 2600 includes fabric 2610, compute complex 2620, input / output (I / O) bridge 2650, cache / memory controller 2645, graphics unit 2675, and display unit 2665. In some embodiments, in addition to or instead of the illustrated components, device 2600 may include other components (not shown), such as video processor encoders and decoders, image processing or recognition elements, computer vision elements, etc.
[0231] Fabric 2610 may include various interconnects, buses, MUXes, controllers, etc., and may be configured to facilitate communication between various elements of device 2600. In some embodiments, portions of fabric 2610 may be configured to implement a variety of different communication protocols. In other embodiments, fabric 2610 may implement a single communication protocol, and elements coupled to fabric 2610 may internally convert from one communication protocol to other communication protocols.
[0232] In the illustrated embodiment, compute complex 2620 includes a bus interface unit (BIU) 2625, a cache 2630, and cores 2635 and 2640. In various embodiments, compute complex 2620 may include various numbers of processors, processor cores, and caches. For example, compute complex 2620 may include one, two, or four processor cores, or any other suitable number. In one embodiment, cache 2630 is a set associative L2 cache. In some embodiments, cores 2635 and 2640 may include internal instruction and / or data caches. In some embodiments, a coherency unit (not shown) in fabric 2610, cache 2630, or elsewhere in device 2600 may be configured to maintain coherency between various caches of device 2600. BIU 2625 may be configured to manage communications between compute complex 2620 and other elements of device 2600. A processor core, such as core 2635 and core 2640, may be configured to execute instructions of a particular instruction set architecture (ISA), which may include operating system instructions and user application instructions.
[0233] Cache / memory controller 2645 may be configured to manage the transfer of data between fabric 2610 and one or more caches and / or memories. For example, cache / memory controller 2645 may be coupled to an L3 cache, which may in turn be coupled to system memory. In other embodiments, cache / memory controller 2645 may be directly coupled to memory. In some embodiments, cache / memory controller 2645 may include one or more internal caches.
[0234] As used herein, the term "coupled" can refer to one or more connections between elements, and the coupling may include intervening elements. For example, in FIG. 26, graphics unit 2675 may be described as "coupled" to memory via fabric 2610 and cache / memory controller 2645. In contrast, in the illustrated embodiment of FIG. 26, graphics unit 2675 is "directly coupled" to fabric 2610, as there are no intervening elements.
[0235] The graphics unit 2675 may include one or more processors, such as one or more graphics processing units (GPUs). The graphics unit 2675 may receive graphics-oriented instructions, such as, for example, OPENGL®, Metal, or DIRECT3D® instructions. The graphics unit 2675 may execute specialized GPU instructions or perform other operations based on the received graphics-oriented instructions. The graphics unit 2675 may generally be configured to process large blocks of data in parallel and may build images in a frame buffer for output to a display, which may be included in the device or may be a separate device. The graphics unit 2675 may include transform, lighting, triangle, and rendering engines in one or more graphics processing pipelines. The graphics unit 2675 may output pixel information for a display image. In various embodiments, the graphics unit 2675 may include programmable shader circuitry that may include highly parallel execution cores configured to execute graphics programs, which may include pixel tasks, vertex tasks, and computation tasks (which may or may not be graphics-related).
[0236] In some embodiments, the graphics unit 2675 includes various disclosed circuits that implement tracking slots, logical slots, distributed hardware slots, and the like.
[0237] The display unit 2665 may be configured to read data from the frame buffer and provide a stream of pixel values for display. The display unit 2665, in some embodiments, may be configured as a display pipeline. In addition, the display unit 2665 may be configured to blend multiple frames to generate an output frame. Furthermore, the display unit 2665 may include one or more interfaces (e.g., MIPI or embedded display port (eDP)) for coupling to a user display (e.g., a touch screen or an external display).
[0238] I / O bridge 2650 may include various elements configured to implement, for example, Universal Serial Bus (USB) communications, security, audio, and / or low power always-on functionality. I / O bridge 2650 may also include interfaces such as, for example, Pulse Width Modulation (PWM), General Purpose Input / Output (GPIO), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C). Various types of peripherals and devices may be coupled to device 2600 via I / O bridge 2650.
[0239] In some embodiments, device 2600 includes network interface circuitry (not explicitly shown) that may be connected to fabric 2610 or I / O bridge 2650. The network interface circuitry may be configured to communicate over various networks, which may be wired, wireless, or both. For example, the network interface circuitry may be configured to communicate over a wired local area network, a wireless local area network (e.g., via WiFi), or a wide area network (e.g., the Internet or a virtual private network). In some embodiments, the network interface circuitry is configured to communicate over one or more cellular networks using one or more radio access technologies. In some embodiments, the network interface circuitry is configured to communicate using device-to-device communication (e.g., Bluetooth or WiFi Direct), or the like. In various embodiments, the network interface circuitry may provide device 2600 with connectivity to various types of other devices and networks. Example Applications
[0240] 27, various types of systems are shown that may include any of the circuits, devices, or systems described above. Systems or devices 2700 that incorporate or otherwise utilize one or more of the techniques described herein may be utilized in a wide range of areas. For example, a system or device 2700 may be utilized as a hardware part of a system such as a desktop computer 2710, a laptop computer 2720, a tablet computer 2730, a cellular or mobile phone 2740, or a television 2750 (or a set-top box coupled to a television).
[0241] Similarly, the disclosed elements may be utilized in a wearable device 2760 such as a smartwatch or health monitoring device. A smartwatch may implement a variety of different functions in many embodiments, such as access to email, cellular service, calendar, health monitoring, etc. A wearable device may also be designed to perform only health monitoring functions, such as monitoring a user's vital signs, performing epidemiological functions such as contact tracing, providing communications to emergency medical services, etc. Other types of devices are also contemplated, including devices worn around the neck, devices implantable in the human body, glasses or helmets designed to provide computer-generated reality experiences such as those based on augmented and / or virtual reality, etc.
[0242] The system or device 2700 may also be used in various other contexts. For example, the system or device 2700 may be utilized in the context of a server computer system, such as a dedicated server or shared hardware implementing a cloud-based service 2770. Additionally, the system or device 2700 may be implemented in a wide range of dedicated everyday devices, including devices 2780 commonly found in the home, such as refrigerators, thermostats, security cameras, etc. The interconnection of such devices is often referred to as the "Internet of Things" (IoT). Elements may also be implemented in various forms of transportation. For example, the system or device 2700 may be used in the control systems, guidance systems, entertainment systems, etc. of various types of vehicles 2790.
[0243] The applications shown in Figure 27 are merely examples and are not intended to limit potential future applications of the disclosed systems or devices. Other example applications include, but are not limited to, portable gaming devices, music players, data storage devices, unmanned aerial vehicles, etc. Exemplary Computer-Readable Medium
[0244] The present disclosure has described various exemplary circuits in more detail above. The present disclosure is intended to cover not only embodiments including such circuits, but also computer-readable storage media including design information specifying such circuits. Accordingly, the present disclosure is intended to support claims that cover not only apparatus including the disclosed circuits, but also storage media specifying the circuits in a format recognized by a manufacturing system configured to generate hardware (e.g., integrated circuits) including the disclosed circuits. Claims to such storage media are intended to cover entities that, for example, generate circuit designs but do not themselves manufacture the designs.
[0245] 28 is a block diagram illustrating an exemplary non-transitory computer-readable storage medium for storing circuit design information, according to some embodiments. In the illustrated embodiment, a semiconductor manufacturing system 2820 is configured to process design information 2815 stored on the non-transitory computer-readable medium 2810 and to manufacture an integrated circuit 2830 based on the design information 2815.
[0246] The non-transitory computer readable storage medium 2810 may include any of a variety of suitable types of memory or storage devices. The non-transitory computer readable storage medium 2810 may be an installation medium, such as a CD-ROM, a floppy disk or tape device, a computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, non-volatile memory such as flash, magnetic media, such as a hard drive, or optical storage device, registers, or other similar types of memory elements. The non-transitory computer readable storage medium 2810 may also include other types of non-transitory memory, or combinations thereof. The non-transitory computer readable storage medium 2810 may include two or more storage media that may be in different locations, such as different computer systems connected over a network.
[0247] The design information 2815 may be specified using any of a variety of suitable computer languages, including, but not limited to, hardware description languages such as VHDL, Verilog, SystemC, SystemVerilog, RHDL, M, MyHDL, etc. The design information 2815 may be usable by semiconductor manufacturing systems 2820 to manufacture at least a portion of the integrated circuit 2830. The format of the design information 2815 may be recognized by at least one semiconductor manufacturing system 2820. In some embodiments, the design information 2815 may also include one or more cell libraries that specify the synthesis, layout, or both of the integrated circuit 2830. In some embodiments, the design information is specified, in whole or in part, in the form of a netlist that specifies the cell library elements and their connectivity. The design information 2815, alone, may or may not include information sufficient for the manufacture of a corresponding integrated circuit. For example, the design information 2815 may specify the circuit elements to be manufactured, but not their physical layout. In this case, the design information 2815 may need to be combined with layout information to actually manufacture the specified circuit.
[0248] The integrated circuit 2830 may, in various embodiments, include one or more custom macrocells, such as memory, analog, or mixed-signal circuits. In such cases, the design information 2815 may include information related to the included macrocells. Such information may include, but is not limited to, a schematic capture database, mask design data, behavioral models, and device or transistor level netlists. As used herein, mask design data may be formatted according to Graphics Data System (GDSII), or any other suitable format.
[0249] Semiconductor fabrication system 2820 may include any of a variety of suitable elements configured to fabricate integrated circuits. This may include, for example, elements for depositing semiconductor material (e.g., on a wafer, which may include masking) and removing material, changing the shape of deposited material, modifying material (e.g., by doping the material or by changing the dielectric constant using ultraviolet treatment), etc. Semiconductor fabrication system 2820 may also be configured to perform various tests of the fabricated circuits for correct operation.
[0250] In various embodiments, the integrated circuit 2830 is configured to operate according to a circuit design specified by the design information 2815, which may include performing any of the functions described herein. For example, the integrated circuit 2830 may include any of the various elements shown in Figures 1B, 2-3, 6, 14B, 16, 18, 19A, and 26. Furthermore, the integrated circuit 2830 may be configured to perform various functions described herein in conjunction with other components. Furthermore, the functions described herein may be performed by multiple connected integrated circuits. Exemplary embodiments
[0251] The following numbered clauses refer to various non-limiting embodiments disclosed herein. Set A A1. An apparatus, a circuit implementing a plurality of logical slots; a set of graphics processor subunits, each of which implements a number of distributed hardware slots; A control circuit comprising: assigning first and second sets of graphics work to first and second logical slots; determining a first distribution rule for a first set of graphics work indicating that the graphics work is to be distributed among all of the graphics processor subunits in the set; determining a second distribution rule for a second set of graphics work indicating distributing the graphics work across fewer than all of the graphics processor subunits in the set; determining a mapping between the first logical slot and a first set of one or more distributed hardware slots based on a first distribution rule; determining a mapping between the second logical slot and a second set of one or more distributed hardware slots based on a second distribution rule; and control circuitry configured to distribute the first and second sets of graphics work to one or more of the graphics processor subunits in accordance with the determined mapping. A2. The graphics processor subunits are organized into groups of multiple subunits, and subunits in the same group share a cache, The second distribution rule indicates that the second set of graphic works is to be distributed into a single group of subunits, an apparatus of any preceding clause in set A. A3. An apparatus of any preceding clause in set A, wherein the subunits of a given group are implemented on the same physical die. A4. The apparatus of any preceding clause in set A, where the second distribution rule indicates that the second set of graphics works is distributed into a single subunit. A5. The apparatus of any preceding clause in set A, wherein the control circuitry is configured to select the first and second distribution rules based on the amount of work in the first and second sets of graphics work. A6. An apparatus of any preceding clause in set A, wherein the first set of graphics work is a first kernel of a computational kick assigned to a first logical slot, the computational kick including at least one other kernel, and the apparatus is configured to select a different distribution rule for the at least one other kernel than the first kernel. A7. The apparatus of any preceding clause in set A, wherein the control circuitry is configured to determine the first distribution rule based on one or more software overrides signaled by an executing graphics program. A8. The device supports the following types of software overrides: mask information indicating which sub-units are available for the first set of graphics works; A specified distribution rule; group information indicating a group of sub-units into which the first set of graphics works should be expanded; and a device of any preceding clause in set A configured to select a first distribution rule based on policy information indicative of a scheduling policy. A9. The graphics processor subunits are A fragment generation circuit; A shader core circuit; a memory system circuit including a data cache and a memory management unit; A geometry processing circuit; The apparatus of any preceding clause in set A, including a distributed work load balancing circuit. A10. Distributed hardware slots are A configuration register; A batch queue circuit; a batch iterative circuit, The apparatus of any preceding clause in set A, wherein shader circuitry in the subunit is configured to receive and execute work from the plurality of distributed hardware slots. A11. The control circuit for the logic slot is a control stream processor configured to determine first and second distribution rules; a kernel processor configured to generate batches of computational workgroups; a subunit allocation circuit configured to allocate batches of computational workgroups to the subunits; The control circuit includes: a hardware slot resource allocator circuit configured to allocate hardware slots for controlling the stream processors based on the indicated distribution rule; and a logical slot arbiter circuit configured to arbitrate between batches from different logical slots for distribution to the assigned subunits. A12. The apparatus of any of the preceding clauses in set A, wherein the hardware slot resource allocator circuit is configured to allocate hardware slots based on a state of the hardware slot, the different hardware slot states including at least disabled, running, empty, and flushed. A13. The device is a first type of cache flush-invalidation operation in which the kernel flushes and invalidates the cache only for one or more subunits assigned to it; and an unconditional type cache flush-invalidate operation that flushes and invalidates all caches for the set of graphics processor subunits at one or more cache levels. A14. The control circuit is determining a respective retention value for a slot of a plurality of logical slots, the retention value indicating a status of the kernel for the logical slot; The apparatus of any preceding clause in set A, further configured to: enable a logical slot having a first priority level to reuse a hardware slot assigned to a logical slot having a second, lower priority level based on one or more of the respective retention values. A15. The control circuit is The apparatus of any preceding clause in set A, further configured to: prior to completion of programming of the configuration register for the first logical slot, transmit a portion of the first set of graphics work to a distributed hardware slot assigned to the first set of graphics work, the distributed hardware slot including queuing circuitry for the received portion of the first set of graphics work. A16. A method comprising any combination of operations that the apparatus of any preceding clause in set A is configured to perform. A17. A non-transitory computer readable storage medium having stored thereon design information specifying a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor manufacturing system configured to use the design information to generate a circuit according to the design, the design information comprising: A non-transitory computer-readable storage medium that is specified to include any combination of the elements described in clauses A1 to A15. Set B B1. An apparatus comprising: a circuit implementing a plurality of logical slots; a set of graphics processor subunits, each of which implements a number of distributed hardware slots; A control circuit comprising: receiving a first set of software specified graphics work and software directed priority information for the first set of graphics work; assigning a first set of graphics work to a first logical slot; determining a mapping between logical slots and distributed hardware slots, the mapping reserving a threshold number of hardware slots in each subunit for logical slots whose priority exceeds a threshold priority level; and control circuitry configured to distribute a first set of graphics work to one or more of the graphics processor subunits according to one of the mappings. B2. Based on the software input for the first set of graphics work, a control circuit maintaining a mapping of distributed hardware slots for the first logical slot after completion of processing for the first set of graphics work; the apparatus of any preceding clause in set B, configured to assign the mapped distributed hardware slot for the first set of graphics work to another logical slot only after a software input indicating to release the mapped distributed slot. B3. The apparatus of any preceding clause in set B, wherein a first subset of the logical slots are high priority slots and the remaining logical slots are low priority slots, and the control circuitry is configured to assign a first set of graphics work to the first logical slots based on software directed priority information. B4. The apparatus of any preceding clause in set B, wherein the control circuitry is configured to provide software with status information for the first set of graphics works. B5. The control circuitry shall have at least the following status conditions: Waiting for dependencies, waiting for configuration data for a first set of graphics work; The device of any previous provision in set B supports waiting for allocation distribution slots and. B6. Status information is Identifying a first logical slot; Identifying the allocated distributed hardware slot; and timestamp information associated with execution of the first set of graphics works, and any preceding clause in set B. B7. The control circuitry supports the following types of software overrides: a specified distribution rule indicating whether to distribute across only a portion of the graphics processor subunits in the set or across all of the graphics processor subunits in the set; and The apparatus of any preceding clause in set B, configured to determine the mapping based on group information indicating a group of sub-units onto which the first set of graphics works is to be expanded. B8. The control circuitry supports the following additional types of software overrides: mask information indicating which sub-units are available for the first set of graphics works; and a device of any preceding clause in set B configured to determine the mapping based on policy information indicating a scheduling policy. B9. a control stream processor circuit configured to determine a distribution rule for the mapping; 1. A distributed slot resource allocator circuit, comprising: Software input; a determined distribution rule from a control stream processor circuit; The apparatus of any preceding clause in set B, further comprising: a distributed slot resource allocator circuit configured to determine the mapping based on the distributed slot state information. B10. The apparatus of any preceding clause in set B, wherein the distributed slot resource allocator circuit is configured to perform a reclamation procedure that allows logical slots having a first software-directed priority level to reclaim hardware slots assigned to logical slots having a second, lower priority level. B11. A method comprising any combination of operations that the apparatus of any preceding clause in set B is configured to perform. B12. A non-transitory computer-readable storage medium having stored thereon design information specifying a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor manufacturing system configured to use the design information to generate a circuit according to the design, the design information comprising: A non-transitory computer-readable storage medium that is specified to include any combination of the elements recited in clauses B1 to B10. Set C C1. An apparatus comprising: first and second groups of graphics processor subunits, the first group of subunits sharing a first cache and the second group of subunits sharing a second cache; 1. A distributed circuit comprising: receiving a software specified set of graphics work and a software directed mapping of portions of the set of graphics work to groups of graphics processor subunits; and a distribution circuit configured to assign a first subset of the set of graphics work to a first group of graphics subunits and to assign a second subset of the set of graphics work to a second group of graphics subunits based on the mapping. C2. The apparatus of any preceding clause in set C, including control circuitry configured to store, within a configuration register, a plurality of mappings of portions of a set of graphics work to groups of graphics processor subunits. C3. The set of graphics workpieces is the computation kernel of any of the preceding clauses in the set C. C4. Distributed circuits are a primary kernel walker circuit configured to determine a portion of a computation kernel; a first group walker circuit configured to iterate through the portion of the computation kernel assigned to the first group of graphics subunits to determine a batch of workgroups; and a second group walker circuit configured to iterate through the portion of the computation kernel assigned to the second group of graphics subunits to determine a batch of workgroups. C5. Distributed circuits are a group walker arbitration circuit configured to select among the batches of workgroups determined by the first and second group walker circuits; The apparatus of any preceding clause in set C, further including: a subunit allocation circuit configured to allocate the batch selected by the group walker arbitration circuit to one or more graphics subunits in the group of subunits corresponding to the selected group walker circuit. C6. A work sharing control circuit, determining a set of one or more other groups of subunits that have dispatched all of their allocated portions for the set of graphics work; The apparatus of any preceding clause in set C, further including work sharing circuitry configured to allocate at least a first portion of the set of graphics work indicated by the mapping as targeted to the first group of sub-units to one of the one or more other groups of sub-units. C7. The apparatus of any preceding clause in set C, wherein the apparatus supports mapping of a portion of a set of graphics work to a group of graphics processor subunit affinity maps for multiple dimensions, including one dimension, two dimensions, and three dimensions. C8. a circuit for implementing a plurality of logical slots, wherein the sets of subunits in the first and second groups each implement a plurality of distributed hardware slots; A control circuit comprising: assigning a set of graphics work to a first logical slot; determining distribution rules for the set of graphics work indicating whether the graphics work is to be distributed across all of the graphics processor subunits in the set or across only a portion of the graphics processor subunits; The apparatus of any preceding clause in set C, further comprising control circuitry configured to determine a mapping between the first logical slot and a respective set of one or more distributed hardware slots based on the distribution rules and based on a mapping of portions of the set of graphics work to groups of graphics processor subunits. C9. A non-transitory computer-readable medium having stored thereon instructions executable by a computing device, A set of graphic works, receiving a corresponding mapping of portions of the set of graphics work to groups of graphics processor subunits, the set of graphics work and the mapping specified by an instruction, the mapping indicating cache affinity for the set of portions of the set of graphics work mapped to a given group of graphics processor subunits; and assigning a first subset of the set of graphics works to a first group of graphics subunits based on the mapping and a second subset of the set of graphics works to a second group of graphics subunits. C10. The non-transitory computer-readable medium of any preceding clause in set C, wherein the operations further include disabling affinity-based work distribution in one or more operating modes. C11. The non-transitory computer-readable medium of any preceding clause in set C, wherein the operation includes assigning a subset of the set of graphics works to a group of graphics subunits based on a plurality of different mappings, the plurality of different mappings including a mapping for at least two dimensions of the set of graphics works. C12. The non-transitory computer-readable medium of any preceding clause in set C, wherein the computing device includes a graphics circuit that implements a plurality of logical slots, and wherein subunits in the first and second groups each implement a plurality of distributed hardware slots, and the operations further include specifying one or more software overrides to at least partially control a mapping between the logical slots and a respective set of the one or more distributed hardware slots for a set of graphics work. C13. One or more software overrides mask information indicating which subunits are available for a set of graphics works; A specified dispersion rule indicating the dispersion width; group information indicating a group of sub-units into which the set of graphics works should be expanded; and policy information indicating a scheduling policy. C14. A method comprising any combination of the actions of any of the preceding clauses in set C. C15. A non-transitory computer-readable storage medium having stored thereon design information specifying a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor manufacturing system configured to use the design information to generate a circuit according to the design, the design information comprising: A non-transitory computer-readable storage medium that is specified to include any combination of the elements described in clauses C1 to C8. Set D D1. An apparatus comprising: A graphics processor circuit; a trace slot circuit that implements a plurality of trace slot entries; A slot manager circuit, comprising: storing, using entries in the tracking slot circuitry, software-specified information for a set of graphics work, the information including a type of work, dependencies on other sets of graphics work, and a location of data for the set of graphics work; a slot manager circuit configured to prefetch configuration register data for the set of graphics work from a location prior to allocating shader core resources for the set of graphics work; A control circuit comprising: programming program configuration registers for a set of graphics work pieces using the prefetched data; An apparatus comprising: a control circuit configured to initiate processing of a set of graphics work by a graphics processor circuit according to a dependency relationship. D2. The control circuit is The apparatus of any preceding clause in set D, further configured to transmit, before the programming of the configuration register is completed, a portion of the set of graphics work to a hardware slot assigned to the set of graphics work, the hardware slot including queuing circuitry for the received portion of the set of graphics work. D3. The control circuit is assigning a set of graphics work to a logical primary slot, where at least a portion of the configuration register data is for a configuration register of the logical primary slot; The apparatus of any preceding clause in set D, configured to perform: assigning logical slots to one or more distributed hardware slots, where at least a portion of the configuration register data is for configuration registers of the one or more distributed hardware slots. D4. In response to a stop command for a set of graphics work, the slot manager circuit resetting an entry in the tracking slot circuit in response to determining that the logical primary slot is unassigned; in response to determining that the logical primary slot has been allocated, deallocating the logical primary slot and resetting the entry in the tracking slot circuit; The apparatus of any preceding clause in set D, configured to: in response to determining that the one or more distributed hardware slots are allocated, perform one or more context switch operations to deallocate the one or more distributed hardware slots, deallocate the logical primary slots, and reset entries in the tracking slot circuitry. D5. Entries in the tracking slot circuit are The status of the set of graphics work, timestamp information associated with the execution of a set of graphics work; information indicating a logical primary slot; The device of any preceding clause in set D, wherein the device is software accessible to query information indicative of one or more distributed hardware slots. D6. The apparatus of any preceding clause in set D, wherein the tracking slot circuitry supports status values indicating at least the following status states for the set of graphics work: empty, register fetch started, waiting for one or more other sets of graphics work, waiting for logical slot resources, waiting for distributed hardware slot resources, and running. D7. The apparatus of any preceding clause in set D, wherein the slot manager circuit is configured to initiate a set of graphics work from an entry in the tracking slot circuit and to initiate an increase from a low power mode to a high power mode for one or more circuits associated with the set of graphics work based on information about the set of graphics work. D8. A prefetch is performed from the shared memory into the SRAM memory element of the slot manager circuitry of any previous clause in set D. D9. Prefetching is performed from shared memory into the cache of any previous clause in set D. D10. The slot manager circuit is configured to determine which set of graphics work uses the first shared resource and the second shared resource; For a first shared resource, the slot manager circuit is configured to stall a set of graphics work until the first shared resource becomes available; The apparatus of any preceding clause in set D, wherein, for a second shared resource, the slot management circuitry is configured to allow the set of graphics work to progress before the second shared resource becomes available, and to report that the set of graphics work has progressed before the second shared resource becomes available. D11. A method comprising any combination of operations that the apparatus of any preceding clause in set D is configured to perform. D12. A non-transitory computer-readable storage medium having stored thereon design information specifying a design of at least a portion of a hardware integrated circuit in a format recognized by a semiconductor manufacturing system configured to use the design information to generate a circuit according to the design, the design information comprising: A non-transitory computer-readable storage medium that is specified to include any combination of the elements described in clauses D1 to D10.
[0252] As used herein, phrases of the form "design information specifying a design of a circuit configured to..." do not imply that the subject circuit must be fabricated in order for the requirement to be satisfied. Rather, the phrase indicates that the design information describes a circuit that includes components that are configured or specified to perform a specified action when manufactured. ***
[0253] The present disclosure includes references to "one embodiment" or groupings of "embodiments" (e.g., "some embodiments" or "various embodiments"). Embodiments are different implementations or examples of the disclosed concepts. References to "one embodiment," "one embodiment," "particular embodiment," etc. do not necessarily refer to the same embodiment. Numerous possible embodiments, including those specifically disclosed, are contemplated, as well as modifications or alternatives that are within the spirit or scope of the present disclosure.
[0254] This disclosure may discuss potential advantages that may result from the disclosed embodiments. All implementations of these embodiments necessarily exhibit some or all of the potential advantages. Whether advantages are realized for a particular implementation depends on many factors, some of which are outside the scope of this disclosure. Indeed, there are many reasons why an implementation within the scope of the claims may not exhibit some or all of any disclosed advantages. For example, a particular implementation may include other circuitry outside the scope of this disclosure that, in conjunction with one of the disclosed embodiments, nullifies or reduces one or more of the disclosed advantages. Furthermore, suboptimal design practices of a particular implementation (e.g., implementation techniques or tools) may also nullify or reduce the disclosed advantages. Even assuming skilled execution, realization of advantages may still depend on other factors, such as the environmental conditions in which the implementation is deployed. For example, inputs provided to a particular implementation may prevent one or more of the problems addressed in this disclosure from occurring on a particular occasion, such that the benefits of the solution may not be realized. Given the existence of factors external to the present disclosure that may arise, it is expressly intended that any potential advantages described herein should not be construed as claim limitations that must be met in order to demonstrate infringement. Rather, the identification of such potential advantages is intended to illustrate the types of improvements available to a designer having the benefit of the present disclosure. The fact that such advantages are permissibly described (e.g., a statement that a particular advantage "may result") is not intended to convey any doubt as to whether such advantage may actually be realized, but rather is intended to recognize the technological reality that realization of such advantages often depends on additional factors.
[0255] Unless otherwise stated, the embodiments are non-limiting. That is, the disclosed embodiments are not intended to limit the scope of the claims made based on this disclosure, even if only a single example is described with respect to a particular feature. The disclosed embodiments are intended to be illustrative, not limiting, unless otherwise stated in the disclosure. The above description is intended to enable claims that cover not only the disclosed embodiments, but also alternatives, modifications, and equivalents that will be apparent to those skilled in the art having the benefit of this disclosure.
[0256] For example, features of the present application may be combined in any suitable manner. Accordingly, new claims may be formulated during prosecution of this application (or an application claiming priority to this application) for any such combination of features. In particular, with reference to the appended claims, features from dependent claims may be combined with features of other dependent claims, including claims that are dependent on other independent claims, as appropriate. Similarly, features from each independent claim may be combined as appropriate.
[0257] Thus, the accompanying dependent claims may each be drafted to be dependent on a single other claim, although additional dependencies are also contemplated. Any combination of features in the dependent claims consistent with this disclosure is contemplated and may be claimed in this or another application. In summary, combinations are not limited to those specifically recited in the accompanying claims.
[0258] Where appropriate, it is contemplated that a claim drafted in one format or statutory type (e.g., apparatus) is also intended to support a corresponding claim in another format or statutory type (e.g., method). ***
[0259] Because this disclosure is a legal document, various terms and phrases may be subject to administrative and judicial interpretation. The definitions provided in the following paragraphs, as well as throughout this disclosure, are hereby publicly advised to be used in interpreting any claims made based on this disclosure.
[0260] Reference to a singular item (i.e., a noun or noun phrase preceded by "a," "an," or "the") is intended to mean "one or more" unless the context clearly indicates otherwise. Thus, a reference to an "item" in a claim does not exclude additional instances of the item without the context requiring otherwise. A "plurality" of an item refers to a set of two or more items.
[0261] The word "may" is used herein in a permissive sense (i.e., having the possibility, being able to) and not in an obligatory sense (i.e., not required).
[0262] The terms "comprising" and "including" and their forms are open ended and mean "including, but not limited to."
[0263] When the term "or" is used in this disclosure in reference to a list of alternatives, it will generally be understood to be used in an inclusive sense unless the context clearly indicates otherwise. Thus, a list of "x or y" is equivalent to "x or y, or both," and thus encompasses 1) x but not y, 2) y but not x, and 3) both x and y. On the other hand, the phrase "either x or y, but not both" makes it clear that "or" is used in an exclusive sense.
[0264] The enumeration of "w, x, y, z, or any combination thereof," or "at least one of ... w, x, y, and z" is intended to cover all possibilities including a single element up to the total number of elements in the set. For example, for the set [w, x, y, z], these expressions cover any single element of the set (e.g., w but not x, y, or z), any two elements (e.g., w and x but not y or z), any three elements (e.g., w, x, and y but not z), and all four elements. Thus, the phrase "at least one of ... w, x, y, and z" refers to at least one element of the set [w, x, y, z], thereby covering all possible combinations in this list of elements. This phrase should not be interpreted as requiring that there be at least one instance of w, at least one instance of x, at least one instance of y, and at least one instance of z.
[0265] In this disclosure, various "labels" may precede a noun or noun phrase. Unless the context clearly indicates otherwise, the various labels used for a feature (e.g., "first circuit," "second circuit," "particular circuit," "given circuit," etc.) refer to different instances of the feature. Furthermore, when applied to features, the labels "first," "second," and "third" do not imply any type of ordering (e.g., spatial, temporal, logical, etc.) unless otherwise specified.
[0266] As used herein, the phrase "based on" is used to describe one or more factors that influence the determination. This term does not exclude the possibility that additional factors may influence the decision. That is, the decision may be based only on the specified factors or based on the specified factors as well as other unspecified factors. Consider the phrase "determining A based on B." This phrase specifies that B is a factor that is used to determine A or that influences the determination of A. This phrase does not exclude that the determination of A may also be based on some other factor, such as C. This phrase is intended to cover an embodiment in which A is determined solely based on B. As used herein, the phrase "based on" is synonymous with the phrase "based at least in part on."
[0267] The phrases "in response to" and "in response to" describe one or more factors that trigger an effect. This phrase does not exclude the possibility that additional factors may affect or otherwise trigger the effect, either together with the particular factor or independent of the specified factor. That is, the effect may be in response only to these factors or to the specified factors as well as other unspecified factors. Consider the phrase "performing A in response to B." By this phrase, B is a factor that triggers the execution of A or triggers a particular outcome for A. This phrase does not exclude that the execution of A may also be in response to other factors, such as C. This phrase also does not exclude that the execution of A may be in response to both B and C. This phrase is intended to cover an embodiment in which A is performed only in response to B. As used herein, the phrase "in response to" is synonymous with the phrase "at least partially in response to." Similarly, the phrase "in response to" is synonymous with the phrase "at least partially in response to." ***
[0268] Within this disclosure, various entities (which may be variously referred to as "units," "circuits," other components, etc.) may be described or claimed as being "configured" to perform one or more tasks or operations. The phrase "entity" configured to perform one or more tasks is used herein to refer to structures (i.e., physical things). More specifically, the phrase is used to indicate that the structure is arranged to perform one or more tasks during operation. A structure may be said to be "configured to perform" some task even if the structure is not currently operating. Thus, an entity described or explained as being "configured" to perform some task refers to a physical thing, such as a device, a circuit, a system having a processor unit and a memory that stores executable program instructions to perform the task. The phrase is not used herein to refer to intangible things.
[0269] In some cases, various units / circuits / components may be described herein as performing a set of tasks or operations, and even if not specifically described, it will be understood that those entities are "configured to" perform those tasks / operations.
[0270] The term "configured to" is not intended to mean "configurable to." For example, an unprogrammed FPGA is not considered to be "configured" to perform a particular function. However, this unprogrammed FPGA may be "configurable" to perform that function. After appropriate programming, the FPGA can then be said to be "configured" to perform a particular function.
[0271] For purposes of filing a U.S. patent application based on this disclosure, reciting a claim as a structure "configured to" perform one or more tasks is not expressly intended to invoke 35 U.S.C. §112(f) for that claim element. If an applicant wishes to invoke 35 U.S.C. §112(f) during prosecution of a U.S. patent application based on this disclosure, it would be to recite a claim element using "means for [performing a function]."
[0272] Various "circuits" may be described in this disclosure. These circuits or "circuitry" constitute hardware including various types of circuit elements such as combinational logic, clocked storage devices (e.g., flip-flops, registers, latches, etc.), finite state machines, memories (e.g., random access memory, embedded dynamic random access memory), programmable logic arrays, etc. Circuits may be custom designed or obtained from standard libraries. In various implementations, circuitry may include digital components, analog components, or a combination of both, as appropriate. Certain types of circuits may be generally referred to as "units" (e.g., decoding units, arithmetic logic units (ALUs), functional units, memory management units (MMUs), etc.). Such units may also be referred to as circuits or circuitry.
[0273] The disclosed circuits / units / components and other elements shown in the drawings and described herein include hardware elements such as those described in the preceding paragraphs. Often, the internal arrangement of hardware elements within a particular circuit may be specified by describing the function of that circuit. For example, a particular "decode unit" may be described as performing the function of "processing the opcode of an instruction and routing the instruction to one or more of a plurality of functional units," meaning that the decode unit is "configured" to perform this function. Description of this function is sufficient to suggest to one skilled in the computer arts a set of possible configurations of the circuit.
[0274] In various embodiments, as discussed in the previous paragraph, circuits, units, and other elements may be defined by the functions or operations they are configured to perform. The arrangement of such circuits / units / components relative to one another and the way in which they interact will ultimately generate a microarchitectural definition of the hardware that is fabricated in an integrated circuit or programmed into an FPGA to form the physical implementation of the microarchitectural definition. Thus, a microarchitectural definition is recognized by those skilled in the art as a structure from which many physical implementations may be derived, all of which belong to the broader structure described by the microarchitectural definition. That is, a person skilled in the art presented with a microarchitectural definition provided in accordance with this disclosure may, without undue experimentation, use ordinary skill to implement the structure by coding the description of the circuit / unit / component into a hardware description language (HDL), such as Verilog or VHDL. HDL descriptions are often expressed in a manner that appears to be functional. However, to those skilled in the art, this HDL description is the method used to translate the structure of the circuit, unit, or component into the next level of implementation details. Such HDL descriptions may take the form of behavioral code (typically not synthesizable), register transfer language (RTL) code (typically synthesizable, as opposed to behavioral code), or structural code (e.g., a netlist specifying logic gates and their connections). The HDL description may be synthesized against a library of cells designed for a given integrated circuit manufacturing technology, and modified for timing, power, and other reasons, resulting in a final design database that can be sent to a foundry to generate masks and ultimately manufacture the integrated circuit. Some hardware circuits, or portions thereof, may also be custom designed in a schematic editor and incorporated into the integrated circuit design along with the synthesized circuit. The integrated circuit may further include transistors and other circuit elements (e.g., passive elements such as capacitors, resistors, inductors, etc.), as well as interconnects between the transistors and the circuit elements.Some embodiments may implement multiple integrated circuits connected together to realize the hardware circuit, and / or some embodiments may use discrete elements. Alternatively, the HDL design may be integrated into and implemented in a programmable logic array, such as a field programmable gate array (FPGA). This decoupling between the design of a group of circuits and the subsequent low-level implementation of those circuits typically results in a scenario where the circuit or logic designer does not specify any particular set of structures for the low-level implementation other than describing how the circuit is structured, since this process is performed at a different stage in the circuit implementation process.
[0275] The fact that many different low-level combinations of circuit elements can be used to implement the same specification for a circuit results in numerous equivalent structures for that circuit. As noted above, these low-level circuit implementations may vary depending on changes in manufacturing technology, the foundry selected to manufacture the integrated circuit, the libraries of cells provided for a particular project, etc. In many cases, the choices made by different design tools or methods to generate these different implementations may be arbitrary.
[0276] Furthermore, for a given embodiment, it is common for a single implementation of a particular functional specification of a circuit to include a large number of devices (e.g., millions of transistors). This absolute amount of information therefore makes it impractical to exhaustively enumerate the low-level structures used to implement a single embodiment, let alone the vast amount of equivalent possible implementations. For this reason, this disclosure describes the structure of a circuit using functional abbreviations used in the industry.
Claims
1. An apparatus comprising: a graphics processor, the graphics processor comprising: a cache circuit configured to cache data from the system memory; a circuit implementing a plurality of logical slots; A set of graphics processor subunits, each of which implements a plurality of distributed hardware slots, comprising: a given distributed hardware slot includes a work queue circuit configured to store graphics work and a configuration register corresponding to the stored graphics work; a set of graphics processor subunits, wherein a given graphics processor subunit includes shader circuitry configured to execute instructions specified by graphics work stored in a plurality of distributed hardware slots of the given graphics processor subunit, and assigning graphics work to a given distributed hardware slot of the plurality of distributed hardware slots of the given graphics processor subunit such that execution of the assigned graphics work is assigned to the shader circuitry of the given graphics processor subunit; A control circuit comprising: receiving a first set of software-specified graphics work and software-directed priority information for the first set of graphics work; assigning a first set of graphics work to a first logical slot, the first logical slot being one of the plurality of logical slots; determining a set of reserved distributed hardware slots reserved for logical slots whose assigned graphics work has a priority level that meets a threshold priority level; determining a mapping between the plurality of logical slots and distributed hardware slots of the plurality of distributed hardware slots of one or more graphics processor subunits of the set of graphics processor subunits, the mapping being determined in accordance with the determined set of reserved distributed hardware slots such that logical slots having a priority level for which assigned graphics work does not meet the threshold priority level are mapped only to non-reserved distributed hardware slots; distributing a first set of the graphics work assigned to the first logical slot to a first set of one or more target distribution hardware slots of one or more graphics processor subunits in the set of graphics processor subunits in accordance with one of the mappings; executing the first set of graphics work from the first set of one or more target distributed hardware slots using the shader circuitry of one or more graphics processor subunits of the set of graphics processor subunits that implement the first set of target distributed hardware slots; A control circuit configured as follows:
13. An apparatus comprising:
2. Based on software input for the first set of graphics work, the control circuitry: maintaining a mapping of the first set of the one or more target distributed hardware slots for the first logical slot after completion of the execution of the first set of the graphics work; 2. The apparatus of claim 1, configured to allocate the first set of mapped one or more target distributed hardware slots for the first set of graphics work to another logical slot only after a software input indicating to release the first set of mapped one or more target distributed hardware slots.
3. the given distributed hardware slot further includes an iterative circuit configured to iterate the stored graphics work of the given distributed hardware slot; the given graphics processor sub-unit further includes geometry processing circuitry; 2. The apparatus of claim 1, wherein the control circuitry is configured to execute multiple distributed sets of graphics work in parallel on multiple different graphics processor subunits of the set of graphics processor subunits.
4. The apparatus of claim 1 , wherein the control circuitry is configured to provide status information to software for the first set of graphics works.
5. The control circuitry detects at least the following status states: Waiting for dependencies, awaiting configuration data for the first set of graphics works; and 5. The apparatus of claim 4, further comprising: supporting waiting for assignment of one or more graphics processor subunits of the set of graphics processor subunits to a distributed hardware slot of the plurality of distributed hardware slots.
6. The status information is Identifying the first logical slot; Identifying the allocated distributed hardware slot; and timestamp information associated with the execution of the first set of graphics work.
7. The control circuitry includes the following types of software overrides: a specified distribution rule indicating whether to distribute across only a portion of the set of graphics processor subunits or across all of the set of graphics processor subunits; 2. The apparatus of claim 1, configured to determine the mapping based on group information indicating a group of graphics processor subunits to which the first set of graphics work should be deployed.
8. The control circuitry includes the following additional types of software overrides: mask information indicating which graphics processor subunits of the set of graphics processor subunits are available for the first set of graphics work; The apparatus of claim 7 , configured to determine the mapping based on policy information indicative of a scheduling policy.
9. a control stream processor circuit configured to determine a distribution rule for said mapping; Software input, the determined distribution rule from the control stream processor circuit; and Distributed slot state information, and a distributed slot resource allocator circuit configured to determine the mapping based on:
10. 10. The apparatus of claim 9, wherein the distributed slot resource allocator circuitry is configured to perform a reclamation procedure that allows a logical slot having a software-directed priority level to reclaim a distributed hardware slot assigned to a logical slot having a second, lower priority level.
11. 1. A non-transitory computer-readable storage medium having stored thereon design information that specifies a design of a hardware integrated circuit in a format recognized by a semiconductor manufacturing system configured to use the design information to generate a hardware integrated circuit according to the design, the design information indicating that the hardware integrated circuit comprises: a circuit implementing a plurality of logical slots; A set of graphics processor subunits, each of which implements a plurality of distributed hardware slots, comprising: a given distributed hardware slot includes a work queue circuit configured to store graphics work and a configuration register corresponding to the stored graphics work; a set of graphics processor subunits, wherein a given graphics processor subunit includes shader circuitry configured to execute instructions specified by graphics work stored in a plurality of distributed hardware slots of the given graphics processor subunit, and assigning graphics work to a given distributed hardware slot of the plurality of distributed hardware slots of the given graphics processor subunit such that execution of the assigned graphics work is assigned to the shader circuitry of the given graphics processor subunit; A control circuit comprising: receiving a first set of software-specified graphics work and software-directed priority information for the first set of graphics work; assigning a first set of graphics work to a first logical slot, the first logical slot being one of the plurality of logical slots; determining a set of reserved distributed hardware slots reserved for logical slots whose assigned graphics work has a priority level that meets a threshold priority level; determining a mapping between the plurality of logical slots and distributed hardware slots of the plurality of distributed hardware slots of one or more graphics processor subunits of the set of graphics processor subunits according to the determined set of reserved distributed hardware slots such that logical slots having a priority level for which assigned graphics work does not meet the threshold priority level are mapped only to non-reserved distributed hardware slots; distributing a first set of the graphics work assigned to the first logical slot to a first set of one or more target distribution hardware slots of one or more graphics processor subunits in the set of graphics processor subunits in accordance with one of the mappings; executing the first set of graphics work from the first set of one or more target distributed hardware slots using the shader circuitry of one or more graphics processor subunits of the set of graphics processor subunits that implement the first set of target distributed hardware slots; and a control circuit configured to:
12. Based on software input for the first set of graphics work, the control circuitry: maintaining a mapping of the first set of the one or more target distributed hardware slots for the first logical slot after completion of the execution of the first set of the graphics work; 12. The non-transitory computer-readable storage medium of claim 11, configured to allocate the first set of mapped one or more target distributed hardware slots for the first set of graphics work to another logical slot only after a software input indicating to release the first set of mapped one or more target distributed hardware slots.
13. The non-transitory computer-readable storage medium of claim 11 , wherein the control circuitry is configured to provide status information to software for the first set of graphics works.
14. The status information is Identifying the first logical slot; Identifying the allocated distributed hardware slot; and timestamp information associated with the execution of the first set of graphics works.
15. The control circuitry includes the following additional types of software overrides: mask information indicating which graphics processor subunits of the set of graphics processor subunits are available for the first set of graphics work; policy information indicating a scheduling policy; a specified distribution rule indicating whether to distribute across only a portion of the set of graphics processor subunits or across all of the set of graphics processor subunits; and group information indicating a group of graphics processor subunits to which the first set of graphics work should be deployed.
16. 12. The non-transitory computer-readable storage medium of claim 11, wherein the control circuitry is configured to perform a reclamation procedure that allows a logical slot having a software-directed priority level to reclaim a distributed hardware slot assigned to a logical slot having a second, lower priority level.
17. 1. A method comprising: receiving, by control circuitry of the graphics processor, a first set of software-specified graphics work and software-directed priority information for the first set of graphics work; allocating, by the control circuitry, a first set of the graphics work to a first logical slot of a plurality of logical slots implemented by the graphics processor; determining, by the control circuitry, a set of reserved distributed hardware slots reserved for logical slots having a priority level for which assigned graphics work meets a threshold priority level; determining, by the control circuitry, a mapping between logical slots and distributed hardware slots of a set of graphics processor subunits, each of the graphics processor subunits implementing a plurality of distributed hardware slots; a given distributed hardware slot includes a work queue circuit configured to store graphics work and a configuration register corresponding to the stored graphics work; a given graphics processor subunit includes shader circuitry configured to execute instructions specified by graphics work stored within a plurality of distributed hardware slots of the given graphics processor subunit; determining, in accordance with the determined set of reserved distributed hardware slots, such that logical slots having a priority level for which assigned graphics work does not meet a threshold priority level are mapped only to non-reserved distributed hardware slots; distributing, by the control circuitry, a first set of the graphics work assigned to the first logical slot to a first set of one or more target distribution hardware slots of one or more graphics processor subunits in the set of graphics processor subunits in accordance with one of the mappings; executing, by the one or more graphics processor subunits of the set of graphics processor subunits, a first set of the graphics work from the first set of the one or more target distributed hardware slots using the shader circuitry of the one or more graphics processor subunits of the set of graphics processor subunits that implement the first set of the target distributed hardware slots.
18. maintaining, by the control circuitry, a mapping of the first set of the one or more target distributed hardware slots for the first logical slot after completion of the execution of the first set of the graphics work; allocating, by the control circuitry, the first set of the mapped one or more target distributed hardware slots for the first set of graphics work to another logical slot only after a software input indicating releasing the first set of the mapped one or more target distributed hardware slots; 20. The method of claim 17, further comprising:
19. The control circuit Identifying the first logical slot; Identifying the allocated distributed hardware slot; and timestamp information associated with the execution of the first set of graphics work to software for the first set of graphics work.
20. Determining the mapping may involve the following additional types of software overrides: mask information indicating which graphics processor subunits of the set of graphics processor subunits are available for the first set of graphics work; policy information indicating a scheduling policy; a specified distribution rule indicating whether to distribute across only a portion of the set of graphics processor subunits or across all of the set of graphics processor subunits; and group information indicating a group of graphics processor subunits to which the first set of graphics work should be deployed.
Citation Information
Patent Citations
Virtual architecture and instruction set for parallel thread computer
JP2008276740A
A graphics processing and display system using multiple graphics cores on a monolithic silicon chip
JP2008538620A
Tile region protection
JP2020109625A
Workload scheduling and distribution on distributed graphics device
JP2020113252A
Allocation of Tiles to Processing Engines in a Graphics Processing System
US20170178386A1