Task dependencies
By determining the category ID and resource ID for tasks and parent tasks in the GPU, and selecting task execution based on this information, the problem of low task dependency management and scheduling efficiency in the GPU is solved, and task scheduling efficiency and resource utilization are improved.
Patent Information
- Application Number
- CN202410356349.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-03-27
- Publication Date
- 2024-10-01
AI Technical Summary
In GPUs, there are inefficiencies in the management and scheduling of task dependencies, especially since internal dependencies limit the scheduler's ability to select tasks in age order, resulting in increased wait times for some tasks.
By determining the category ID and resource ID for the task and its parent task, and storing this information in the task queue, to select the appropriate task execution based on the order and parameters in the task queue, including selecting not to match the predecessor task category ID and resource ID tasks to improve scheduling freedom.
It improves the efficiency of task scheduling, reduces waiting time, allows more tasks to be executed in the order of submission, improves task group overlapping scheduling and resource utilization, and reduces task waiting time.
Smart Images

Figure CN118733246A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to UK patent application 2304586.7 filed on March 29, 2023, which is incorporated herein by reference in its entirety. Technical Field
[0003] The present invention relates to tracking task dependencies in a graphics processing unit (GPU). Background Art
[0004] Within a GPU, tasks to be executed are typically held in a task queue, and a scheduler selects tasks from the task queue for execution. A task can be executed only if its dependencies are met. These dependencies can be related to things external to the task queue (e.g., waiting for an external unit to load data needed to complete a task), or they can be task-to-task dependencies within the task queue.
[0005] The embodiments described below are provided by way of example only and are not intended to limit implementations that address any or all of the shortcomings of known methods of managing task dependencies and scheduling tasks within a GPU. Summary of the invention
[0006] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
[0007] A method of managing task dependencies within a task queue of a GPU is described. The method includes determining a category ID and a resource ID for a task and also for any parent tasks of the task, and outputting the category ID and the resource ID of both the task itself and any parent tasks of the task to be stored in a task queue in association with the task. The category ID identifies the category of the task from a hierarchy of task categories, and the resource ID of the task identifies a resource allocated and / or written by the task.
[0008] A first aspect provides a method for managing task dependencies within a task queue of a GPU, the method comprising: determining a category ID and a resource ID for a task and also for any parent task of the task, wherein the category ID identifies the category of the task from a hierarchy of task categories, and the resource ID of the task identifies the resources allocated and / or written by the task; and outputting the category ID and the resource ID of both the task itself and any parent task of the task to be stored in the task queue in association with the task.
[0009] Determining a resource ID for the task may include assigning the resource ID to the task.
[0010] Assigning a resource ID to a task may include: allocating a resource to the task; and assigning a resource ID for the allocated resource to the task.
[0011] Resources may include shared registers, coefficient registers, or local memory registers.
[0012] A second aspect provides a method for scheduling tasks within a GPU, the method comprising: checking tasks in a task queue and parameters associated with the tasks, wherein the parameters include category IDs and resource IDs of both the task itself and any parent tasks of the task, wherein the category ID identifies the category of the task from a hierarchy of task categories, and the resource ID of the task identifies resources allocated and / or written by the task; selecting a task for execution based on the order of the tasks in the queue and the parameters; and sending the selected task for execution.
[0013] Selecting a task for execution based on the order and parameters of the tasks in the queue may include selecting a task in the task queue having a parent task category ID and parent resource ID that do not match the category ID and resource ID of any task preceding it in the task queue.
[0014] When a task is created, a resource ID may be assigned to the task.
[0015] The task selected for execution may additionally be based on the master unit that issued the task in the task queue.
[0016] A task queue can include tasks queued for execution and tasks that are currently running.
[0017] A third aspect provides a resource management unit of a GPU, the resource management unit comprising: hardware logic, the hardware logic being arranged to form a task and also determining a category ID and a resource ID for any parent task of the task, wherein the category ID identifies the category of the task from a hierarchy of task categories, and the resource ID of the task identifies the resources allocated and / or written by the task; and an output, the output being arranged to output the category ID and the resource ID of both the task itself and any parent task of the task to be stored in a task queue in association with the task.
[0018] The hardware logic may be arranged to determine a resource ID for a task by assigning a resource ID to the task.
[0019] Assigning a resource ID to a task may include: allocating a resource to the task; and assigning a resource ID for the allocated resource to the task.
[0020] Resources may include shared registers, coefficient registers, or local memory registers.
[0021] A fourth aspect provides a scheduling and processing logic for a GPU, the scheduling and processing logic comprising: analysis logic, the analysis logic being arranged to examine tasks in a task queue and parameters associated with the tasks, wherein the parameters include category IDs and resource IDs of both the task itself and any parent tasks of the task, wherein the category ID identifies the category of the task from a hierarchy of task categories, and the resource ID of the task identifies resources allocated and / or written by the task; and selection logic, the selection logic being arranged to select tasks for execution based on the order of tasks in the queue and the parameters, and to send the selected tasks for execution.
[0022] The selection logic may be arranged to select tasks for execution based on the order and parameters of the tasks in the queue by selecting a task in the task queue having a parent task category ID and parent resource ID that do not match the category ID and resource ID of any task preceding it in the task queue.
[0023] When a task is created, a resource ID may be assigned to the task.
[0024] The selection logic may also be arranged to select a task for execution based on a master unit that issued a task in the task queue.
[0025] A task queue can include tasks queued for execution and tasks that are currently running.
[0026] A fifth aspect provides a GPU, comprising: a resource management unit according to the third aspect; a scheduling and processing logic according to the fourth aspect; a task queue; and resources.
[0027] A sixth aspect provides a GPU, wherein the GPU is configured to execute the method of the first aspect.
[0028] The GPU may be included in hardware on an integrated circuit. A method of manufacturing a GPU at an integrated circuit manufacturing system may be provided. An integrated circuit definition data set may be provided, which when processed in the integrated circuit manufacturing system configures the system to manufacture a GPU. A non-transitory computer-readable storage medium may be provided, which has a computer-readable description of a GPU stored thereon, which when processed in the integrated circuit manufacturing system causes the integrated circuit manufacturing system to manufacture an integrated circuit including the GPU.
[0029] An integrated circuit manufacturing system may be provided, comprising: a non-transitory computer-readable storage medium having stored thereon a computer-readable description of a GPU; a layout processing system configured to process the computer-readable description to generate a circuit layout description of an integrated circuit including the GPU; and an integrated circuit generation system configured to manufacture the GPU based on the circuit layout description.
[0030] Computer program code for executing any of the methods described herein may be provided.A non-transitory computer readable storage medium may be provided having computer readable instructions stored thereon, which when executed in a computer system, cause the computer system to execute any of the methods described herein.
[0031] As will be apparent to the skilled person, the above features may be combined as appropriate and may be combined with any aspect of the examples described herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Examples will now be described in detail with reference to the accompanying drawings, in which:
[0033] Figure 1 Two different representations of the first set of dependent tasks are shown;
[0034] Figure 2 Two different representations of the second set of dependent tasks are shown;
[0035] Figure 3 Two different representations of two sets of overlapping dependent tasks are shown;
[0036] Figure 4 An example method for managing task dependencies within a task queue is shown;
[0037] Figure 5 An example method of task scheduling using task dependency information stored in a task queue is shown;
[0038] Figure 6 Shows the implementation Figure 4 and Figure 5 A schematic diagram of a GPU of the method;
[0039] Figure 7 It shows that in which an implementation such as Figure 6 A computer system having a GPU as shown in ; and
[0040] Figure 8 An integrated circuit manufacturing system for producing an integrated circuit including a GPU is shown.
[0041] The accompanying drawings show various examples. It will be appreciated by the skilled person that the element boundaries (e.g., boxes, groups of boxes, or other shapes) shown in the accompanying drawings represent an example of boundaries. In some examples, it may be the case that an element can be designed as multiple elements, or multiple elements can be designed as one element. Where appropriate, common reference numerals are used throughout the accompanying drawings to indicate similar features. DETAILED DESCRIPTION
[0042] The following description is presented by way of example to enable one skilled in the art to make and use the invention.The present invention is not limited to the embodiments described herein, and various modifications to the disclosed embodiments will be apparent to those skilled in the art.
[0043] Embodiments are now described by way of example only.
[0044] As described above, tasks to be executed by the GPU are typically held in a task queue, and the scheduler selects tasks from the task queue for execution. Tasks can only be executed if task dependencies are met, where these dependencies may be external to the task queue or internal to the task queue (i.e., task-to-task dependencies within the task queue). The scheduler uses dependency information to determine which task can be selected for execution next, and which tasks can be executed in parallel. Internal dependencies within a task queue limit the scheduler's ability to select tasks from the task queue for execution in order of age, and this may increase the waiting time for certain tasks. In addition to holding tasks that have not yet been executed, a queue can also hold tasks that are running, and tasks in a queue can be in a "queued" or "running" state.
[0045] In order to increase scheduling freedom, the concept of sequence dependency groups can be used. Tasks within a sequence dependency group are scheduled in order (i.e., the order of tasks is preserved within the sequence dependency group), but non-dependent tasks within the queue can be scheduled more freely. These sequence dependency groups can be implicitly defined based on a hierarchy that classifies tasks and defines task categories; however, this relies on the sequence dependency groups being all independent of each other. If tasks in a category at the highest level of the hierarchy are shared between tasks at the next level in the classification, the sequence dependency groups are not independent of each other. This can be solved by merging two overlapping sequence dependency groups, but this results in a larger sequence dependency group, which reduces scheduling freedom and increases waiting times for some tasks.
[0046] This article describes a method for managing task dependencies within a task queue (e.g., within a single task queue) and a method for scheduling tasks based on these task dependencies. As described below, tasks in a task queue are marked with multiple parameters: the category of a specific task and the identifier of any cross-task resource assigned and / or written by the task, and the category of the direct parent task of the specific task and the identifier of any cross-task resource assigned and / or written by the parent task. Each task will be marked with three or four of these parameters, because some tasks may not assign or write any cross-task resources, so the identifier of the cross-task resource written by the resource may be lost. Examples of cross-task resources that can be assigned and / or written by a task include shared registers, coefficient registers, and local memory registers. There may be a correlation between the type of cross-task resource that a task can write and the category of the task. Only one task assigns cross-task resources, but there may be no, one or more other tasks that write specific cross-task resources (as described in more detail below). In the case where multiple tasks write specific cross-task resources, each task can write different non-overlapping parts of previously assigned resources.
[0047] An example hierarchy of task categories is shown in the following table, where the rows are in order from top to bottom:
[0048] Task Category Number of tasks Cross-task resources that can be assigned and / or updated state 0 or 1 Shared registers coefficient 0 or more Coefficient registers or local memory registers Work 0 or more none
[0049] Although this example shows three different task categories, in other examples, there may be a different number of task categories. In all examples, the lowest category of tasks in the hierarchy cannot allocate or update (i.e., write to) cross-task resources (but can only allocate and / or update per-task resources), and the fact that a task category has the ability to allocate or update cross-task resources does not mean that it necessarily allocates or updates any cross-task resources.
[0050] As shown in the table above, the state task has the ability to allocate and / or update shared registers. These shared registers can be updated, for example, by auxiliary programs that run as a result of the state update task. The nature of the coefficient task and the work task can depend on the hardware unit (which can be referred to as the master unit) that feeds specific data (e.g., data related to the per-instance shader call) to a specific GPU pipeline. In the GPU, there can be different types of master units, for example, the GPU can include one or more of the following: vertex master unit, domain master unit, compute master unit, 2D master unit, pixel master unit (which can also be referred to as 3D master unit or fragment master unit) and ray master unit.
[0051] The coefficient tasks issued by the compute master unit typically update data in local memory registers, and the work tasks issued by the compute master unit are the main compute kernel shaders. The coefficient tasks issued by the vertex master unit or domain master unit are vertex shaders or domain shaders, respectively. These can update data in local memory registers, or can directly write to a buffer that stores output vertex data for later consumption by the geometry pipeline. This buffer can be called a unified vertex buffer (UVB). The work tasks issued by the vertex master unit or domain master unit are geometry or hull shaders.
[0052] Tasks at the highest category do not depend on other tasks, while tasks from lower levels in the hierarchy depend on tasks of categories at higher levels in the hierarchy. In many examples, a task always depends on tasks at the level immediately above it in the hierarchy, but this requirement can be relaxed in other examples. Tasks at lower levels in the hierarchy can access any cross-task resources allocated or updated by tasks above them in the hierarchy (i.e., any cross-task resources allocated or updated by one or more parents of tasks all the way up to the top of the hierarchy). Tasks at the lowest level in the hierarchy cannot allocate or update any cross-task resources.
[0053] An identifier for a cross-task resource that is allocated and / or written by a task may be referred to as a resource ID. When a task is created, a resource ID is assigned to the task (e.g., by a resource management unit in a GPU). When a task is created, resources may be allocated, and a resource ID for the allocated resources may be assigned to the task. Alternatively, in the case where a task is associated with an existing resource allocation (e.g., as allocated when a previous task was created), the existing allocated resource ID is assigned to the task. A resource ID is unique within a task category, but it may not necessarily be unique across all categories (e.g., tasks of different categories may have the same resource ID, but one involves shared registers and the other involves coefficient registers or local memory registers). In addition to being used to determine task dependencies (as described herein), a resource ID is used to track pending dependent tasks, and the resource ID is not reassigned (and the associated resources are released) until all dependent tasks for that particular resource are completed.
[0054] Figure 1 Two different representations 102, 104 of the same set of dependent tasks are shown. The first representation 102 shows a state task 122 at the top level of the hierarchy, with one dependency coefficient task 124 and two dependent work tasks 126. The second representation 104 shows these same tasks represented by four parameters marking the tasks in the task queue, with resource IDs shown as A and B. The legend 108 of the representation is also shown in Figure 1In the case where the parent class is displayed as "None", this indicates that the task does not depend on anything, and if the parent class is displayed as "Status" or "Coefficient", this indicates that the task depends on the status task or the coefficient task, respectively. Figure 1 A one-to-one relationship between coefficient tasks and status tasks and a many-to-one relationship between work tasks and coefficient tasks are shown.
[0055] Figure 2 Two different representations 202, 204 of a second set of dependent tasks are shown. The first representation 202 shows a state task 122 at the top level of the hierarchy, with two dependency coefficient tasks 124 and two dependent work tasks 126. The second representation 204 shows these same tasks represented by four parameters marking the tasks in the task queue, with resource IDs shown as A and B. The legend 108 of this representation is also shown in Figure 2 Shown in. Figure 2 A many-to-one relationship between coefficient tasks and status tasks and a many-to-many relationship between work tasks and coefficient tasks are shown.
[0056] Figure 3 Two different representations 302, 304 of two overlapping groups of dependent tasks are shown. The first representation 302 shows a first group 322 that includes a state task 122 at the top level of the hierarchy, the state task having two dependency coefficient tasks 124 and two dependent work tasks 126. The first representation 302 also shows a second group 324 that includes the same state tasks 122 as the first group at the top level of the hierarchy, the state tasks having different dependency coefficient tasks 124 and different dependent work tasks 126. The second representation 304 shows these same tasks represented by four parameters marking the tasks in the task queue, with the resource IDs shown as A and B. This representation is also shown in Figure 304, for example. Figure 1 and Figure 2 Used in. Figure 3 The first group 322 in shows a many-to-one relationship between coefficient tasks and status tasks and a many-to-many relationship between work tasks and coefficient tasks. Figure 3 The second group 324 in FIG. 3 shows a one-to-one relationship between coefficient tasks and state tasks and a one-to-one relationship between work tasks and coefficient tasks. Within the second group 324, both the coefficient tasks and the state tasks have the same resource ID A, but these resources correspond to different resources due to different categories (e.g., the resource ID A of the state task identifies one or more shared registers, and the resource ID A of the coefficient task identifies one or more coefficient registers or one or more local memory registers).
[0057] Figure 4 An example method for managing task dependencies within a task queue (eg, within a single task queue) is shown, and Figure 5 Example methods for task scheduling using the above task dependency information are shown. These methods can be implemented as follows: Figure 6 600 is implemented as shown in the GPU 600. The GPU 600 includes a plurality of resources 602, which can be allocated by tasks as cross-task resources as described above. These resources 602 include one or more of the following: shared registers 604, coefficient registers 606, and local memory registers 608. The GPU 600 also includes a plurality of master units 610, a resource management unit 612, and a plurality of processing pipelines 614. Each processing pipeline 614 includes a task queue 616 and scheduling and processing logic 608. Figure 6 As shown, resources 602 may be grouped as part of a processing pipeline 614. It will be appreciated that GPU 600 may include Figure 6 Other elements not shown.
[0058] Resource management unit 612 tracks resources and allocations of tasks processed by processing pipeline 614. Figure 6 A single resource management unit 612 is shown, but in other examples where the processing pipelines 614 are arranged in clusters, there may be a separate resource management unit 612 for each cluster.
[0059] like Figure 4 As shown, when creating a task (box 402), the resource management unit 612 determines the category ID and resource ID (box 404) for both the task itself and any parent tasks, that is, it determines the category ID and resource ID for the task, and also determines the category ID and resource ID for any parent tasks of the task. This information is the output of the processing pipeline 614 (box 406), and specifically, the information is output to the task queue 616 containing the task, and is stored for subsequent use by the scheduling and processing logic 618 in the processing pipeline 614. As described above, the category ID of the task identifies the category of the task from the hierarchy of task categories, and the resource ID of the task identifies the resources allocated and / or written by the task. Similarly, the category ID of the parent task identifies the category of the parent task from the hierarchy of task categories, and the resource ID of the parent task identifies the resources allocated and / or written by the parent task.
[0060] like Figure 5 As shown, when the scheduling and processing logic 618 selects a new task for execution, it checks the task queue and the parameters associated with the tasks in the task queue (block 502, for example, using the analysis logic 622). These parameters are described above and in Figure 1 and Figure 2The parameters shown in the legend 108 in FIG. 104 are those of the task, i.e., the category of the particular task and the identifiers of any cross-task resources allocated and / or written by the task, and the category of the particular task's immediate parent task and the identifiers of any cross-task resources written by the parent task. Based on the order and parameters of the tasks in the queue, a task is selected from the task queue for execution (block 504, e.g., selected using selection logic 624), and then sent by the scheduling and processing logic 618 for execution (block 506, e.g., sent by selection logic 624).
[0061] (In box 504) based on parameter selection task comprises the task (wherein task queue is arranged in order of task age, the oldest is the first) with the parent class and parent resource ID that do not match with the category ID and resource ID of any task before it in the task queue in the identification task queue, wherein as mentioned above, task queue can store both the task waiting in line for execution and the task being run. In other words, if the category and resource ID of the previous task in the task queue match the parent class and parent resource ID of the specific task, it is considered that the specific task is not qualified to be selected. The specific task is not qualified (that is, it can not be selected to run), because the previous matching task in the identification queue means that there are still tasks being run or queued that the specific task depends on. For example, based on the main unit 610 of the release task, additional criteria can also be used in combination with the dependency information when selecting tasks, so as to provide services to different main units fairly.
[0062] like Figure 5 As shown, using parameters associated with each task to select tasks for execution enables more tasks to be executed in submission (ie, age) order and thus reduces overall waiting time. Figures 1 to 3 The example shown in , compared to the conventional method of executing all coefficient tasks in the sequential dependency group before executing any work task in the group, can enable coefficient tasks and work tasks to be executed closer to the submission order. Figure 5 As shown, using parameters associated with each task to select tasks for execution improves scheduling of overlapping task groups (e.g., Figure 3 As shown in the figure), because it is not necessary to treat overlapping groups as a single group and enforce the order of tasks within the combined group. In addition, by using the above method, the coefficient resources have a shorter life / wait time than when all state tasks are executed before coefficient tasks and all coefficient tasks are executed before work tasks, which improves the scheduling of tasks and increases efficiency. The method described herein can be used for any type of master unit and thus provides a single unified dependency tracking solution.
[0063] There are many different ways to represent the parent class of a task in a task queue (based on the parameters provided by the resource management unit 612), and these include using an enumeration (enumeration type), a hot vector, or a bit mask. For a small number of categories, any of these approaches can be used; however, in situations where each task can only depend on one other resource type in the chain (but can depend on more than one task, but these tasks are all associated with the same category and resource ID) and this produces a small task queue, using an enumeration is more scalable (e.g., to any number of categories).
[0064] In the above example, resources are tracked at the resource level based on resource ID. In the example where multiple tasks write to different non-overlapping parts of the same resource, the resources written by the tasks can be tracked at a finer level, and this enables tracking of tasks at sub-task granularity. For example, for a many-to-many situation where multiple coefficient tasks write to non-overlapping parts of the same resource (and therefore have the same resource ID), such as Figure 3 ), finer parameters may be provided along with or in place of the resource ID. This may enable some work tasks to begin running before all coefficient tasks are complete, because the finer parameters may be used to determine that all coefficient tasks that write data to a particular portion of a resource on which the work task depends are complete. For example, the finer parameters may be implemented using an additional mask that describes the portion of a resource that a subtask writes (if a parent task) or reads (if a subtask). Portions of a resource may be referred to as subresources. With this subtask granularity, selection of a task (in box 504) determines that a task cannot be selected (i.e., the task is ineligible) if there is a matching mask for a subresource region.
[0065] Figure 7 A computer system in which the graphics processing system described herein can be implemented is shown. The computer system includes a CPU 702, a GPU 704, a memory 706, a neural network accelerator (NNA) 708, and other devices 714, such as a display 716, a speaker 718, and a camera 722. A resource management unit 710 (corresponding to the resource management unit 612) and a plurality of task queues 712 (corresponding to the task queues 616) are implemented on the GPU 704. In other examples, one or more of the components depicted can be omitted from the system. The components of the computer system can communicate with each other via a communication bus 720.
[0066] Figure 6The GPU is shown as including several functional blocks. This is merely schematic and is not intended to define a strict division between different logical elements of such entities. Each functional block may be provided in any suitable manner. It should be understood that intermediate values described herein as being formed by the methods described herein need not be physically generated by the GPU at any point in time, and may merely represent logical values that conveniently describe the processing performed by the GPU between its inputs and outputs.
[0067] The GPU described herein may be included in hardware on an integrated circuit. The GPU described herein may be configured to perform any of the methods described herein. In general, any of the functions, methods, techniques, or components described above may be implemented in software, firmware, hardware (e.g., fixed logic circuits), or any combination thereof. The terms "module," "functionality," "component," "element," "unit," "block," and "logic" may be used herein to generally represent software, firmware, hardware, or any combination thereof. In the case of software implementation, a module, functionality, component, element, unit, block, or logic represents a program code that, when executed on a processor, performs a specified task. The algorithms and methods described herein may be performed by one or more processors that execute code, which causes the processor to perform the algorithm / method. Examples of computer-readable storage media include random access memory (RAM), read-only memory (ROM), optical disks, flash memory, hard disk storage, and other memory devices that may use magnetic, optical, and other technologies to store instructions or other data and may be accessed by a machine.
[0068] As used herein, the terms computer program code and computer readable instructions refer to any kind of executable code for a processor, including code expressed in a machine language, an interpreted language, or a scripting language. Executable code includes binary code, machine code, byte code, code that defines an integrated circuit (such as a hardware description language or a netlist), and code expressed in a programming language code such as C, Java, or OpenCL. Executable code can be, for example, any kind of software, firmware, script, module, or library that, when properly executed, processed, interpreted, compiled, run in a virtual machine or other software environment, causes a processor of a computer system supporting the executable code to perform the tasks specified by the code.
[0069] A processor, computer or computer system may be any kind of device, machine or special purpose circuit, or a collection or part thereof, which has processing capabilities so that instructions can be executed. A processor may be or include any kind of general or special purpose processor, such as a CPU, GPU, NNA, system on chip, state machine, media processor, application specific integrated circuit (ASIC), programmable logic array, field programmable gate array (FPGA), etc. A computer or computer system may include one or more processors.
[0070] It is also intended to cover software that defines the configuration of hardware as described herein, such as HDL (Hardware Description Language) software, such as used for designing integrated circuits or for configuring programmable chips to implement desired functions. That is, a computer-readable storage medium may be provided having encoded thereon computer-readable program code in the form of an integrated circuit definition data set that, when processed (i.e., run) in an integrated circuit manufacturing system, configures the system to manufacture a GPU configured to perform any of the methods described herein, or to manufacture a GPU that includes any of the devices described herein. The integrated circuit definition data set may be, for example, an integrated circuit description.
[0071] Thus, a method of manufacturing a GPU as described herein at an integrated circuit manufacturing system may be provided. In addition, an integrated circuit definition data set may be provided which, when processed in an integrated circuit manufacturing system, enables the method of manufacturing a GPU to be performed.
[0072] The integrated circuit definition data set may be in the form of computer code, for example, as a netlist, code for configuring a programmable chip, as a hardware description language that defines hardware suitable for fabrication at any level in an integrated circuit, including as register transfer level (RTL) code; as a high-level circuit representation, such as Verilog or VHDL; and as a low-level circuit representation, such as OASIS (RTM) and GDSII. Higher-level representations that logically define hardware suitable for fabrication in an integrated circuit, such as RTL, may be processed at a computer system configured to generate a manufacturing definition of the integrated circuit in the context of a software environment that includes definitions of circuit elements and rules for combining those elements to generate a manufacturing definition of the integrated circuit so defined by the representation. As is typically the case with software executed at a computer system to define a machine, one or more intermediate user steps (e.g., providing commands, variables, etc.) may be required to configure the computer system to generate a manufacturing definition of the integrated circuit to execute code that defines the integrated circuit to generate the manufacturing definition of the integrated circuit.
[0073] Now about Figure 8An example of processing an integrated circuit definition data set at an integrated circuit manufacturing system to configure the system to manufacture a GPU is described.
[0074] Figure 8 An example of an integrated circuit (IC) manufacturing system 802 is shown, which is configured to manufacture a GPU as described in any of the examples herein. In particular, the IC manufacturing system 802 includes a layout processing system 804 and an integrated circuit generation system 806. The IC manufacturing system 802 is configured to receive an IC definition data set (e.g., defining a GPU as described in any of the examples herein), process the IC definition data set, and generate an IC (e.g., which includes a GPU as described in any of the examples herein) based on the IC definition data set. Processing of the IC definition data set configures the IC manufacturing system 802 to manufacture an integrated circuit that includes a GPU as described in any of the examples herein.
[0075] The layout processing system 804 is configured to receive and process an IC definition data set to determine a circuit layout. Methods for determining a circuit layout based on an IC definition data set are known in the art and may, for example, involve synthesizing RTL code to determine a gate-level representation of a circuit to be generated, such as in terms of logic components (e.g., NAND, NOR, AND, OR, MUX, and FLIP-FLOP components). By determining location information for the logic components, the circuit layout may be determined based on the gate-level representation of the circuit. This may be done automatically or with user involvement in order to optimize the circuit layout. When the layout processing system 804 determines the circuit layout, it may output the circuit layout definition to the IC generation system 806. The circuit layout definition may be, for example, a circuit layout description.
[0076] IC generation system 806 generates an IC according to a circuit layout definition as is known in the art. For example, IC generation system 806 may implement a semiconductor device manufacturing process for generating an IC, which may include a multi-step sequence of photolithography and chemical processing steps during which electronic circuits are gradually formed on a wafer made of semiconductor material. The circuit layout definition may be in the form of a mask that may be used in a photolithography process to generate an IC according to the circuit definition. Alternatively, the circuit layout definition provided to IC generation system 806 may be in the form of a computer readable code that the IC generation system 806 may use to form an appropriate mask for generating the IC.
[0077] The different processes performed by the IC manufacturing system 802 can all be in one location, e.g., implemented by one party. Alternatively, the IC manufacturing system 802 can be a distributed system such that some of these processes can be performed in different locations and can be performed by different parties. For example, some of the following stages can be performed in different locations and / or by different parties: (i) synthesizing RTL code representing an IC definition data set to form a gate-level representation of a circuit to be generated; (ii) generating a circuit layout based on the gate-level representation; (iii) forming a mask based on the circuit layout; and (iv) using the mask to manufacture the integrated circuit.
[0078] In other examples, processing an integrated circuit definition data set at an integrated circuit manufacturing system may configure the system to manufacture a GPU without processing the IC definition data set to determine the circuit layout. For example, an integrated circuit definition data set may define a configuration of a reconfigurable processor (such as an FPGA), and processing the data set may configure the IC manufacturing system to produce a reconfigurable processor having the defined configuration (e.g., by loading the configuration data into the FPGA).
[0079] In some embodiments, the integrated circuit manufacturing definition data set, when processed in the integrated circuit manufacturing system, can cause the integrated circuit manufacturing system to generate an apparatus as described herein. Figure 8 An integrated circuit manufacturing system may be configured in the manner described to manufacture the apparatus described herein.
[0080] In some examples, the integrated circuit definition data set may include software that runs on, or in combination with, hardware defined at the data set. Figure 8 In the example shown, the IC generation system can be further configured by the integrated circuit definition dataset to load firmware onto the integrated circuit according to the program code defined in the integrated circuit definition dataset when manufacturing the integrated circuit, or otherwise provide the integrated circuit with program code for use with the integrated circuit.
[0081] Compared to known implementations, the implementation of the concepts set forth in this application in devices, equipment, modules and / or systems (and in the methods implemented herein) can cause performance improvements. The performance improvements may include one or more of improved computing performance, reduced latency, increased throughput and / or reduced power consumption. During the manufacture of such devices, equipment, modules and systems (e.g., in integrated circuits), a trade-off may be made between performance improvements and physical implementations to improve the manufacturing method. For example, a trade-off may be made between performance improvements and layout area to match the performance of known implementations, but using less silicon. For example, this can be accomplished by reusing functional blocks in a serial manner or sharing functional blocks between elements of devices, equipment, modules and / or systems. In contrast, the concepts set forth in this application that cause improvements in the physical implementations of devices, equipment, modules and systems (e.g., reduced silicon area) may be weighed against performance improvements. This can be accomplished, for example, by manufacturing multiple instances of a module within a predefined area budget.
[0082] Applicants hereby independently disclose each individual feature described herein and any combination of two or more such features, to the extent that such feature or combination can be implemented based on the specification as a whole in view of the common general knowledge of a person skilled in the art, regardless of whether such feature or combination of features solves any problem disclosed herein. In view of the foregoing description, it will be clear to a person skilled in the art that various modifications can be made within the scope of the invention.
Claims
1. A method for managing task dependencies in a task queue of a GPU, the method comprising: determining a class ID and a resource ID for the task and also for any parent tasks of the task, wherein the class ID identifies the class of the task from a hierarchy of task classes and the resource ID of the task identifies a resource allocated and / or written by the task; as well as The category ID and the resource ID of both the task itself and any parent tasks of the task are output for storage in a task queue in association with the task. 2 . The method of claim 1 , wherein determining a resource ID for a task comprises assigning a resource ID to the task.
3. The method of claim 2, wherein assigning a resource ID to the task comprises: allocating resources to the tasks; as well as The task is assigned a resource ID for the allocated resource. 4 . The method of claim 1 , wherein the resource comprises a shared register, a coefficient register, or a local memory register.
5. A method for scheduling tasks in a GPU, the method comprising: examining a task in a task queue and parameters associated with the task, wherein the parameters include a class ID and a resource ID of both the task itself and any parent task of the task, wherein the class ID identifies a class of the task from a hierarchy of task classes, and the resource ID of the task identifies a resource allocated and / or written by the task; selecting a task for execution based on the order of tasks in the queue and the parameters; as well as Sends the selected tasks for execution.
6. The method of claim 5, wherein selecting a task for execution based on the order of the tasks in the queue and the parameter comprises: A task in the task queue is selected that has a parent task category ID and a parent resource ID that do not match the category ID and resource ID of any task preceding it in the task queue. The method of claim 5 , wherein a resource ID is assigned to a task when the task is created.
8. The method of claim 5, wherein the task selected for execution is additionally based on a master unit that issued the task in the task queue.
9. The method according to claim 5, wherein the task queue includes tasks waiting to be executed and tasks currently being executed.
10. A GPU resource management unit, comprising: hardware logic arranged into tasks and further determining a class ID and a resource ID for any parent task of the task, wherein the class ID identifies the class of the task from a hierarchy of task classes and the resource ID of the task identifies a resource allocated and / or written by the task; as well as An output is arranged to output the category ID and the resource ID of both the task itself and any parent tasks of the task for storage in a task queue in association with the task.
11. The resource management unit of claim 10, wherein the hardware logic is arranged to determine a resource ID for a task by assigning a resource ID to the task.
12. The resource management unit of claim 11, wherein assigning a resource ID to the task comprises: allocating resources to the tasks; as well as The task is assigned a resource ID for the allocated resource.
13. The resource management unit of claim 10, wherein the resource comprises a shared register, a coefficient register, or a local memory register.
14. A GPU scheduling and processing logic, comprising: parsing logic arranged to examine tasks in the task queue and parameters associated with the tasks, wherein the parameters include a class ID and a resource ID of both the task itself and any parent tasks of the task, wherein the class ID identifies a class of the task from a hierarchy of task classes, and the resource ID of the task identifies a resource allocated and / or written by the task; as well as Selection logic is arranged to select a task for execution based on an order of tasks in the queue and the parameter, and to send the selected task for execution.
15. The scheduling and processing logic of claim 14, wherein the selection logic is arranged to select a task for execution based on the order of tasks in the queue and the parameter by: A task in the task queue is selected that has a parent task category ID and a parent resource ID that do not match the category ID and resource ID of any task preceding it in the task queue.
16. The scheduling and processing logic of claim 14, wherein the task queue includes tasks queued for execution and tasks currently running.
17. A GPU, comprising: A resource management unit according to any one of claims 10 to 13; The scheduling and processing logic according to any one of claims 14 to 18; the task queue; and The resource.
18. A GPU configured to execute the method according to any one of claims 1-9.
19. A method for manufacturing graphics hardware using an integrated circuit manufacturing system, the graphics hardware comprising a resource management unit according to any one of claims 10-13 or a scheduling and processing logic according to any one of claims 14-16, the method comprising: processing the computer-readable description of the graphics hardware using a layout processing system to generate a circuit layout description of an integrated circuit including the graphics hardware; as well as The graphics hardware is manufactured according to the circuit layout description using an integrated circuit generation system.
20. An integrated circuit manufacturing system, comprising: A non-transitory computer-readable storage medium having stored thereon a computer-readable description of graphics hardware, the graphics hardware comprising a resource management unit according to any one of claims 10-13 or scheduling and processing logic according to any one of claims 14-16; a layout processing system configured to process the computer-readable description to generate a circuit layout description of an integrated circuit including the graphics hardware; as well as An integrated circuit generation system is configured to manufacture the graphics hardware according to the circuit layout description.
