Hierarchical Work Scheduling
A hierarchical work scheduling system with local scheduler circuits addresses the scalability and memory overhead issues in GPU architectures by distributing work items locally, enhancing performance and reducing data movement.
Patent Information
- Application Number
- JP2025515966
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-30
- Filing Date
- 2023-09-28
- Publication Date
- 2025-10-03
AI Technical Summary
Centralized scheduling systems in GPU architectures incur significant memory overhead and execution overhead, and do not scale effectively across multiple engines, leading to performance degradation in complex graph processing.
Implementing a hierarchical work scheduling system with local scheduler circuits in each scheduling domain, allowing work items to be distributed and executed locally while communicating only with the next higher level in the hierarchy, reducing memory traffic and latency.
The hierarchical scheduling mechanism improves scalability and reduces memory usage, maintaining efficient execution of complex graphs by minimizing data movement and cross-domain bandwidth.
Smart Images

Figure 2025532787000001_ABST
Abstract
Description
[Background technology]
[0001] Graphics processing applications often include a work stream of vertex and texture information and instructions to process such information. Various items of work (also referred to as "commands") may be prioritized according to some order and enqueued in system memory buffers to be retrieved and processed at a later time. A scheduler circuit receives the instructions to be executed and generates one or more commands that are scheduled and executed on the processing resources of, for example, a graphics processing unit (GPU) or other single instruction-multiple data (SIMD) processing unit.
[0002] The present disclosure may be better understood, and its numerous features and advantages made apparent to those skilled in the art by referencing the accompanying drawings, in which: The use of the same reference numbers in different drawings indicates similar or identical items. [Brief explanation of the drawings]
[0003] [Figure 1] FIG. 1 is a block diagram of a computing system that implements hierarchical work scheduling, according to an embodiment. [Figure 2] FIG. 2 is a block diagram of a portion of a processor implementing a hierarchical scheduler circuit, according to an embodiment. [Figure 3] FIG. 2 is a block diagram illustrating a graphics processing stacked die chiplet implementing a hierarchical scheduler circuit, according to an embodiment. [Figure 4] FIG. 2 is a block diagram of a method for implementing hierarchical work scheduling, according to an embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0004] The performance of GPU architectures and other parallel processing architectures continues to increase as applications perform numerous operations with many iterations (or time steps) and multiple operations within each step. To avoid the overhead and performance degradation that results from launching these operations individually on a GPU, multiple work items (often collectively referred to as a "graph" or "work graph") are launched via a single CPU operation rather than via individual CPU operations. Graph-based software architectures, often referred to as dataflow architectures, are common in software applications that process continuous streams of data or events. However, centralized scheduling systems such as command processors can incur significant memory overhead, execution overhead, and do not scale across multiple engines.
[0005] To address these issues and enable improved scheduling of complex graphs (particularly with multi-chiplet GPU architectures, or more generally with multi-chiplet single instruction multiple data (SIMD) processor architectures), FIGS. 1-4 describe a system and method for hierarchical work scheduling that includes a scheduler circuit locally executing the graph. In an embodiment, the method for hierarchical work scheduling includes consuming a first work item in a first scheduling domain having a local scheduler circuit and one or more workgroup processing elements. The first scheduling domain consuming the first work item generates a set of new work items. The local scheduler circuit then distributes at least one new work item of the set of new work items to be executed locally in the first scheduling domain. However, if the local scheduler circuit of the first scheduling domain determines that the set of new work items includes one or more work items that would overload the first scheduling domain with work if scheduled for local execution, those work items are returned to the scheduler circuit at the next higher level in the scheduling domain hierarchy for redistribution. Similarly, if a scheduling domain runs out of work, it can request new work from the next scheduler circuit in the hierarchy. In such a situation, the scheduler circuit requests any following scheduling domains to make work available for the first scheduling domain. In this way, the scheduling capacity of complex graphs scales with chip size while keeping data movement to a minimum. Furthermore, cross-domain bandwidth is reduced, which becomes increasingly important as off-chip memory latency and power usage increase.
[0006] While references below to graphics processing and GPUs are made, it should be noted that these references are for illustrative purposes only and are not intended to limit the following description. Rather, the systems and techniques described herein may be implemented for various forms of parallel processing of work items other than or in addition to graphics-related work items. Thus, references to graphics work scheduling and graphics work items apply equally to other types of work scheduling and work items, and similarly, references to GPUs apply equally to other types of SIMD processing units or other parallel processing hardware accelerators, such as accelerated processing units (APUs), discrete GPUs (dGPUs), artificial intelligence (AI) accelerators, etc.
[0007] FIG. 1 is a block diagram of a computing system 100 using hierarchical work scheduling, according to an embodiment. In an embodiment, computing system 100 includes at least one or more processors 102A-102N, a fabric 104, an input / output (I / O) interface 106, memory controller(s) 108, a display controller 110, and other device(s) 112. In an embodiment, computing system 100 includes a host processor 114, such as a central processing unit (CPU), to support execution of instructions for graphics and other types of workloads. In an embodiment, computing system 100 includes a computer, laptop, mobile device, server, or any of a variety of other types of computing systems or devices. It should be noted that the number of components of computing system 100 may vary. It should also be noted that in an embodiment, computing system 100 includes other components not shown in FIG. 1 . Additionally, computing system 100 may be constructed in ways other than those shown in FIG. 1 .
[0008] Fabric 104 represents any communications interconnect conforming to any of a variety of types of protocols utilized to communicate between components of computing system 100. Fabric 104 provides data paths, switches, routers, and other logic connecting processor 102, I / O interface 106, memory controller(s) 108, display controller 110, and other device(s) 112 to one another. Fabric 104 handles request, response, data traffic, and probe traffic to facilitate coherency. Fabric 104 also handles interrupt request routing and configuration access paths to the various components of computing system 100. Additionally, fabric 104 handles configuration request, response, and configuration data traffic. In embodiments, fabric 104 is bus-based, including shared bus configurations, crossbar configurations, and hierarchical buses with bridges. In other embodiments, fabric 104 is packet-based and hierarchical, including bridged, crossbar, point-to-point, or other interconnects. From the perspective of fabric 104, the other components of computing system 100 are referred to as “clients.” Fabric 104 is configured to process requests generated by various clients and pass the requests on to other clients.
[0009] Memory controller(s) 108 represent any number and type of memory controller coupled to any number and type of memory device(s). For example, the type(s) of memory devices coupled to memory controller(s) 108 may include dynamic random access memory (DRAM), static random access memory (SRAM), NAND flash memory, NOR flash memory, ferroelectric random access memory (FeRAM), etc. Memory controller(s) 108 are accessible by processor 102, I / O interface 106, display controller 110, and other device(s) 112 via fabric 104. I / O interface 106 represents any number and type of I / O interface (e.g., peripheral component interconnect (PCI) bus, PCI-Extended (PCI-X), PCI Express (PCIE) bus, gigabit Ethernet (GBE) bus, universal serial bus (USB)). Various types of peripheral devices may be coupled to I / O interface 106. Such peripheral devices include (but are not limited to) displays, keyboards, mice, printers, scanners, joysticks, other types of game controllers, media recording devices, external storage devices, network interface cards, etc. Other device(s) 112 represent any number and type of devices (e.g., multimedia devices, video codecs).
[0010] In an embodiment, each of the processors 102 is a parallel processor (e.g., a vector processor, a graphics processing unit (GPU), a general-purpose GPU (GPGPU), a non-scalar processor, a highly parallel processor, an artificial intelligence (AI) processor, an inference engine, a machine learning processor, other multi-threaded processing unit, etc.). In an embodiment, each parallel processor 102 is constructed as a multi-chip module (e.g., a semiconductor die package) that includes two or more base integrated circuit dies that are communicatively coupled together with bridge chip(s) or other coupling circuitry or connectors such that the parallel processor is usable (e.g., addressable) like a single semiconductor integrated circuit. As used in this disclosure, the terms “die” and “chip” are used interchangeably. Those skilled in the art will recognize that conventional (e.g., non-multi-chip) semiconductor integrated circuits are fabricated as wafers or as dies (e.g., single-chip ICs) that are formed within a wafer and later separated from the wafer (e.g., when the wafer is diced), and that often multiple ICs are fabricated simultaneously within a wafer. The ICs and possibly discrete circuits and possibly other components (such as non-semiconductor packaging substrates including printed circuit boards, interposers and possibly others) are assembled into a multi-die parallel processor.
[0011] In an embodiment, each individual processor 102 includes one or more base IC dies employing processing chiplets according to an embodiment. The base die is formed as a single semiconductor chip including N communicatively coupled graphics processing stacked die chiplets. In an embodiment, the base IC die includes two or more direct memory access (DMA) engines that coordinate DMA transfers of data between the device and memory (or between different locations within memory).
[0012] As will be appreciated by those skilled in the art, parallel processors and other multi-threaded processors 102, in embodiments, implement multiple processing elements (not shown) (interchangeably referred to as processor cores or compute units) configured to simultaneously or in parallel execute multiple instances (threads or waves) of a single program on multiple data sets. Several waves are created (or generated) and then dispatched to each processing element in the multi-threaded processor. In embodiments, a processing unit includes hundreds of processing elements, such that thousands of waves execute a program in the processor simultaneously. Processing elements in a GPU typically process three-dimensional (3D) graphics using a graphics pipeline formed of a sequence of programmable shaders and fixed-function hardware blocks.
[0013] The host processor 114 prepares and distributes one or more operations to one or more processors 102A-102N (or other computing resources), and then retrieves the results of the one or more operations from the one or more processors 102A-102N. Traditionally, the host processor 114 submits work to be performed by one or more processors 102A-102N by queuing various work items (also referred to as "threads") in a command buffer (not shown). Computer applications, such as graphics processing applications, perform numerous operations (e.g., kernel launches or memory copies) with many iterations (or time steps) and multiple work items within each step. In embodiments, the computing system 100 utilizes a graph-based model for submitting work to be performed by one or more processors 102A-102N (or other parallel computing architectures) as a unified whole through the use of a work graph, rather than as a single GPU operation.
[0014] In at least one embodiment, host processor 114 executes one or more work graphs. In particular, a workload including multiple work items is organized as a work graph (or simply "graph"), where each node in the graph represents a corresponding work item to be performed, and each edge (or link) between two nodes corresponds to a dependency (such as a data dependency, an execution dependency, or some other dependency) between the two work items represented by the two linked nodes. For illustrative purposes, work graph 116 includes work items forming nodes A-D of work graph 116, and edges are dependencies between work items. In one embodiment, a dependency indicates when a work item of one node must complete before a work item of another node can begin. In an embodiment, a dependency indicates when a node needs to wait for data from another node before it can begin and / or continue its work item. In an embodiment, one or more processors 102A-102N execute work graph 116 after being called by host processor 114 by executing the work item beginning with node A. As shown, edges (as indicated by arrows) between node A and nodes B and C indicate that the work item at node A must complete execution before the work items at nodes B and C can begin. In an embodiment, the nodes of work graph 116 include work items such as kernel launches, memory copies, CPU function calls, or other work graphs (e.g., each of nodes A-D may correspond to a subgraph (not shown) that includes two or more other nodes).
[0015] As described in more detail below with respect to Figures 2-4, the computing system implements a scalable scheduling mechanism that can scale to arbitrarily large GPU configurations (across chiplets and packages), have minimal bandwidth requirements, and reach near-optimal memory usage. The scheduling mechanism subdivides the system into multiple scheduling domains and includes a parallel scalable scheduler circuit that can also schedule across and within multiple scheduling domains simultaneously. The scheduling mechanism further includes memory / control hardware attached to each scheduling domain. Each scheduling domain includes its own scheduler circuit and can generate work for itself by consuming work items in the corresponding work graph nodes while keeping much of the memory traffic local. In an embodiment, each scheduling domain communicates only with its parent scheduler circuit (e.g., one level above in the scheduling domain hierarchy) but does not communicate horizontally with other scheduler circuits within the same hierarchical level to avoid N-squared communication patterns.
[0016] Referring now to FIG. 2, shown is a block diagram of a portion of a processor 200 that implements a hierarchical scheduler circuit, according to an embodiment. In an embodiment, processor 200 includes fetch / decode logic 202 that fetches and decodes instructions within a wave of a workgroup that is scheduled for execution by processor 200. An embodiment of processor 200 executes waves within a workgroup. For example, in an embodiment, fetch / decode logic 202 fetches a kernel of instructions to be executed by all waves in the workgroup. Fetch / decode logic 202 then decodes the instructions within the kernel. Processor 200 also includes cache memory 204, such as a level 1 (L1) cache, that is used to store local copies of data and instructions used during execution of a wave.
[0017] In an embodiment, the processor 200 is used to implement the processor 102 as shown in FIG. 1. As will be appreciated, in an embodiment, each processor 102 includes multiple processing elements that operate according to a SIMD protocol to execute the same instruction on multiple data sets simultaneously using multiple processor cores. Accordingly, the smallest processing element is referred to as a SIMD unit. In an embodiment, the SIMD units are divided into processor cores 208 that collectively form workgroup processing elements 210.
[0018] In an embodiment, processor 200 includes one or more scheduling domains 206 (sometimes referred to as "node processors" due to the processing of work items within nodes of a work graph, such as work graph 116, as described above) that include local scheduler circuits 212 (interchangeably referred to as work graph scheduler circuits (WGS)) associated with sets of workgroup processing elements 210. Various scheduler circuits and command processors described herein handle queue-level allocation. As shown in FIG. 2, an exemplary embodiment of processor 200 includes N=2 scheduling domains 206. Each scheduling domain 206, in an embodiment, includes multiple workgroup processing elements 210, a local scheduler circuit 212, a local queue 214, and a local cache 216. During work execution, the local scheduler circuit 212 executes the work locally and does not interact with other scheduling domains. Instead, the local scheduler circuit 212 uses a private memory area for scheduling and as scratch space.
[0019] Although shown as including two scheduling domains 206, those skilled in the art will recognize that any number of scheduling domains spanning any number of domain hierarchies may be included in processor 200. Furthermore, those skilled in the art will recognize that processor 200, in embodiments, includes any number of nested scheduling domains. For example, as described below with respect to FIG. 3, higher-level scheduling domains are typically less granular hierarchically relative to scheduling domain 206 (e.g., include multiple scheduling domains 206). In other embodiments, lower-level scheduling domains are typically more granular hierarchically (e.g., each workgroup processing element 210 in FIG. 2 is its own lower-level scheduling domain and includes its own local scheduler circuitry). Nested scheduling domains include any number and combination of these various hierarchical scheduling domains.
[0020] In an embodiment, workgroup processing elements 210 that enqueue work items are added to a single local queue 214 (or a small set of local queues) that signals when the queue has a sufficient number of pending work items. For allocation efficiency, queue memory is managed into chunks 218 (including empty chunks, enqueued chunks, in-use chunks, etc.). As used herein, a "chunk," such as chunk 218, is a block of memory (e.g., in cache memory) used to group work items together to avoid dealing with individual work items at the scheduling level. In an embodiment, one chunk 218 contains multiple work items, each potentially targeting a different node in the work graph. In this manner, the local scheduler circuit 212 can provide local execution of work (e.g., minimal bandwidth usage) with reduced memory access and usage. In an embodiment, the queues (e.g., local queues) described herein allow for the addition and / or removal of work items. Such queues, in an embodiment, are implemented as ring buffers and can fill up.
[0021] In an embodiment, the processor 200 includes a global command processor (CP) 220 (interchangeably referred to as a “global scheduler circuit” or a “central CP”) that is a higher-level scheduler circuit for the scheduling domains 206 and communicates with all of them. In an embodiment, when there are work items that need to be distributed for execution, the global CP 220 distributes the work items (e.g., evenly) across two or more scheduling domains 206 for execution on the respective workgroup processing elements 210. However, execution of work items often continues to generate additional new items of work (new work items). In an embodiment, new work items 224 are generated by workers in scheduling domains at the lowest level of the scheduling domain hierarchy. The lowest level of the scheduling domain hierarchy includes hardware (e.g., the workgroup processing elements 210 of FIG. 2 ) that consumes and generates new work items as a result of the consumption; these new work items are sent up and down through the scheduling domain hierarchy when a local scheduling domain is overflowing or emptied of work items. For example, as a result of previous execution of work items, eight new work items 224 are generated by the workgroup processing element 210. The new work items 224 are initially stored in the local cache 216.
[0022] Traditionally, such new work items 224 are passed from a local cache memory (e.g., local cache 216) of a scheduling domain 206 to the cache memory 204 for distribution to the global CP 220 in the next scheduling round. As will be appreciated by those skilled in the art, such a scheduling scheme results in work items being inefficiently moved around when work needs to be sent to the global CP 220 for scheduling and distribution. This is additionally inefficient because work generated in a particular scheduling domain 206 cannot be immediately consumed locally but instead needs to be passed to the global CP 220 for rescheduling. To improve work item scheduling, this disclosure describes a rescheduler scheduler circuit that subdivides a system into multiple scheduling domains and is also capable of scheduling across and within multiple scheduling domains simultaneously. 2 in the context of scheduling domains 206 within processor 200, those skilled in the art will recognize that the concepts described are not limited to the two-level scheduling domain hierarchy shown in Figure 2, where the top level of the scheduling domain hierarchy, the global scheduling domain, includes global CP 220, and the lower levels of the scheduling domain hierarchy include individual scheduling domains 206 and their respective workgroup processing elements 210. In embodiments, the scheduling domain hierarchy may be expanded in scope to include, for example, even lower levels within the scheduling domain hierarchy (e.g., scheduling domains within individual workgroup processing elements 210) and / or even higher levels within the scheduling domain hierarchy (e.g., parent scheduling domains for each package in a multi-GPU system including multiple processors 200).
[0023] As described herein, utilizing the local scheduler circuit 212 of each scheduling domain 206 to distribute work to locally available workgroup processing elements 210 typically leads to a reduction in the amount of memory traffic, latency associated with transferring data to cache memory 204, and waiting for workgroup processing elements 210 to finish before redistributing new work items. In an embodiment, each scheduling domain 206 only communicates with the global CP 220, such as through its local scheduler circuit 212, when it is not running or when there is so much work that some needs to be offloaded to other scheduling domains. As shown in FIG. 2, the local scheduler circuit 212 distributes the eight new work items 224 by scheduling the new work items 224 for execution on workgroup processing elements 210 in the same scheduling domain 206 from which the original work items were generated (e.g., FIG. 2 shows the eight new work items 224 generated by the scheduling domain 206 being redistributed equally among the four workgroup processing elements 210).
[0024] In this way, scheduling work by the local scheduler circuit 212 from the local cache 216 (instead of transmitting the work item to the global CP 220) reduces the amount of round-trip traffic to the cache memory 204. Latency is also reduced by the communication path 226 between the local scheduler circuit 212 and the local workgroup processing element 210 within each scheduling domain 206 (as opposed to a longer communication path (not shown) that exits the scheduling domain 206, goes to the cache memory 204, and then returns to the workgroup processing element for execution of the work item).
[0025] In an embodiment, each scheduling domain 206 maintains local queues (e.g., local queue 214) that are visible only internally (i.e., to components of that same scheduling domain 206) and shared queues (not shown) that are shared with other scheduling domains 206. Work flows in both directions, so that a scheduling domain 206 can take work from a shared queue and place it in its own local queue 214, or move local work from a local queue 214 to a shared queue. In an embodiment, there is always only one shared queue one level above that is visible to a scheduling domain 206; if the hierarchy is deeper, the scheduling domain 206 cannot skip a level and must be assisted by another scheduling domain at a higher hierarchical level. Shared queues differ in that the scheduling domain 206 knows that they require synchronized access to them. This means that all operations on shared queues require synchronized access, for example, via atomics, to allow other scheduling domains to access them simultaneously. Local queues, on the other hand, are safe to access without synchronization if other scheduling domains need to request access for work-stealing purposes.
[0026] This architecture and method of distributing work without having to communicate with a centralized instance (e.g., global CP 220) allows the system to self-balance and reduces the amount of resource overload and underutilization. For example, in an embodiment, a local scheduler circuit 212 communicates with the global CP 220 only when its associated scheduling domain 206 is overloaded and / or does not have enough work to stay busy (as opposed to the traditional method of communicating with the global CP 220 every time a work unit finishes). Instead, as described herein, the responsibility and computational overhead for work scheduling is distributed across multiple scheduler circuits at different hierarchical levels to gain the benefits of memory locality and reduced latency.
[0027] Referring now to FIG. 3 , shown is an example of a hierarchical work scheduling technique in a system implemented as a graphics processing stacked die chiplet, according to an embodiment. As shown, graphics processing stacked die chiplet 302 includes one or more base active interposer dies (AIDs) 304 (individually shown as AIDs 304A and 304B and collectively referred to as AIDs 304). While graphics processing stacked die chiplet 302 is described below in the specific context of GPU terminology for ease of illustration and explanation, it should be recognized that, in embodiments, the described architecture is applicable to any of various types of parallel processors without departing from the scope of this disclosure. In embodiments, graphics processing stacked die chiplet 302 functions, for example, as a multi-chip module. Additionally, in embodiments, the term “chiplet,” as used herein, refers to any device that includes, but is not limited to, the following characteristics: 1) The chiplet includes an active silicon die that includes at least a portion of the computational logic used to solve a problem (i.e., the computational workload is distributed across multiple active silicon dies). 2) The chiplets are packaged together as a monolithic unit on the same substrate, and 3) the programming model does not compromise the notion of combining these separate compute dies as a single monolithic unit (i.e., each chiplet does not appear as a separate device to the application that uses the chiplet to process the computational workload).
[0028] The base active interposer die 304 of the graphics processing stacked die chiplet 302 includes N scheduling domains 306 (similar to the scheduling domains 206 of FIG. 2 ), with N=2 in the illustrated example. In an embodiment, each AID 304 includes one or more engine dies (EDs) 308, such as shader engine dies or other compute dies or any suitable parallel processing units. In the embodiment of FIG. 3 , each discrete scheduling domain 306 includes a single ED 308. In other embodiments (not shown), multiple EDs 308 may comprise a single scheduling domain 306. While shown as including two scheduling domains 306, those skilled in the art will recognize that any number of scheduling domains spanning any number of domain hierarchies may be included in the AID 304. For example, in an embodiment, the AID 304 is a component of the graphics processing stacked die chiplet 302 or other processor semiconductor package. The graphics processing stacked die chiplet 302 also includes a cache memory die 312, such as a last-level cache and global command processor (CP) die 314 (interchangeably referred to as a "global CP die" or a "global scheduler circuit"). As shown in Figure 3, the graphics processing stacked die chiplet 302 is formed as a single semiconductor chip package that includes two distinct scheduling domains 316, a first AID 304A and a second AID 304B. As will be appreciated, each scheduling domain 316 is a higher-level scheduling domain (relative to the scheduling domains 306) that includes one or more of the lower-level scheduling domains 306.
[0029] As will be appreciated by those skilled in the art, the global CP die 314 functions as the top-level scheduler circuit in the scheduling domains and communicates with all of them. However, this limits the scalability of current parallel processor architectures because the system relies on the unidirectional communication pattern of the global CP to send data to each scheduling domain for work to be performed. As described in more detail with respect to embodiments herein, the processor 200 and graphics processing stacked die chiplet 302 include both the global CP die 314 and one or more local scheduler circuits (e.g., local scheduler circuit 212 of FIG. 2 and local scheduler circuit 318 of FIG. 3). For example, in an embodiment, each scheduling domain 316 includes a work scheduler circuit 310 that is local to each AID 304.
[0030] 3, the first AID 304A includes a scheduler circuit 318A, a work queue 320A that is local to the first AID 304A, and a work scheduler circuit 310 (i.e., the “parent scheduler circuit”) that is one level above in the scheduling domain hierarchy than the local scheduler circuits 318A and 318B (collectively referred to as local scheduler circuits 318) of the individual EDs 308 of the nested scheduling domain configuration. While work scheduling was previously described in FIG. 2 in the context of scheduling items generated for local execution within a scheduling domain, in an embodiment, a local scheduler circuit (e.g., the local scheduler circuit 318A of ED 308A in AID 304A) hands off work to other scheduling domains within the same hierarchy (e.g., the scheduling domain 306 of ED 308B) or to one level above in the hierarchy (e.g., the scheduling domain 316 of AID 304A). The local scheduler circuits 318A and 318B are collectively referred to as the local scheduler circuits.
[0031] In an embodiment, the local queue 320A of the first ED 308A includes a queue of work items to be processed. As shown in FIG. 3, the local queue 320A includes eight items of work 322, an amount known to overload the scheduling domain 306 of the first ED 308A with work (e.g., based on the number of work items scheduled per available workgroup processing element). In another embodiment, the first ED 308A determines the type(s) of work queued in the local queue 320A. For example, some work items have a low amplification factor (e.g., as determined when packaging the work items into a work graph via one or more API or library function calls), such that consuming one work item generates a single new work item (e.g., a linear one-to-one relationship) or a small number of additional work items (e.g., a one-to-two or one-to-three relationship). The theoretical amplification factor is known from the work graph definition, but the actual amplification is determined at runtime. The application defines that, during graph definition time, the consumption of one particular work item can spawn 1 to N new work items and is instructed to stay within those bounds when the graph is executed. Other work items have large amplification factors and, when consumed, generate a large number of new work items. In such an embodiment, the first ED 308A preemptively returns work items to the global CP die 314 for distribution to other scheduling domains to prevent itself from becoming overloaded with work.
[0032] In embodiments, scheduling domains can also steal work from other scheduling domains when they are idle or underutilized. For example, the second ED 308B is idle and sends an underutilization notification 324 from its local scheduler circuit 318B to another scheduler circuit in the same scheduling domain hierarchy (e.g., the local scheduler circuit 318A of the first ED 308A) or to a scheduler at the next higher hierarchical level in the system (e.g., the work scheduler circuit 310 of the scheduling domain 316). Similarly, when there is no work in queue 320A, an idle signal is sent by the work scheduler circuit 310 in the scheduling domain 316 to the global CP die 314 with a request to “steal” work from another domain.
[0033] 3 , the second ED 308B directly steals work from the first ED 308A, which is transferred to the second ED 308B's local queue 320B (local queues 320A and 320B collectively referred to as local queue 320). As will be appreciated, this direct communication path between local scheduler circuits 318 is not overly complex when there are few scheduling domains per hierarchical level, but grows exponentially as the number of scheduling domains increases. Thus, in other embodiments, instead of stealing work directly, the second ED 308B communicates with the global CP die 314 (e.g., moving up and down between scheduling domain hierarchical levels instead of horizontally traversing to peer adjacent scheduling domains within the same hierarchical level) and requests the global CP die 314 to find some work, such as by pinging other scheduling domains and returning some work to the global queue in the cache memory die 312. In an embodiment, a single work item is shared among many items to amortize the cost of migrating a work item from one scheduling domain to another (e.g., via a cache flush so that the incoming work item becomes visible and available in the new scheduling domain).
[0034] Referring now to Figure 4, shown is a block diagram of a method 400 for implementing hierarchical work scheduling, according to an embodiment. For ease of illustration and explanation, method 400 is described below in the exemplary context with reference to the systems and devices of Figures 1-3. However, method 400 is not limited to these exemplary contexts and instead may be used in different embodiments for any of a variety of possible system configurations using the guidelines provided herein.
[0035] Method 400 begins at block 402, where a first scheduling domain receives a first work item from a global command processor, which is a higher-level scheduler circuit relative to the first scheduling domain. For example, as described above with respect to FIG. 2, if there are work items that need to be distributed for execution, the global CP 220 distributes the work items (e.g., evenly) across two or more scheduling domains 206. At block 404, the first scheduling domain (including local scheduler circuits and one or more workgroup processing elements) consumes the first work item to generate a set of new work items. As described above in more detail with respect to FIG. 2, work items often continue to generate additional new work items (e.g., new work item 224) when consumed / executed.
[0036] At block 406, the local scheduler circuit of the first scheduling domain determines whether the set of new work items includes one or more work items that would overload the first scheduling domain with work if scheduled for local execution. In an embodiment, determining that the set of new work items includes one or more work items that would overload the first scheduling domain includes determining that the total number of work items in the set of new work items exceeds a predetermined threshold. As shown in FIG. 3, the local queue 320A includes eight items of work, which is known to be an amount that would overload the scheduling domain 306 of the first ED 308A with work (e.g., based on the number of work items scheduled per available workgroup processing element).
[0037] In another embodiment, determining that the set of new work items includes one or more work items that would overload the first scheduling domain includes identifying one or more work items having a gain greater than a predetermined threshold. Some work items have a low gain such that consuming one work item generates a single new work item (e.g., a linear one-to-one relationship) or a small number of additional work items (e.g., a one-to-two or one-to-three relationship). Other work items have a large gain and, when consumed, generate a large number of new work items to distribute at least one set of new work items for execution in the first scheduling domain by the local scheduler circuitry.
[0038] If the local scheduler circuit determines that one or more work items in the set of new work items will actually overload the first scheduling domain, method 400 proceeds to block 408, where those identified work items are distributed by the local scheduler circuit to the next-higher level scheduler circuit in the hierarchy (e.g., a global command processor) for rescheduling. For example, as described with respect to FIG. 3, in an embodiment, the first ED 308A preemptively returns work items to the global CP die 314 for distribution to prevent itself from becoming overloaded with work. However, if the local scheduler circuit determines that the set of new work items can currently be executed, the local scheduler circuit distributes the work locally to the workgroup processing elements in block 410. As shown in FIG. 2, the local scheduler circuit 212 distributes the new work items 224 by scheduling the work items for execution on workgroup processing elements 210 of the same scheduling domain 206 in which the work items were created (as indicated by the * notation). In this way, scheduling work by the local scheduler circuit 212 from the local cache 216 (instead of transmitting the work item to the global CP 220) reduces the amount of round trip traffic to the cache memory 204.
[0039] Although the above description relates to moving work items to the next-higher-level scheduling domain in response to overloading of the local scheduler circuit, those skilled in the art will recognize that the operation of block 408 can be triggered by other conditions as well. In an embodiment, if there is not enough work for efficient SIMD unit execution, work items may be returned to the next-higher-level scheduler circuit in the scheduling hierarchy. For example, if there is a set of work items generated from a workgroup processing element 210 that consists of a large amount of work for program A and only a small amount of work for program B, such that the workgroup processing element 210 is underutilized, the local scheduler circuit will push off the work for program B to the next-higher scheduling domain if program B is a very long-running program making the work movement worthwhile. In the next-higher-level scheduling domain, the work for program B is combined with other work items for program B to form a larger set for program B that is sent back to one of the lower scheduling domains for execution.
[0040] Additionally, in an embodiment, the local scheduler circuit also determines, at block 412, whether one or more workgroup processing elements of its scheduling domain are underutilized and whether additional work should be requested for the next scheduling round. In an embodiment, the local scheduler circuit 212 communicates with the global CP 220 if its associated scheduling domain 206 does not have enough work to stay busy. The local scheduler circuit generates an underutilization signal requesting that additional work items be assigned to the first scheduling domain. In an embodiment, the underutilization signal is communicated to a second local scheduler circuit within the same level of the scheduling domain hierarchy. 3, the second ED 308B is idle and sends an underutilization notification 324 from another scheduler circuit within the same scheduling domain hierarchy (e.g., the local scheduler circuit 318A of the first ED 308A) or from a scheduler circuit at the next higher hierarchical level in the system (e.g., the scheduler circuit 318A of the scheduling domain 316). As shown in FIG. 3, the second ED 308B steals work directly from the first ED 308A. If there is no work in queue 320A, an idle signal is sent to the next higher level scheduling domain (in this embodiment, the global CP die 314) with a request to steal work from another domain.
[0041] In other embodiments, the underutilization signal from the local scheduler circuit is communicated to a scheduler circuit at the next higher level in the scheduling domain hierarchy. For example, instead of stealing work directly, the second ED 308B communicates to the global CP die 314 (e.g., moving up and down between scheduling domain hierarchy levels instead of horizontally traversing to peer adjacent scheduling domains within the same hierarchy level) to request the global CP die 314 to find some work, such as by pinging other scheduling domains and returning some work to a global queue in the cache memory die 312.
[0042] Thus, as described herein, hierarchical work scheduling with local scheduler circuits provides increased data locality, where work items are consumed closer to their producers, by implementing parallel scalable scheduler circuits that subdivide the system into (nested) scheduling domains. Each scheduling domain contains its own scheduler circuit and can generate work for itself while keeping most of the memory traffic local. This increases the efficiency of scheduling large, complex graphs (including nodes that generate work and reductions) with minimal memory overhead (e.g., constant in the number of items processed simultaneously, rather than the total amount of work). Furthermore, by scheduling multiple domains simultaneously and independently of each other, the number of inter-domain connections is reduced and inter-domain communication is limited. Using this combined hardware / software approach, hierarchical work scheduling allows multiple levels of scheduling to be implemented, from individual WGPs within a scheduling domain through chiplets to multi-GPU scheduling.
[0043] A computer-readable storage medium includes any non-transitory storage medium or combination of non-transitory storage media that can be accessed by a computer system during use to provide instructions and / or data to the computer system. Such storage media may include, but are not limited to, optical media (e.g., compact discs (CDs), digital versatile discs (DVDs), Blu-ray discs), magnetic media (e.g., floppy disks, magnetic tape, magnetic hard drives), volatile memory (e.g., random access memory (RAM) or cache), non-volatile memory (e.g., read-only memory (ROM) or flash memory), or micro-electromechanical systems (MEMS)-based storage media. The computer-readable storage medium (e.g., system RAM or ROM) may be internal to the computing system, the computer-readable storage medium (e.g., a magnetic hard drive) may be permanently attached to the computing system, the computer-readable storage medium (e.g., an optical disk or Universal Serial Bus (USB)-based flash memory) may be removably attached to the computing system, or the computer-readable storage medium (e.g., network-accessible storage (NAS)) may be coupled to the computer system via a wired or wireless network.
[0044] In embodiments, certain aspects of the techniques described above are implemented by one or more processors of a processing system executing software. The software includes one or more sets of executable instructions stored or otherwise tangibly embodied in a non-transitory computer-readable storage medium. The software may include instructions and specific data that, when executed by one or more processors, operate the one or more processors to perform one or more aspects of the techniques described above. The non-transitory computer-readable storage medium may include, for example, a magnetic or optical disk storage device, a solid-state storage device such as flash memory, a cache, a random access memory (RAM), or other non-volatile memory device(s). The executable instructions stored on the non-transitory computer-readable storage medium may be implemented as source code, assembly language code, object code, or other form of instructions that can be interpreted or otherwise executed by one or more processors.
[0045] In addition to the above, it should be noted that not all activities or elements described in the summary description are required, that some of the particular activities or devices may not be required, that one or more additional activities may be performed, and that one or more additional elements may be included. Furthermore, the order in which the activities are listed is not necessarily the order in which they are performed. Also, the concepts have been described with reference to specific embodiments. However, those skilled in the art will recognize that various modifications and variations can be made without departing from the scope of the invention as set forth in the claims. Accordingly, the specification and drawings should be regarded in an illustrative rather than a restrictive sense, and all such modifications are intended to be included within the scope of the present invention.
[0046] Benefits, other advantages, and solutions to problems have been described above with regard to specific embodiments. However, the benefits, advantages, solutions to problems, and features from which any benefit, advantage, or solution may arise or be manifested are not construed as critical, essential, or essential features of any or all claims. Moreover, the specific embodiments described above are illustrative only, since the disclosed invention may be modified and practiced in different, but similar manners apparent to those skilled in the art having the benefit of the teachings herein. No limitations are intended to the details of construction or design herein shown, other than as described in the appended claims. It is therefore apparent that the specific embodiments described above may be altered or modified, and that all such variations are considered within the scope of the disclosed invention. Accordingly, the protection sought herein is set forth in the appended claims.
Claims
1. 1. A method implemented in a processor, comprising: a first scheduler circuit of the processor scheduling a first work-item to be consumed by a first workgroup processing element associated with the first scheduler circuit; generating a set of new work items as a result of consumption of the first work item by the first workgroup processing element; the first scheduler circuit distributing at least one new work item of the set of new work items to a second scheduler circuit of the processor different from the first scheduler circuit; method.
2. the first scheduler circuit is part of a first scheduling domain of a scheduling hierarchy, the first scheduling domain including a set of workgroup processing elements including the first workgroup processing element; the second scheduler circuit is part of a second scheduling domain of the scheduling hierarchy; 10. The method of claim 1.
3. the second scheduling domain is at the same level in the scheduling hierarchy as the first scheduling domain and includes a set of workgroup processing elements that is separate from the set of workgroup processing elements of the first scheduling domain; The method of claim 2.
4. the second scheduling domain is at a higher level in the scheduling hierarchy than the first scheduling domain and includes a set of workgroup processing elements including the set of workgroup processing elements of the first scheduling domain and a set of workgroup processing elements of a third scheduling domain that is at a lower level in the scheduling hierarchy than the second scheduling domain; The method of claim 2.
5. the second scheduling domain is a global scheduling domain of the scheduling hierarchy, and the second scheduler circuit is a global command processor. The method of claim 4.
6. receiving, in the first scheduler circuit, the first work item from the global command processor; The method of claim 5.
7. distributing the at least one new work item in response to the first scheduler circuit determining that the set of new work items includes one or more work items that, if consumed by at least one workgroup processing element of the first scheduling domain, would overload the first scheduling domain. The method of claim 2.
8. determining that the set of new work items includes one or more work items that overload the first scheduling domain includes identifying one or more work items having an amplification factor greater than a predetermined threshold; The method of claim 7.
9. determining that the set of new work items includes one or more work items that overload the first scheduling domain includes determining that a total number of new work items in the set of new work items exceeds a predetermined threshold; The method of claim 7.
10. receiving the first work item at the first scheduler circuit in response to an indication from the first scheduler circuit that one or more workgroup processing elements of the first scheduling domain are idle; The method of claim 2.
11. Distributing the at least one new work item to the second scheduler circuit in response to an indication from the second scheduler circuit that one or more workgroup processing elements of the second scheduling domain are idle. The method of claim 2.
12. 1. A system comprising: a first processor having a first scheduling domain and a second scheduling domain, the first scheduling domain including a first scheduler circuit and a set of workgroup processing elements, the second scheduling domain including a second scheduler circuit separate from the first scheduling circuit; The first scheduler circuit scheduling a first work item to be consumed by the set of workgroup processing elements; Distributing at least one new work item from a set of new work items generated by the workgroup processing element that consumes the first work item to the second scheduler circuit; configured to: system.
13. the first scheduling domain and the second scheduling domain are part of a scheduling hierarchy of the first processor; The system of claim 12.
14. the second scheduling domain is at the same level in the scheduling hierarchy as the first scheduling domain and includes a set of workgroup processing elements that is separate from the set of workgroup processing elements of the first scheduling domain; The system of claim 13.
15. the second scheduling domain is at a higher level in the scheduling hierarchy than the first scheduling domain and includes a set of workgroup processing elements including the set of workgroup processing elements of the first scheduling domain and a set of workgroup processing elements of a third scheduling domain that is at a lower level in the scheduling hierarchy than the second scheduling domain; The system of claim 13.
16. the second scheduling domain is a global scheduling domain of the scheduling hierarchy, and the second scheduler circuit is a global command processor.
16. The system of claim 15.
17. the first scheduler circuit receives the first work item from the global command processor; 17. The system of claim 16.
18. the first scheduler circuitry is configured to distribute the at least one new work item in response to determining that the set of new work items includes one or more work items that, if consumed by at least one workgroup processing element of the first scheduling domain, would overload the first scheduling domain. The system of claim 12.
19. the first scheduler circuitry is configured to determine, in response to at least one of identifying one or more work items having an amplification factor greater than a predetermined threshold or determining that a total number of new work items in the set of new work items exceeds a predetermined threshold, that the set of new work items includes one or more work items that, if consumed by at least one workgroup processing element of the first scheduling domain, would overload the first scheduling domain.
20. The system of claim 18.
20. The first scheduling domain comprises: a local queue accessible only by components within the first scheduling domain; a shared queue accessible by both the first scheduling domain and the second scheduling domain and configured to receive work from the local queue. The system of claim 12.
21. a host processor coupled to the first processor and configured to issue a set of work items to the first processor as a work graph; the set of work items includes the first work item. The system of claim 12.