Sequence-independent asynchronous computation and streaming for graphics
By introducing parallel processing systems and graphics multi-processors into graphics processors, parallel processing and asynchronous calculation of graphics data are realized, which solves the performance bottleneck of graphics processors in sequential independent asynchronous calculation and stream transmission, and improves graphics rendering performance.
Patent Information
- Application Number
- CN201810343745.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-04-17
- Filing Date
- 2018-04-17
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2038-04-17
AI Technical Summary
When existing graphics processors perform graphics data processing, the fixed-function computing unit limits the flexibility and efficiency of operations. Especially when sequential independent asynchronous calculations and stream transmission are required, it is difficult to fully utilize processor resources, resulting in performance bottlenecks. .
A parallel processing system is designed, which includes multiple parallel processors and graphics processing units. It realizes parallel processing and reordering of graphics data through communication links and schedulers between parallel processors, and supports asynchronous calculation and streaming of graphics pipelines. Send, using graphics multiprocessors and graphics processing engines for efficient processing of graphics data.
It improves the efficiency and flexibility of graphics processing, makes better use of processor resources, realizes efficient parallel processing and asynchronous calculation of graphics data, and improves graphics rendering performance.
Smart Images

Figure CN108734634B_ABST
Abstract
Description
Technical Field
[0001] Embodiments generally relate to data processing and graphics processing via a graphics processing unit. More specifically, embodiments relate to sequential independent asynchronous computing and / or streaming for graphics. Background Art
[0002] Current parallel graphics data processing includes systems and methods developed to perform specific operations on graphics data, such as, for example, linear interpolation, tessellation, rasterization, texture mapping, depth testing, etc. Conventionally, graphics processors use fixed-function compute units to process graphics data; however, recently, some graphics processors have been made programmable, enabling such processors to support a wide variety of operations for processing vertex and fragment data. In some systems, the various operations may be performed synchronously or in a particular order. BRIEF DESCRIPTION OF THE DRAWINGS
[0003] Various advantages of the embodiments will become apparent to those skilled in the art from a reading of the following description and appended claims, and from a reference to the following drawings, in which:
[0004] Figure 1 is a block diagram illustrating a computer system configured to implement one or more aspects of the embodiments described herein;
[0005] Figures 2A-2D shows a parallel processor component according to an embodiment;
[0006] Figure 3A-3B is a block diagram of a graphics multiprocessor according to an embodiment;
[0007] Figures 4A-4F An exemplary architecture is shown in which multiple GPUs are communicatively coupled to multiple multi-core processors;
[0008] Figure 5 shows a graphics processing pipeline according to an embodiment;
[0009] Figure 6 is a block diagram of an example of an electronic processing system according to an embodiment;
[0010] Fig. 7A is a block diagram of an example of a graphics device according to an embodiment;
[0011] Figures 7B to 7C is a flowchart of an example of a method of reordering draw calls according to an embodiment;
[0012] Figures 7D to 7F is an illustrative diagram of an example of reordered draw calls according to an embodiment;
[0013] Fig. 8Ais a block diagram of another example of a graphics device according to an embodiment;
[0014] Figures 8B to 8C is a flowchart of an example of a method of reordering work items according to an embodiment;
[0015] Figures 8D to 8E is an explanatory diagram of an example of reordering work items according to an embodiment;
[0016] Fig.8F is a block diagram of an example of a graphics system according to an embodiment;
[0017] Figure 8G is a block diagram of another example of a graphics system according to an embodiment;
[0018] Fig.9A is a block diagram of another example of a graphics device according to an embodiment;
[0019] Figures 9B to 9C is a flow chart of an example of a method of processing a graphics workload according to an embodiment;
[0020] Fig.9D is a block diagram of another example of a graphics system according to an embodiment;
[0021] Fig. 10A is a block diagram of another example of a graphics device according to an embodiment;
[0022] Fig. 10B is a flow chart of an example of a method of processing a graphics workload according to an embodiment;
[0023] Fig. 10C is a block diagram of another example of a graphics system according to an embodiment;
[0024] Fig. 10D is a block diagram of an example of a job scheduler according to an embodiment;
[0025] Fig. 10E is an explanatory diagram of an example of a rendering target according to an embodiment;
[0026] Fig.10F is an illustrative diagram of an example of tile-based asynchronous computing according to an embodiment;
[0027] Figures 10G to 10H is an explanatory diagram of another example of tile-based asynchronous computing according to an embodiment;
[0028] Fig.11 is an illustration of an example of a head mounted display (HMD) system according to an embodiment;
[0029] Fig.12 According to the embodiment, it includes Fig.11A block diagram of an example of functional components in an HMD system;
[0030] Fig.13 is a block diagram of an example of a general processing cluster included in a parallel processing unit according to an embodiment;
[0031] Fig.14 is a conceptual illustration of an example of a graphics processing pipeline that may be implemented within a parallel processing unit according to an embodiment;
[0032] Fig.15 is a block diagram of an example of a streaming multiprocessor according to an embodiment;
[0033] Figure 16-18 is a block diagram of an example of an overview of a data processing system according to an embodiment;
[0034] Fig.19 is a block diagram of an example of a graphics processing engine according to an embodiment;
[0035] Figure 20-22 is a block diagram of an example of an execution unit according to an embodiment;
[0036] Fig.23 is a block diagram of an example of a graphics pipeline according to an embodiment;
[0037] Figures 24A-24B is a block diagram of an example of graphics pipeline programming according to an embodiment;
[0038] Fig.25 is a block diagram of an example of a graphics software architecture according to an embodiment;
[0039] Fig.26 is a block diagram of an example of an intellectual property (IP) core development system according to an embodiment; and
[0040] Fig. 27 is a block diagram of an example of a system on chip integrated circuit according to an embodiment. DETAILED DESCRIPTION
[0041] In the following description, many specific details are set forth to provide a more comprehensive understanding of the present disclosure. However, it will be apparent to one of ordinary skill in the art that the present invention may be practiced without one or more of these specific details. In other instances, well-known features have not been described in order to avoid obscuring the present invention.
[0042] System Overview
[0043] Figure 11 is a block diagram illustrating a computing system configured to implement one or more aspects of the embodiments described herein. The computing system 100 includes a processing subsystem 101 having one or more processors 102 and a system memory 104, the one or more processors 102 communicating with the system memory 104 via an interconnect path that may include a memory hub 105. The memory hub 105 may be a separate component within a chipset component, or may be integrated within the one or more processors 102. The memory hub 105 is coupled to an I / O subsystem 111 via a communication link 106. The I / O subsystem 111 includes an I / O hub 107 that may enable the computing system 100 to receive input from one or more input devices 108. Additionally, the I / O hub 107 may enable a display controller to provide output to one or more display devices 110A, which may be included in the one or more processors 102. In one embodiment, the one or more display devices 110A coupled to the I / O hub 107 may include local, internal, or embedded display devices.
[0044] In one embodiment, the processing subsystem 101 includes one or more parallel processors 112, which are coupled to the memory hub 105 via a bus or other communication link 113. The communication link 113 can be one of any number of standard-based communication link technologies or protocols (such as, but not limited to, PCI Express), or can be a vendor-specific communication interface or communication structure. In one embodiment, the one or more parallel processors 112 form a computationally focused parallel or vector processing system that includes a large number of processing cores and / or processing clusters (such as, a many-in-one (MIC) processor). In one embodiment, the one or more parallel processors 112 form a graphics processing subsystem that can output pixels to one of the one or more display devices 110A coupled via the I / O hub 107. The one or more parallel processors 112 may also include a display controller and display interface (not shown) to enable direct connection to one or more display devices 110B.
[0045] Within the I / O subsystem 111, a system storage unit 114 may be connected to the I / O hub 107 to provide a storage mechanism for the computing system 100. An I / O switch 116 may be used to provide an interface mechanism to enable connection between the I / O hub 107 and other components, such as a network adapter 118 and / or a wireless network adapter 119 that may be integrated into the platform, and various other devices that may be added via one or more plug-in devices 120. The network adapter 118 may be an Ethernet adapter or another wired network adapter. The wireless network adapter 119 may include one or more of the following: Wi-Fi, Bluetooth, near field communication (NFC), or another network device including one or more wireless radios.
[0046] The computing system 100 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, and the like, which may also be connected to the I / O hub 107. Figure 1 The communication paths interconnecting the various components in the system may be implemented using any suitable protocol, such as a PCI (Peripheral Component Interconnect) based protocol (e.g., PCI Express) or any other bus or point-to-point communication interface and / or protocol (such as, NV-Link high-speed interconnect, or interconnect protocols known in the art).
[0047] In one embodiment, the one or more parallel processors 112 incorporate circuits optimized for graphics and video processing (including, for example, video output circuits) and constitute a graphics processing unit (GPU). In another embodiment, the one or more parallel processors 112 incorporate circuits optimized for general-purpose processing while maintaining the underlying computing architecture described in more detail herein. In yet another embodiment, the components of the computing system 100 may be integrated on a single integrated circuit along with one or more other system elements. For example, the one or more parallel processors 112, the memory hub 105, the processor 102, and the I / O hub 107 may be integrated into a system-on-chip (SoC) integrated circuit. Alternatively, the components of the computing system 100 may be integrated into a single package to form a system-in-package (SIP) configuration. In one embodiment, at least a portion of the components of the computing system 100 may be integrated into a multi-chip module (MCM), which may be interconnected with other multi-chip modules into a modular computing system.
[0048] It will be appreciated that the computing system 100 shown herein is illustrative and that variations and modifications are possible. The connection topology, including the number and arrangement of bridges, the number of processor(s) 102, and the number of parallel processor(s) 112, may be modified as desired. For example, in some embodiments, the system memory 104 is connected to the processor(s) 102 directly rather than through a bridge, while other devices communicate with the processor(s) 102 and the system memory 104 via the memory hub 105. In other alternative topologies, the parallel processor(s) 112 are connected to the I / O hub 107 or directly to one of the processor(s) 102, rather than to the memory hub 105. In other embodiments, the I / O hub 107 and the memory hub 105 may be integrated into a single chip. Some embodiments may include two or more groups of processors 102 attached via multiple sockets, which may be coupled to two or more instances of the parallel processor(s) 112.
[0049] Some of the specific components shown herein are optional and may not be included in all implementations of computing system 100. For example, any number of plug-in cards or peripheral devices may be supported, or some components may be eliminated. In addition, some architectures may be different from those described above. Figure 1 Different terminology is used for components that are similar to those shown in FIG. 1. For example, in some architectures, memory hub 105 may be referred to as a north bridge, while I / O hub 107 may be referred to as a south bridge.
[0050] Figure 2A 200 according to an embodiment. The various components of the parallel processor 200 may be implemented using one or more integrated circuit devices, such as a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). According to an embodiment, the parallel processor 200 shown is Figure 1 A variation of one or more parallel processors 112 is shown in .
[0051] In one embodiment, the parallel processor 200 includes a parallel processing unit 202. The parallel processing unit includes an I / O unit 204, which is capable of communicating with other devices (including other instances of the parallel processing unit 202). The I / O unit 204 can be directly connected to other devices. In one embodiment, the I / O unit 204 is connected to other devices via the use of a hub or switch interface (such as a memory hub 105). The connection between the memory hub 105 and the I / O unit 204 forms a communication link 113. Within the parallel processing unit 202, the I / O unit 204 is connected to a host interface 206 and a memory crossbar 216, wherein the host interface 206 receives commands for performing processing operations and the memory crossbar 216 receives commands for performing memory operations.
[0052] When the host interface 206 receives the command buffer via the I / O unit 204, the host interface 206 can direct the work operations for executing those commands to the front end 208. In one embodiment, the front end 208 is coupled with a scheduler 210, which is configured to distribute commands or other work items to the processing cluster array 212. In one embodiment, the scheduler 210 ensures that the processing cluster array 212 is properly configured and in a valid state before the tasks are distributed to the processing clusters of the processing cluster array 212. In one embodiment, the scheduler 210 is implemented via firmware logic executed on a microcontroller. The microcontroller-implemented scheduler 210 can be configured to perform complex scheduling and work distribution operations at coarse and fine granularity, thereby enabling context switching and rapid preemption of threads executed on the processing array 212. In one embodiment, the host software can verify that the workload is scheduled on the processing array 212 via one of a plurality of graphics processing doorbells. The workload may then be automatically distributed across the processing array 212 by the scheduler 210 logic within the scheduler microcontroller.
[0053] Processing cluster array 212 may include up to "N" processing clusters (e.g., cluster 214A, cluster 214B, up to cluster 214N). Each cluster 214A-214N of processing cluster array 212 may execute a large number of concurrent threads. Scheduler 210 may use various scheduling and / or work distribution algorithms to assign work to clusters 214A-214N of processing cluster array 212, which may vary depending on the workload generated for each type of program or calculation. Scheduling may be handled dynamically by scheduler 210, or may be assisted in part by compiler logic during compilation of program logic configured for execution by processing cluster array 212. In one embodiment, different clusters 214A-214N of processing cluster array 212 may be assigned to process different types of programs, or to perform different types of calculations.
[0054] Processing cluster array 212 may be configured to perform various types of parallel processing operations. In one embodiment, processing cluster array 212 is configured to perform general-purpose parallel computing operations. For example, processing cluster array 212 may include logic for performing processing tasks including filtering video and / or audio data, performing modeling operations (including physics operations), and performing data transformations.
[0055] In one embodiment, processing cluster array 212 is configured to perform parallel graphics processing operations. In embodiments where parallel processor 200 is configured to perform graphics processing operations, processing cluster array 212 may include additional logic for supporting the execution of such graphics processing operations, including but not limited to texture sampling logic for performing texture operations, and tessellation logic and other vertex processing logic. In addition, processing cluster array 212 may be configured to execute graphics processing related shader programs, such as but not limited to vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. Parallel processing unit 202 may transfer data from system memory via I / O unit 204 for processing. During processing, the transferred data may be stored in on-chip memory (e.g., parallel processor memory 222) during processing and then written back to system memory.
[0056] In one embodiment, when parallel processing unit 202 is used to perform graphics processing, scheduler 210 can be configured to divide the processing workload into tasks of approximately equal size to better enable the distribution of graphics processing operations to multiple clusters 214A-214N in processing cluster array 212. In some embodiments, multiple portions of processing cluster array 212 can be configured to perform different types of processing. For example, a first portion can be configured to perform vertex shading and topology generation, a second portion can be configured to perform tessellation and geometry shading, and a third portion can be configured to perform pixel shading or other screen space operations to generate a rendered image for display. Intermediate data generated by one or more of clusters 214A-214N can be stored in a buffer to allow the intermediate data to be transferred between clusters 214A-214N for further processing.
[0057] During operation, the processing cluster array 212 may receive processing tasks to be performed via the scheduler 210, which receives commands defining the processing tasks from the front end 208. For graphics processing operations, the processing tasks may include command and state parameters defining how data is to be processed (e.g., what program is to be executed) and indices of the data to be processed (e.g., surface (patch) data, primitive data, vertex data, and / or pixel data). The scheduler 210 may be configured to obtain an index corresponding to a task, or may receive an index from the front end 208. The front end 208 may be configured to ensure that the processing cluster array 212 is configured to a valid state before initiating a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.).
[0058] Each of the one or more instances of the parallel processing unit 202 may be coupled to a parallel processor memory 222. The parallel processor memory 222 may be accessed via a memory crossbar 216, which may receive memory requests from the processing cluster array 212 and the I / O unit 204. The memory crossbar 216 may access the parallel processor memory 222 via a memory interface 218. The memory interface 218 may include a plurality of partition units (e.g., partition unit 220A, partition unit 220B, up to partition unit 220N), which may each be coupled to a portion (e.g., memory unit) of the parallel processor memory 222. In one implementation, the number of partition units 220A-220N is configured to be equal to the number of memory units, such that the first partition unit 220A has a corresponding first memory unit 224A, the second partition unit 220B has a corresponding memory unit 224B, and the Nth partition unit 220N has a corresponding Nth memory unit 224N. In other embodiments, the number of partition units 220A-220N may not be equal to the number of memory devices.
[0059] In various embodiments, the memory units 224A-224N may include various types of memory devices, including dynamic random access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. In one embodiment, the memory units 224A-224N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM). Those skilled in the art will recognize that the specific implementation of the memory units 224A-224N may vary and may be selected from one of various conventional designs. Rendering targets (such as frame buffers or texture maps) may be stored across the memory units 224A-224N, allowing the partition units 220A-220N to write multiple portions of each rendering target in parallel to efficiently use the available bandwidth of the parallel processor memory 222. In some embodiments, local instances of the parallel processor memory 222 may be excluded to facilitate the unified memory design of the system memory to be utilized in conjunction with the local cache memory.
[0060] In one embodiment, any of the clusters 214A-214N of the processing cluster array 212 can process data to be written to any of the memory units 224A-224N within the parallel processor memory 222. The memory crossbar 216 can be configured to transfer the output of each cluster 214A-214N to any partition unit 220A-220N or another cluster 214A-214N, which can perform additional processing operations on the output. Each cluster 214A-214N can communicate with the memory interface 218 through the memory crossbar 216 to read from or write to various external memory devices. In one embodiment, the memory crossbar 216 has a connection to the memory interface 218 to communicate with the I / O unit 204, as well as a connection to a local instance of the parallel processor memory 222, thereby enabling the processing units within different processing clusters 214A-214N to communicate with the system memory or other memory that is not local to the parallel processing unit 202. In one embodiment, the memory crossbar switch 216 may use virtual channels to separate traffic flows between the clusters 214A-214N and the partition units 220A-220N.
[0061] Although a single instance of parallel processing unit 202 is shown in parallel processor 200, any number of instances of parallel processing unit 202 may be included. For example, multiple instances of parallel processing unit 202 may be provided on a single plug-in card, or multiple plug-in cards may be interconnected. Different instances of parallel processing unit 202 may be configured to interoperate even if the different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. For example and in one embodiment, some instances of parallel processing unit 202 may include higher precision floating point units relative to other instances. Systems that incorporate one or more instances of parallel processing unit 202 or parallel processor 200 may be implemented in a variety of configurations and form factors, including but not limited to desktop, laptop, or handheld personal computers, servers, workstations, game consoles, and / or embedded systems.
[0062] Figure 2B is a block diagram of a partition unit 220 according to an embodiment. In one embodiment, the partition unit 220 is Figure 2A2 is an example of one of the partition units 220A-220N of the processor. As shown, the partition unit 220 includes an L2 cache 221, a frame buffer interface 225, and an ROP 226 (raster operation unit). The L2 cache 221 is a read / write cache that is configured to perform load and store operations received from the memory crossbar switch 216 and the ROP 226. Read misses and urgent write-back requests are output by the L2 cache 221 to the frame buffer interface 225 for processing. Updates may also be sent to the frame buffer via the frame buffer interface 225 for processing. In one embodiment, the frame buffer interface 225 interfaces with one of the memory units in the parallel processor memory, such as the memory units 224A-224N of FIG. 2 (e.g., within the parallel processor memory 222).
[0063] In graphics applications, ROP 226 is a processing unit that performs raster operations such as stencil, z-test, blending, and the like. ROP 226 then outputs processed graphics data that is stored in graphics memory. In some embodiments, ROP 226 includes compression logic that compresses depth or color data written to memory and decompresses depth or color data read from memory. The compression logic can be lossless compression logic that utilizes one or more of a variety of compression algorithms. The type of compression performed by ROP 226 can vary based on the statistical characteristics of the data to be compressed. For example, in one embodiment, delta color compression is performed on depth and color data on a tile-by-tile basis.
[0064] In some embodiments, ROP 226 is included within each processing cluster (e.g., clusters 214A-214N of FIG. 2 ) rather than within partition unit 220. In such embodiments, read and write requests for pixel data rather than pixel fragment data are transmitted through memory crossbar 216. The processed graphics data may be displayed on a display device (e.g., Figure 1 100), is routed for further processing by the processor(s) 102, or is routed for processing by the processor(s) 102. Figure 2A One of the processing entities within parallel processor 200 further processes.
[0065] Figure 2C2 is a block diagram of a processing cluster 214 within a parallel processing unit according to an embodiment. In one embodiment, the processing cluster is an instance of one of the processing clusters 214A-214N of FIG. 2. The processing cluster 214 can be configured to execute many threads in parallel, wherein the term "thread" refers to an instance of a specific program executed on a specific set of input data. In some embodiments, without providing multiple independent instruction units, a single instruction multiple data (SIMD) instruction issuance technique is used to support the parallel execution of a large number of threads. In other embodiments, a public instruction unit configured to issue instructions to a group of processing engines within each of the processing clusters is used, and a single instruction multiple thread (SIMT) technique is used to support the parallel execution of a large number of generally synchronized threads. Unlike the SIMD execution regime (wherein all processing engines usually execute the same instruction), SIMT execution allows different threads to more easily pass through a given thread program along a divergent execution path. It will be understood by those skilled in the art that the SIMD processing regime represents a functional subset of the SIMT processing regime.
[0066] The operation of the processing cluster 214 can be controlled via a pipeline manager 232, which distributes processing tasks to SIMT parallel processors. The pipeline manager 232 receives instructions from the scheduler 210 of Figure 2 and manages the execution of those instructions via the graphics multiprocessor 234 and / or the texture unit 236. The graphics multiprocessor 234 shown is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures can be included in the processing cluster 214. One or more instances of the graphics multiprocessor 234 can be included in the processing cluster 214. The graphics multiprocessor 234 can process data, and a data crossbar 240 can be used to distribute the processed data to one of multiple possible destinations (including other shader units). The pipeline manager 232 can facilitate the distribution of processed data by specifying the destination of the processed data to be distributed via the data crossbar 240.
[0067] Each graphics multiprocessor 234 within a processing cluster 214 may include the same set of function execution logic (e.g., arithmetic logic units, load-store units, etc.). The function execution logic may be configured in a pipelined manner, in which a new instruction may be issued before a previous instruction is completed. The function execution logic supports a wide variety of operations, including integer and floating point arithmetic, comparison operations, Boolean operations, bit-shifting, and calculation of various algebraic functions. In one embodiment, the same functional unit hardware may be utilized to perform different operations, and any combination of functional units may exist.
[0068] The instructions transmitted to the processing cluster 214 constitute threads. A group of threads executed across a group of parallel processing engines is a thread group. A thread group executes the same program on different input data. Each thread in a thread group can be assigned to a different processing engine in the graphics multiprocessor 234. A thread group may include fewer threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes fewer threads than the number of processing engines, one or more of the processing engines may be idle during the cycle in which the thread group is being processed. A thread group may also include more threads than the number of processing engines in the graphics multiprocessor 234. When a thread group includes more threads than the number of processing engines in the graphics multiprocessor 234, processing may be performed on consecutive clock cycles. In one embodiment, multiple thread groups may be executed concurrently on the graphics multiprocessor 234.
[0069] In one embodiment, the graphics multiprocessor 234 includes an internal cache memory for performing load and store operations. In one embodiment, the graphics multiprocessor 234 can abandon the internal cache and use the cache memory (e.g., L1 cache 308) within the processing cluster 214. Each graphics multiprocessor 234 also has access to the L2 cache within the partition unit (e.g., partition unit 220A-220N of Figure 2) that is shared in all processing clusters 214 and can be used to transfer data between threads. The graphics multiprocessor 234 can also access off-chip global memory, which can include one or more of the local parallel processor memory and / or system memory. Any memory outside the parallel processing unit 202 can be used as global memory. Embodiments (wherein the processing cluster 214 includes multiple instances of the graphics multiprocessor 234) can share common instructions and data, which can be stored in the L1 cache 308.
[0070] Each processing cluster 214 may include an MMU 245 (memory management unit) configured to map virtual addresses into physical addresses. In other embodiments, one or more instances of the MMU 245 may reside within the memory interface 218 of FIG. 2 . The MMU 245 includes: a set of page table entries (PTEs) for mapping virtual addresses of tiles (more on tiling) to physical addresses; and optionally a cache line index. The MMU 245 may include an address translation lookaside buffer (TLB) or cache that may reside within the graphics multiprocessor 234 or L1 cache or processing cluster 214. Physical addresses are processed to distribute surface data access locality, thereby allowing efficient request interleaving in partition units. The cache line index can be used to determine whether a request for a cache line is a hit or a miss.
[0071] In graphics and computing applications, the processing clusters 214 may be configured such that each graphics multiprocessor 234 is coupled to a texture unit 236 for performing texture mapping operations, such as determining texture sample locations, reading texture data, and filtering texture data. Texture data is read from an internal texture L1 cache (not shown) or in some embodiments from an L1 cache within the graphics multiprocessor 234, and retrieved from an L2 cache, local parallel processor memory, or system memory, as needed. Each graphics multiprocessor 234 outputs a processed task to a data crossbar 240 to provide the processed task to another processing cluster 214 for further processing or to store the processed task in an L2 cache, local parallel processor memory, or system memory via a memory crossbar 216. A preROP 242 (e.g., a pre-raster operation unit) is configured to receive data from the graphics multiprocessor 234, direct the data to a ROP unit, which may be located with a partition unit (e.g., partition units 220A-220N of FIG. 2 ) as described herein. The preROP 242 unit may perform optimizations for color blending, organize pixel color data, and perform address translations.
[0072] It will be appreciated that the core architecture described herein is illustrative and that variations and modifications are possible. Any number of processing units (e.g., graphics multiprocessor 234, texture unit 236, preROP 242, etc.) may be included within a processing cluster 214. Furthermore, while only one processing cluster 214 is shown, a parallel processing unit as described herein may include any number of instances of a processing cluster 214. In one embodiment, each processing cluster 214 may be configured to operate independently of other processing clusters 214 using separate and distinct processing units, L1 caches, etc.
[0073] Figure 2D A graphics multiprocessor 234 is shown according to one embodiment. In such embodiments, the graphics multiprocessor 234 is coupled to the pipeline manager 232 of the processing cluster 214. The graphics multiprocessor 234 has an execution pipeline that includes, but is not limited to, an instruction cache 252, an instruction unit 254, an address mapping unit 256, a register file 258, one or more general purpose graphics processing unit (GPGPU) cores 262, and one or more load / store units 266. The GPGPU cores 262 and the load / store units 266 are coupled to a cache memory 272 and a shared memory 270 via a memory and cache interconnect 268.
[0074] In one embodiment, the instruction cache 252 receives a stream of instructions to be executed from the pipeline manager 232. The instructions are cached in the instruction cache 252 and dispatched by the instruction unit 254 for execution. The instruction unit 254 can dispatch instructions into thread groups (e.g., warps), where each thread of the thread group is assigned to a different execution unit within the GPGPU core 262. Instructions can access any of the local, shared, or global address spaces by specifying an address within the unified address space. The address mapping unit 256 can be used to convert addresses in the unified address space into distinct memory addresses that can be accessed by the load / store unit 266.
[0075] The register file 258 provides a set of registers for the functional units of the graphics multiprocessor 324. The register file 258 provides temporary storage for operands for the data paths of the functional units (e.g., GPGPU core 262, load / store unit 266) connected to the graphics multiprocessor 324. In one embodiment, the register file 258 is divided between each of the functional units so that each functional unit is allocated a dedicated portion of the register file 258. In one embodiment, the register file 258 is divided between different warps executed by the graphics multiprocessor 324.
[0076] The GPGPU cores 262 may each include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU), the FPU and integer ALU being used to execute instructions of the graphics multiprocessor 324. Depending on the embodiment, the GPGPU cores 262 may be similar in architecture, or may be different in architecture. For example and in one embodiment, the first portion of the GPGPU core 262 includes a single-precision FPU and an integer ALU, while the second portion of the GPGPU core includes a double-precision FPU. In one embodiment, the FPU may implement the IEEE 754-2008 standard for floating-point arithmetic, or may be capable of variable-precision floating-point arithmetic. The graphics multiprocessor 324 may additionally include one or more fixed-function or special-function units to perform specific functions (such as copying rectangles or pixel blending operations). In one embodiment, one or more of the GPGPU cores may also include fixed or special-function logic.
[0077] In one embodiment, the GPGPU core 262 includes SIMD logic capable of executing a single instruction to multiple sets of data. In one embodiment, the GPGPU core 262 can physically execute SIMD4, SIMD8 and SIMD16 instructions, and logically execute SIMD1, SIMD2 and SIMD32 instructions. SIMD instructions for the GPGPU core can be generated by the shader compiler at compile time, or can be automatically generated when executing a program written and compiled for a single program multiple data (SPMD) or SIMT architecture. Multiple threads of a program configured for a SIMT execution model can be executed via a single SIMD instruction. For example and in one embodiment, eight SIMT threads performing the same or similar operation can be executed in parallel via a single SIMD8 logic unit.
[0078] The memory and cache interconnect 268 is an interconnect network that connects each of the functional units of the graphics multiprocessor 234 to the register file 258 and to the shared memory 270. In one embodiment, the memory and cache interconnect 268 is a crossbar interconnect that allows the load / store unit 266 to implement load and store operations between the shared memory 270 and the register file 258. The register file 258 can operate at the same frequency as the GPGPU core 262, so that data transfer between the GPGPU core 262 and the register file 258 is very low latency. The shared memory 270 can be used to enable communication between threads executed on the functional units within the graphics multiprocessor 234. The cache memory 272 can be used, for example, as a data cache to cache texture data communicated between the functional units and the texture unit 236. The shared memory 270 can also be used as a program-managed cache. Threads executing on the GPGPU core 262 can programmatically store data in the shared memory in addition to the automatically cached data stored in the cache memory 272.
[0079] Figure 3A-3B Additional graphics multiprocessors are shown according to an embodiment. The graphics multiprocessors 325, 350 shown are Figure 2C The illustrated graphics multiprocessors 325, 350 may be configured as streaming multiprocessors (SMs) capable of executing a large number of execution threads simultaneously.
[0080] Figure 3A A graphics multiprocessor 325 is shown according to an additional embodiment. The graphics multiprocessor 325 is Figure 2DThe graphics multiprocessor 234 includes multiple additional instances of execution resource units. For example, the graphics multiprocessor 325 may include multiple instances of instruction units 332A-332B, register files 334A-334B, and texture units 344A-344B. The graphics multiprocessor 325 also includes multiple groups of graphics or computing execution units (e.g., GPGPU cores 336A-336B, GPGPU cores 337A-337B, GPGPU cores 338A-338B) and multiple groups of load / store units 340A-340B. In one embodiment, the execution resource unit has a common instruction cache 330, texture and / or data cache memory 342, and shared memory 346.
[0081] Various components may communicate via interconnect structure 327. In one embodiment, interconnect structure 327 includes one or more crossbar switches to enable communication between various components of graphics multiprocessor 325. In one embodiment, interconnect structure 327 is a separate high-speed network fabric layer on which each component of graphics multiprocessor 325 is stacked. Components of graphics multiprocessor 325 communicate with remote components via interconnect structure 327. For example, GPGPU cores 336A-336B, 337A-337B, and 3378A-338B may each communicate with shared memory 346 via interconnect structure 327. Interconnect structure 327 may arbitrate communications within graphics multiprocessor 325 to ensure fair bandwidth allocation between components.
[0082] Figure 3B A graphics multiprocessor 350 according to an additional embodiment is shown. The graphics processor includes multiple sets of execution resources 356A-356D, wherein each set of execution resources includes multiple instruction units, register files, GPGPU cores, and load storage units, such as Figure 2D and Figure 3A . Execution resources 356A-356D may work in concert with texture units 360A-360D for texture operations while sharing instruction cache 354 and shared memory 362. In one embodiment, execution resources 356A-356D may share multiple instances of instruction cache 354 and shared memory 362 as well as texture and / or data cache memories 358A-358B. The various components may be communicated to one another via a communication protocol similar to Figure 3A The interconnect structure 327 and the interconnect structure 352 communicate with each other.
[0083] Those skilled in the art will understand that Figure 1 , 2AThe architectures described in Figures 2-2D and 3A-3B are illustrative and non-limiting with respect to the scope of the present embodiments. Thus, without departing from the scope of the embodiments described herein, the techniques described herein may be implemented on any properly configured processing unit, including but not limited to one or more mobile application processors, one or more desktop or server central processing units (CPUs) (including multi-core CPUs), one or more parallel processing units (such as parallel processing unit 202 of Figure 2), and one or more graphics processors or special purpose processing units.
[0084] In some embodiments, a parallel processor or GPGPU as described herein is communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU may be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect such as PCIe or NVLink). In other embodiments, the GPU may be integrated on the same package or chip as the core and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the manner in which the GPU is connected, the processor core can assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.
[0085] Technologies for GPU to host processor interconnect
[0086] Figure 4A An exemplary architecture is shown in which multiple GPUs 410-413 are communicatively coupled to multiple multi-core processors 405-406 via high-speed links 440-443 (e.g., buses, point-to-point interconnects, etc.). In one embodiment, the high-speed links 440-443 support 4GB / s, 30GB / s, 80GB / s, or higher communication throughputs, depending on the implementation. Various interconnect protocols may be used, including but not limited to PCIe 4.0 or 5.0 and NVLink 2.0. However, the underlying principles of the invention are not limited to any specific communication protocol or throughput.
[0087] Additionally, in one embodiment, two or more of the GPUs 410-413 are interconnected via high-speed links 444-445, which may be implemented using the same or different protocols / links as used for high-speed links 440-443. Similarly, two or more of the multi-core processors 405-406 may be connected via high-speed link 433, which may be a symmetric multiprocessor (SMP) bus operating at 20 GB / s, 30 GB / s, 120 GB / s, or higher. Alternatively, Figure 4AAll communications between the various system components shown in can be achieved using the same protocol / links (eg, through a common interconnect structure). However, as mentioned, the underlying principles of the invention are not limited to any specific type of interconnect technology.
[0088] In one embodiment, each multi-core processor 405-406 is communicatively coupled to a processor memory 401-402 via a memory interconnect 430-431, respectively, and each GPU 410-413 is communicatively coupled to a GPU memory 420-423 via a GPU memory interconnect 450-453, respectively. The memory interconnects 430-431 and 450-453 may utilize the same or different memory access technologies. By way of example and not limitation, the processor memory 401-402 and the GPU memory 420-423 may be volatile memory, such as dynamic random access memory (DRAM) (including stacked DRAM), graphics DDR SDRAM (GDDR) (e.g., GDDR5, GDDR6), or high bandwidth memory (HBM), and / or may be non-volatile memory, such as 3D XPoint or Nano-Ram. In one embodiment, a portion of the memory may be volatile memory, and another portion may be non-volatile memory (e.g., using a two-level memory (2LM) hierarchy).
[0089] As described below, although the various processors 405-406 and GPUs 410-413 may be physically coupled to specific memories 401-402, 420-423, respectively, a unified memory architecture may be implemented in which the same virtual system address space (also referred to as an "effective address" space) is distributed across all of the various physical memories. For example, the processor memories 401-402 may each include 64GB of system memory address space, and the GPU memories 420-423 may each include 32GB of system memory address space (yielding a total of 256GB of addressable memory in this example).
[0090] Figure 4B Additional details are shown for the interconnection between the multi-core processor 407 and the graphics acceleration module 446 according to one embodiment. The graphics acceleration module 446 may include one or more GPU chips integrated on a line card that is coupled to the processor 407 via the high-speed link 440. Alternatively, the graphics acceleration module 446 may be integrated on the same package or chip as the processor 407.
[0091] The processor 407 shown includes multiple cores 460A-460D, each of which has a translation lookaside buffer 461A-461D and one or more caches 462A-462D. The core may include various other components (e.g., instruction acquisition unit, branch prediction unit, decoder, execution unit, reorder buffer, etc.) for executing instructions and processing data, which are not shown to avoid obscuring the underlying principles of the present invention. Caches 462A-462D may include level 1 (L1) and level 2 (L2) caches. In addition, one or more shared caches 426 may be included in the cache hierarchy and shared by multiple groups of cores 460A-460D. For example, one embodiment of the processor 407 includes 24 cores, each of which has its own L1 cache, twelve shared L2 caches, and twelve shared L3 caches. In this embodiment, one of the L2 and L3 caches is shared by two adjacent cores. The processor 407 and the graphics accelerator integrated module 446 are connected to the system memory 441, which may include the processor memories 401-402.
[0092] The coherence of data and instructions stored in the various caches 462A-462D, 456 and the system memory 441 is maintained via inter-core communications over the coherence bus 464. For example, each cache may have cache coherence logic / circuitry associated therewith to communicate over the coherence bus 464 in response to a detected read or write to a particular cache line. In one implementation, a cache snooping protocol is implemented over the coherence bus 464 to snoop cache accesses. Cache snooping / coherence techniques are well understood by those skilled in the art and will not be described in detail herein to avoid obscuring the underlying principles of the present invention.
[0093] In one embodiment, the proxy circuit 425 communicatively couples the graphics acceleration module 446 to the coherence bus 464, thereby allowing the graphics acceleration module 446 to participate in the cache coherence protocol as a peer of the core. Specifically, the interface 435 provides connectivity to the proxy circuit 425 through a high-speed link 440 (e.g., a PCIe bus, NVLink, etc.), and the interface 437 connects the graphics acceleration module 446 to the link 440.
[0094] In one implementation, the accelerator integrated circuit 436 provides cache management, memory access, context management, and interrupt management services on behalf of the multiple graphics processing engines 431, 432, N of the graphics acceleration module 446. The graphics processing engines 431, 432, N may each include a separate graphics processing unit (GPU). Alternatively, the graphics processing engines 431, 432, N may include different types of graphics processing engines within the GPU, such as a graphics execution unit, a media processing engine (e.g., a video encoder / decoder), a sampler, and a blit engine. In other words, the graphics acceleration module may be a GPU with multiple graphics processing engines 431-432, N, or the graphics processing engines 431-432, N may be individual GPUs integrated on a common package, line card, or chip.
[0095] In one embodiment, the accelerator integrated circuit 436 includes a memory management unit (MMU) 439 for performing various memory management functions, such as virtual to physical memory translation (also known as effective to real memory translation) and memory access protocols for accessing the system memory 441. The MMU 439 may also include a translation lookaside buffer (TLB) (not shown) for caching virtual / effective to physical / real address translations. In one implementation, the cache 438 stores commands and data for efficient access by the graphics processing engines 431-432, N. In one embodiment, the data stored in the cache 438 and the graphics memory 433-434, N is kept consistent with the core caches 462A-462D, 456 and the system memory 411. As mentioned, this may be achieved via proxy circuitry 425, which participates in cache coherence mechanisms on behalf of cache 438 and memories 433-434, N (e.g., sending updates related to modifications / accesses of cache lines on processor caches 462A-462D, 456 to cache 438, and receiving updates from cache 438).
[0096] A set of registers 445 stores context data for threads executed by the graphics processing engines 431-432, N, and context management circuitry 448 manages thread contexts. For example, context management circuitry 448 may perform save and restore operations during context switching to save and restore contexts of various threads (e.g., where a first thread is saved and a second thread is stored so that the second thread can be executed by the graphics processing engine). For example, upon context switching, context management circuitry 448 may store current register values to a designated area in memory (e.g., identified by a context pointer). It may then restore the register values upon returning to the context. In one embodiment, interrupt management circuitry 447 receives and processes interrupts received from system devices.
[0097] In one implementation, virtual / effective addresses from the graphics processing engine 431 are converted to real / physical addresses in the system memory 411 by the MMU 439. One embodiment of the accelerator integrated circuit 436 supports multiple (e.g., 4, 8, 16) graphics accelerator modules 446 and / or other accelerator devices. The graphics accelerator module 446 may be dedicated to a single application executed on the processor 407, or may be shared between multiple applications. In one embodiment, a virtualized graphics execution environment is presented in which the resources of the graphics processing engines 431-432, N are shared with multiple applications or virtual machines (VMs). The resources may be subdivided into "slices" that are allocated to the VMs and / or applications based on the processing requirements and priorities associated with the different VMs and / or applications.
[0098] Thus, the accelerator integrated circuit acts as a bridge to the system of graphics acceleration module 446 and provides address translation and system memory cache services. In addition, the accelerator integrated circuit 436 can provide virtualization facilities for the host processor to manage virtualization, interrupts, and memory management of the graphics processing engine.
[0099] Since the hardware resources of the graphics processing engines 431-432, N are explicitly mapped to the real address space seen by the host processor 407, any host processor can directly address these resources using effective address values. In one embodiment, one function of the accelerator integrated circuit 436 is the physical separation of the graphics processing engines 431-432, N so that they appear to the system as independent units.
[0100] As mentioned, in the illustrated embodiment, one or more graphics memories 433-434, M are respectively coupled to each of the graphics processing engines 431-432, N. The graphics memories 433-434, M store instructions and data being processed by each of the graphics processing engines 431-432, N. The graphics memories 433-434, M may be volatile memory, such as DRAM (including stacked DRAM), GDDR memory (e.g., GDDR5, GDDR6), or HBM, and / or may be non-volatile memory, such as 3D XPoint or Nano-Ram.
[0101] In one embodiment, to reduce data traffic on link 440, biasing techniques are used to ensure that the data stored in graphics memory 433-434, M is the data that will be used most frequently by graphics processing engines 431-432, N and preferably not used (at least not frequently) by cores 460A-460D. Similarly, the biasing mechanism attempts to keep data needed by a core (and preferably not graphics processing engines 431-432, N) in system memory 411 and the core's cache 462A-462D, 456.
[0102] Figure 4C Another embodiment is shown in which an accelerator integrated circuit 436 is integrated within the processor 407. In this embodiment, the graphics processing engines 431-432, N communicate directly to the accelerator integrated circuit 436 via the interface 437 and the interface 435 (again, which may utilize any form of bus or interface protocol) through the high-speed link 440. The accelerator integrated circuit 436 may perform operations related to Figure 4B The same operations as those described, but at potentially higher throughput given their close proximity to the coherency bus 462 and caches 462A-462D, 426.
[0103] One embodiment supports different programming models, including a dedicated process programming model (without graphics acceleration module virtualization) and a shared programming model (with virtualization). The latter may include a programming model controlled by the accelerator integrated circuit 436 and a programming model controlled by the graphics acceleration module 446.
[0104] In one embodiment of a dedicated process model, the graphics processing engines 431-432, N are dedicated to a single application or process under a single operating system. A single application can funnel another application's requests to the graphics engines 431-432, N, thereby providing virtualization within a VM / partition.
[0105] In a dedicated process programming model, graphics processing engines 431-432, N can be shared by multiple VM / application partitions. The shared model requires a hypervisor to virtualize graphics processing engines 431-432, N to allow access by each operating system. For a single partition system without a hypervisor, graphics processing engines 431-432, N are owned by the operating system. In both cases, the operating system can virtualize graphics processing engines 431-432, N to provide access to each process or application.
[0106] For the shared programming model, the graphics acceleration module 446 or each graphics processing engine 431-432, N uses a process handle to select a process element. In one embodiment, the process element is stored in the system memory 411 and is addressable using the effective address to real address conversion technology described herein. The process handle can be an implementation-specific value provided to the host process when registering its context with the graphics processing engine 431-432, N (i.e., calling the system software to add the process element to the process element linked list). The lower 16 bits of the process handle can be the offset of the process element within the process element linked list.
[0107] Figure 4D An exemplary accelerator integrated slice 490 is shown. As used herein, a "slice" includes a specified portion of the processing resources of the accelerator integrated circuit 436. The application effective address space 482 within the system memory 411 stores process elements 483. In one embodiment, the process element 483 is stored in response to a GPU call 481 from an application 480 executed on the processor 407. The process element 483 contains the process state of the corresponding application 480. The work descriptor (WD) 484 contained in the process element 483 can be a single job requested by the application, or can contain a pointer to a job queue. In the latter case, the WD 484 is a pointer to the job request queue in the address space 482 of the application.
[0108] Graphics acceleration module 446 and / or individual graphics processing engines 431-432, N may be shared by all processes or a subset of processes in the system. Embodiments of the present invention include infrastructure for setting process state and sending WD 484 to graphics acceleration module 446 to start a job in a virtualized environment.
[0109] In one implementation, the dedicated process programming model is implementation specific. In this model, a single process owns the graphics acceleration module 446 or individual graphics processing engine 431. Since the graphics acceleration module 446 is owned by a single process, when the graphics acceleration module 446 is assigned, the hypervisor initializes the accelerator integrated circuit 436 for the owning partition and the operating system initializes the accelerator integrated circuit 436 for the owning process.
[0110] In operation, the WD acquisition unit 491 in the accelerator integrated slice 490 acquires the next WD 484, which includes an indication of work to be completed by one of the graphics processing engines of the graphics acceleration module 446. Data from WD484 can be stored in registers 445 and used by MMU 439, interrupt management circuit 447, and / or context management circuit 446 as shown. For example, one embodiment of MMU 439 includes a segment / page walk circuit for accessing a segment / page table 486 within an OS virtual address space 485. Interrupt management circuit 447 can handle interrupt events 492 received from graphics acceleration module 446. When performing graphics operations, the effective address 493 generated by the graphics processing engine 431-432, N is converted to a real address by MMU 439.
[0111] In one embodiment, the same set of registers 445 is replicated for each graphics processing engine 431-432, N, and / or graphics acceleration module 446, and can be initialized by a hypervisor or operating system. Each of these replicated registers can be included in an accelerator integrated slice 490. Exemplary registers that can be initialized by a hypervisor are shown in Table 1.
[0112] Table 1 - Registers initialized by the hypervisor
[0113] 1 Slice Control Register 2 Real address (RA) dispatched process area pointer 3 Permission Mask Override Register 4 Interrupt vector table entry offset 5 Interrupt Vector Table Entry Limits 6 Status Register 7 Logical Partition ID 8 Real Address (RA) Hypervisor Accelerator Utilizing Record Pointers 9 Storage Description Register
[0114] Example registers that may be initialized by the operating system are shown in Table 2.
[0115] Table 2 - Registers initialized by the operating system
[0116] 1 Process and thread identities 2 Effective Address (EA) context save / restore pointer 3 Virtual Address (VA) Accelerator Utilizes Record Pointers 4 Virtual Address (VA) Segment Table Pointer 5 Permission masking 6 Job Descriptor
[0117] In one embodiment, each WD 484 is specific to a particular graphics acceleration module 446 and / or graphics processing engine 431-432, N. It contains all the information needed for the graphics processing engine 431-432, N to complete its work, or it may be a pointer to a memory location of a command queue where the application has set up work to be done.
[0118] Figure 4E Additional details of one embodiment of a sharing model are shown. This embodiment includes a hypervisor real address space 498 in which a process element list 499 is stored. The hypervisor real address space 498 is accessible via a hypervisor 496 that virtualizes a graphics acceleration module engine for an operating system 495.
[0119] The shared programming model allows all processes or subsets of processes from all partitions or subsets of partitions in the system to use the graphics acceleration module 446. There are two programming models where the graphics acceleration module 446 is shared by multiple processes and partitions: time-slice shared and graphics directed shared.
[0120] In this model, the hypervisor 496 owns the graphics acceleration module 446 and makes its functionality available to all operating systems 495. In order for the graphics acceleration module 446 to support virtualization by the hypervisor 496, the graphics acceleration module 446 may comply with the following requirements: 1) The application's job requests must be autonomous (i.e., no state needs to be maintained between jobs), or the graphics acceleration module 446 must provide a context save and restore mechanism. 2) The application's job requests are guaranteed to be completed within a specified amount of time by the graphics acceleration module 446 (including any transition failures), or the graphics acceleration module 446 provides the ability to preempt the processing of a job. 3) When operating in a directed sharing programming model, the graphics acceleration module 446 must be guaranteed fairness between processes.
[0121] In one embodiment, for the shared model, the application 480 is required to use the graphics acceleration module 446 type, work descriptor (WD), permission mask register (AMR) value and context save / restore region pointer (CSRP) to make an operating system 495 system call. The graphics acceleration module 446 type describes the acceleration function targeted for the system call. The graphics acceleration module 446 type can be a system-specific value. The WD is formatted specifically for the graphics acceleration module 446 and can be in the form of a graphics acceleration module 446 command, an effective address pointer to a user-defined structure, an effective address pointer to a command queue, or any other data structure used to describe the work to be completed by the graphics acceleration module 446. In one embodiment, the AMR value is the AMR state to be used for the current process. The value passed to the operating system is similar to the application of setting the AMR. If the accelerator integrated circuit 436 and the graphics acceleration module 446 implementation do not support the user permission mask override register (UAMOR), the operating system can apply the current UAMOR value to the AMR value and then pass the AMR in the hypervisor call. Optionally, the hypervisor 496 may apply the current privilege mask overwrite register (AMOR) value before placing the AMR into the process element 483. In one embodiment, the CSRP is one of the registers 445 that contains the effective address of an area in the application's address space 482 for the graphics acceleration module 446 to save and restore context state. This pointer is optional if state does not need to be saved between jobs or when a job is preempted. The context save / restore area may be pinned system memory.
[0122] Upon receiving the system call, the operating system 495 may verify that the application 480 has been registered and has been given permission to use the graphics acceleration module 446. The operating system 495 then calls the hypervisor 496 with the information shown in Table 3.
[0123] Table 3 – OS to Hypervisor call parameters
[0124] 1 Job Descriptor (WD) 2 Authority Mask Register (AMR) value (potentially masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual address of the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN)
[0125] Upon receiving the hypervisor call, the hypervisor 496 verifies that the operating system 495 has registered and has been given permission to use the graphics acceleration module 446. The hypervisor 496 then places the process element 483 into a linked list of process elements of the corresponding graphics acceleration module 446 type. The process element may include the information shown in Table 4.
[0126] Table 4 - Process element information
[0127] 1 Job Descriptor (WD) 2 Authority Mask Register (AMR) value (potentially masked) 3 Effective Address (EA) Context Save / Restore Region Pointer (CSRP) 4 Process ID (PID) and optional thread ID (TID) 5 Virtual Address (VA) Accelerator Utilization Record Pointer (AURP) 6 Virtual address of the storage segment table pointer (SSTP) 7 Logical Interrupt Service Number (LISN) 8 Interrupt vector table derived from hypervisor call parameters 9 Status Register (SR) Value 10 Logical Partition ID (LPID) 11 Real Address (RA) Hypervisor Accelerator Utilizing Record Pointers 12 Storage Descriptor Register (SDR)
[0128] In one embodiment, the hypervisor initializes the plurality of accelerator integrated slice 490 registers 445 .
[0129] like Figure 4F As shown in, one embodiment of the present invention uses a unified memory addressable via a common virtual memory address space, and the common virtual memory address is used to access physical processor memory 401-402 and GPU memory 420-423. In this implementation, operations performed on GPU 410-413 use the same virtual / effective memory address space to access processor memory 401-402 and vice versa, thereby simplifying programmability. In one embodiment, the first part of the virtual / effective address space is allocated to processor memory 401, the second part is allocated to second processor memory 402, the third part is allocated GPU memory 420, and so on. The entire virtual / effective memory space (sometimes referred to as the effective address space) is thus distributed across each of processor memory 401-402 and GPU memory 420-423, allowing any processor or GPU to access any physical memory (with a virtual address mapped to the memory).
[0130] In one embodiment, bias / coherency management circuits 494A-494E within one or more of MMUs 439A-439E ensure cache coherency between caches of a host processor (e.g., 405) and GPUs 410-413 and implement biasing techniques that indicate physical memory where certain types of data should be stored. Figure 4FMultiple instances of bias / consistency management circuits 494A- 494E are shown in , but bias / consistency circuits may be implemented within an MMU of one or more host processors 405 and / or within an accelerator integrated circuit 436 .
[0131] One embodiment allows the use of shared virtual memory (SVM) technology to access GPU-attached memory 420-423 and map it as part of system memory without suffering the typical performance drawbacks associated with full system cache coherence. The ability to access GPU-attached memory 420-423 as system memory without heavy cache coherence overhead provides a beneficial operating environment for GPU offloading. This arrangement allows host processor 405 software to set operands and access calculation results without the overhead of traditional I / O DMA data copying. Such traditional copies involve driver calls, interrupts, and memory-mapped I / O (MMIO) accesses, which are all inefficient relative to simple memory accesses. At the same time, the ability to access GPU-attached memory 420-423 without cache coherence overhead can be critical to the runtime of offloaded calculations. In the case of having a substantial stream write memory business, for example, the cache coherence overhead can significantly reduce the effective write bandwidth seen by GPU 410-413. The efficiency of operand setup, the efficiency of result access, and the efficiency of GPU computation all play a role in determining the effectiveness of GPU offloading.
[0132] In one implementation, the selection between GPU bias and host processor bias is driven by a bias tracker data structure. A bias table may be used, for example, which may be a page granular structure including 1 or 2 bits per GPU attached memory page (i.e., controlled at the granularity of a memory page). The bias table may be implemented in a stolen memory range of one or more GPU attached memories 420-423, with or without a bias cache in the GPUs 410-413 (e.g., to cache frequently / recently used entries of the bias table). Alternatively, the entire bias table may be maintained within the GPU.
[0133] In one implementation, the bias table entry associated with each access to the GPU-attached memory 420-423 is accessed before actually accessing the GPU memory, resulting in the following operations. First, local requests from the GPU 410-413 to find its page in the host bias are forwarded directly to the corresponding GPU memory 420-423. The local request from the GPU is forwarded to the processor 405 (e.g., via a high-speed link as discussed above). In one embodiment, the request from the processor 405 (the request to find the requested page in the host processor bias) completes a request similar to a normal memory read. Alternatively, the request for the GPU biased page can be forwarded to the GPU 410-413. Then, if the GPU is not currently using the page, the GPU can transfer the page to the host processor bias.
[0134] The bias state of a page may be changed by a software-based mechanism, a hardware-assisted software-based mechanism, or, for a limited set of situations, a purely hardware-based mechanism.
[0135] One mechanism for changing the bias state employs an API call (e.g., OpenCL) which in turn calls the GPU's device driver, which in turn sends a message (or enqueues a command descriptor) to the GPU, instructing it to change the bias state and perform a cache flush operation in the host for some transitions. The cache flush operation is required for transitions from host processor 405 bias to GPU bias, but not for the reverse transition.
[0136] In one embodiment, cache coherency is maintained by temporarily rendering GPU bias pages that are not cacheable by host processor 405. To access these pages, processor 405 may request access from GPU 410, which may or may not be immediately granted, depending on the implementation. Therefore, to reduce communication between processor 405 and GPU 410, it is ensured that GPU bias pages are those pages that are needed by the GPU but not by host processor 405 and vice versa.
[0137] Graphics processing pipeline
[0138] Figure 5 2. A graphics processing pipeline 500 is shown according to an embodiment. In one embodiment, a graphics processor may implement the illustrated graphics processing pipeline 500. The graphics processor may be included in a parallel processing subsystem as described herein (such as the parallel processor 200 of FIG. 2), which in one embodiment is Figure 12 . Various parallel processing systems may implement the graphics processing pipeline 500 via one or more instances of a parallel processing unit (e.g., parallel processing unit 202 of FIG. 2 ) as described herein. For example, a shader unit (e.g., graphics multiprocessor 234 of FIG. 3 ) may be configured to perform the functions of one or more of a vertex processing unit 504, a tessellation control processing unit 508, a tessellation evaluation processing unit 512, a geometry processing unit 516, and a fragment / pixel processing unit 524. The functions of the data assembler 502, the primitive assemblers 506, 514, 518, the tessellation unit 510, the rasterizer 522, and the raster operation unit 526 may also be performed by other processing engines within a processing cluster (e.g., processing cluster 214 of FIG. 3 ) and corresponding partition units (e.g., partition units 220A-220N of FIG. 2 ). The graphics processing pipeline 500 may also be implemented using dedicated processing units for one or more functions. In one embodiment, one or more portions of the graphics processing pipeline 500 may be executed by parallel processing logic within a general purpose processor (e.g., a CPU). In one embodiment, one or more portions of the graphics processing pipeline 500 may access on-chip memory (e.g., such as parallel processor memory 222 in FIG. 2 ) via a memory interface 528, which may be an example of the memory interface 218 of FIG. 2 .
[0139] In one embodiment, the data assembler 502 is a processing unit that collects vertex data for surfaces and primitives. The data assembler 502 then outputs the vertex data, including vertex attributes, to the vertex processing unit 504. The vertex processing unit 504 is a programmable execution unit that executes a vertex shader program to light and transform vertex data as specified by the vertex shader program. The vertex processing unit 504 reads data stored in a cache, local or system memory for use in processing vertex data, and the vertex processing unit 504 can be programmed to transform vertex data from an object-based coordinate representation to a world space coordinate space or a normalized device coordinate space.
[0140] A first instance of primitive assembler 506 receives vertex attributes from vertex processing unit 504. Primitive assembler 506 reads the stored vertex attributes as needed and builds graphics primitives for processing by tessellation control processing unit 508. Graphics primitives include triangles, line segments, points, patches, etc. as supported by various graphics processing application programming interfaces (APIs).
[0141] The tessellation control processing unit 508 treats the input vertices as control points for the geometric patch. The control points are transformed from an input representation from a patch (e.g., a basis of the patch) to a representation suitable for use in surface evaluation by the tessellation evaluation processing unit 512. The tessellation control processing unit 508 may also calculate tessellation factors for the edges of the geometric patch. The tessellation factors are applied to a single edge and quantize the view-dependent level of detail associated with the edge. The tessellation unit 510 is configured to receive the tessellation factors for the edges of the patch and tessellate the patch into a plurality of geometric primitives such as lines, triangles, or quadrilateral primitives, which are transmitted to the tessellation evaluation processing unit 512. The tessellation evaluation processing unit 512 operates on the parameterized coordinates of the subdivided patch to generate a surface representation and vertex attributes for each vertex associated with the geometric primitive.
[0142] A second instance of primitive assembler 514 receives vertex attributes from tessellation evaluation processing unit 512, reads stored vertex attributes as needed, and builds graphics primitives for processing by geometry processing unit 516. Geometry processing unit 516 is a programmable execution unit that executes geometry shader programs to transform graphics primitives received from primitive assembler 514 as specified by the geometry shader programs. In one embodiment, geometry processing unit 516 is programmed to subdivide a graphics primitive into one or more new graphics primitives and to compute parameters for rasterizing the new graphics primitives.
[0143] In some embodiments, the geometry processing unit 516 may add or delete elements in the geometry stream. The geometry processing unit 516 outputs parameters and vertices specifying new graphics primitives to the primitive assembler 518. The primitive assembler 518 receives the parameters and vertices from the geometry processing unit 516 and constructs the graphics primitives for processing by the viewport scaling, picking, and clipping unit 520. The geometry processing unit 516 reads data stored in the parallel processor memory or the system memory for use in processing the geometry data. The viewport scaling, picking, and clipping unit 520 performs clipping, picking, and viewport scaling, and outputs the processed graphics primitives to the rasterizer 522.
[0144] The rasterizer 522 may perform depth sorting and other depth-based optimizations. The rasterizer 522 also performs scan conversion on new graphics primitives to generate fragments, and outputs those fragments and associated coverage data to the fragment / pixel processing unit 524. The fragment / pixel processing unit 524 is a programmable execution unit configured to execute a fragment shader program or a pixel shader program. The fragment / pixel processing unit 524 transforms the fragments or pixels received from the rasterizer 522 as specified by the fragment or pixel shader program. For example, the fragment / pixel processing unit 524 may be programmed to perform the following operations to generate shaded fragments or pixels output to the raster operation unit 526, including but not limited to texture mapping, shading, blending, texture correction, and perspective correction. The fragment / pixel processing unit 524 may read data stored in a parallel processor memory or system memory for use in processing fragment data. The fragment or pixel shader program may be configured to shade at a sample, pixel, tile, or other granularity (depending on the sampling rate configured for the processing unit).
[0145] Raster operations unit 526 is a processing unit that performs raster operations including, but not limited to, stenciling, z-testing, blending, and the like, and outputs pixel data as processed graphics data for storage in graphics memory (e.g., parallel processor memory 222 in FIG. 2 and / or as Figure 1 The raster operations unit 526 may be configured to compress the z or color data written to the memory and to decompress the z or color data read from the memory.
[0146] Sequential independent asynchronous computation and / or streaming examples for graphics
[0147] Now go to Figure 6, an embodiment of the electronic processing system 600 may include an application processor 611, a persistent storage medium 612 communicatively coupled to the application processor 611, and a graphics subsystem 613 communicatively coupled to the application processor 611. The system 600 may also include one or more of the following: a draw call reorderer 614 communicatively coupled to the application processor 611 and the graphics subsystem 613 to reorder two or more draw calls; a workload reorderer 615 communicatively coupled to the application processor 611 and the graphics subsystem 613 to reorder two or more work items in a sequential independent mode; a queue primitive 616 (e.g., included in at least one of the two or more draw calls) for defining a producer phase and a consumer phase; and a sequential independent executor 617 communicatively coupled to the application processor 611 and the graphics subsystem 613 to provide tile-based sequential independent execution of the computation phases (e.g., as described in more detail below, respectively).
[0148] In some embodiments of the system 600, the draw call reorderer 614 may further include a sequence dependency analyzer to determine a sequence dependency between the two or more draw calls, wherein the draw call reorderer 614 may be further configured to reorder the two or more draw calls based on the determined sequence dependency (e.g., as described in more detail below). The workload reorderer 615 may further include a workload analyzer to determine a work split for the two or more work items, wherein the workload reorderer 615 may be further configured to reorder the two or more work items based on the determined work split (e.g., as described in more detail below). For example, the system 600 may also include a scheduler to alternately execute the producer phase and the consumer phase according to the queue primitive 616 (e.g., as described in more detail below). In some embodiments, the sequence independent executor 617 may include: a compute context; a rendering context; and a work scheduler to asynchronously dispatch work to the rendering context and the compute context on a tile basis (e.g., as described in more detail below).
[0149] Embodiments of each of the above application processor 611, persistent storage medium 612, graphics subsystem 613, draw call reorderer 614, workload reorderer 615, queue primitive 616, order dependency executor 617, and other system components may be implemented in hardware, software, or any suitable combination thereof. For example, a hardware implementation may include configurable logic, such as, for example, a programmable logic array (PLA), an FPGA, a complex programmable logic device (CPLD), or fixed-functional logic hardware using circuit technology, such as, for example, ASIC, complementary metal oxide semiconductor (CMOS) or transistor-transistor logic (TTL) technology, or any combination thereof. Alternatively, or in addition, these components may be implemented in one or more modules as a set of logic instructions to be executed by a processor or computing device, stored in a machine or computer readable storage medium, such as a random access memory (RAM), a read-only memory (ROM), a programmable ROM (PROM), firmware, flash memory, and the like. For example, computer program code for implementing the operations of the components may be written in any combination of one or more operating system applicable / appropriate programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as the "C" programming language or similar programming languages).
[0150] For example, system 600 may include similar components and / or features as system 100, further configured to support various sequential independent processing as described herein. For example, graphics subsystem 613 may include similar components and / or features as parallel processor 200, further configured to support various sequential independent processing as described herein. System 600 may also be adapted to be used with a stereo head mounted system (such as, for example, in conjunction with the following Figure 11-15 system described).
[0151] Draw Call Resequencer Example
[0152] Now go to Fig. 7A, an embodiment of the graphics device 700 may include: a sequential dependency analyzer 721 to determine a sequential dependency between two or more drawing calls; and a drawing call reorderer 722, which is communicatively coupled to the sequential dependency analyzer 721 to reorder the two or more drawing calls based on the determined sequential dependency. For example, the sequential dependency analyzer 721 may be configured to determine resource requirements and data address ranges for the two or more drawing calls. In some embodiments, the drawing call reorderer 722 may be configured to reorder the two or more drawing calls to increase the utilization of parallel execution. For example, the drawing call reorderer 722 may also be configured to determine that data dependencies are not violated when the two or more drawing calls are reordered.
[0153] Some embodiments of the device 700 may optionally further include one or more of the following: a workload resequencer, which is communicatively coupled to the sequential dependency analyzer 721 to reorder two or more work items in a sequential independence mode; a queue primitive, which is included in at least one of the two or more drawing calls, to define a producer phase and a consumer phase; and / or a sequential independence executor, which is communicatively coupled to the sequential dependency analyzer 721 to provide tile-based sequential independent execution of the computation phase.
[0154] Embodiments of each of the above-described sequential dependency analyzer 721, draw call reorderer 722, and other components of the apparatus 700 may be implemented in hardware, software, or any combination thereof. For example, part or all of the apparatus 700 may be implemented as part of a parallel processor 200, further configured with a sequential dependency analyzer and / or a draw call reorderer as described herein. The apparatus 700 may also be adapted to be used with a stereo head mounted system (such as, for example, in conjunction with the following Figure 11-15 The system described herein can be operated by a computer or a computer program. For example, the hardware implementation may include configurable logic, such as, for example, a PLA, an FPGA, a CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, an ASIC, a CMOS or a TTL technology, or any combination thereof. Alternatively, or additionally, these components may be implemented in one or more modules as a set of logic instructions to be executed by a processor or a computing device and stored in a machine or computer readable storage medium, such as a RAM, a ROM, a PROM, a firmware, a flash memory, etc. For example, the computer program code for implementing the operation of the components may be written in any combination of one or more operating system-appropriate / suitable programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as the "C" programming language or similar programming languages).
[0155] Now go to Figures 7B to 7C , an embodiment of the method 730 of reordering draw calls may include determining an order dependency between two or more draw calls at block 731, and reordering the two or more draw calls based on the determined order dependency at block 732. The method 730 may also include determining resource requirements and data address ranges for the two or more draw calls at block 733. Some embodiments may also include reordering the two or more draw calls to increase utilization of parallel execution at block 734 and / or determining that data dependencies are not violated when the two or more draw calls are reordered at block 735.
[0156] In some embodiments, method 730 may optionally further include one or more of the following: adopting a sequential independence mode to reorder two or more work items in box 736, defining producer phases and consumer phases through queue primitives in box 737, and / or providing tile-based sequential independent execution of computation phases in box 738.
[0157] Embodiments of method 730 may be implemented in a system, device, GPU, parallel processing unit (PPU), or graphics processor pipeline device, such as those described herein. More specifically, the hardware implementation of method 730 may include configurable logic, such as, for example, PLA, FPGA, CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, ASIC, CMOS or TTL technology, or any combination thereof. Alternatively, or additionally, method 730 may be implemented in one or more modules as a set of logic instructions to be executed by a processor or computing device, stored in a machine or computer readable storage medium, such as RAM, ROM, PROM, firmware, flash memory, etc. For example, the computer program code for implementing the operation of the component may be written in any combination of one or more operating system-appropriate / appropriate programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as "C" programming language or similar programming languages). For example, method 730 may be implemented on a computer-readable medium as described in conjunction with Examples 20 through 26 below.
[0158] For example, embodiments or portions of method 730 may be implemented using an application (e.g., via an API) or driver software. Other embodiments or portions of method 730 may be implemented using specialized code (e.g., a shader) to be executed on a GPU. Other embodiments or portions of method 730 may be implemented using fixed-function logic or specialized hardware (e.g., using a GPU).
[0159] Advantageously, some embodiments may reorder draw calls based on heuristics for programming sequences. For example, some embodiments may use a compiler and / or driver to reorder draw calls issued by an application to provide better performance. In some embodiments, draw calls may be reordered to advantageously provide better utilization.
[0160] For example, the compiler may check resource requirements and data address ranges used by the draw calls. The compiler may also determine any order dependencies between the draw calls. The compiler / driver may then rearrange the draw call order to optimize parallel execution and / or provide more efficient use of hardware 3D / compute resources. Before and / or during any rearrangement, the driver may ensure that data dependencies are not violated.
[0161] Now go to Figures 7D to 7E , the application can generate Fig.7D ) of a series of drawing calls (drawing Figure 1 , draw2, draw3, draw4, etc.). The compiler / driver may reorder the draw calls so that dependencies are maintained but there is better utilization of the hardware / resources (e.g. Fig. 7E ). Advantageously, otherwise idle resources can be used by overlapping execution of draw calls. Another benefit of some embodiments may include better use of caches and translation lookaside buffers (TLBs). For example, draw calls using the same data range may be scheduled next to each other. This reordering may provide higher cache hit rates due to better locality. For example, draw calls Figure 1 may generate a large amount of data that can be used by Plot 3, but in the program, Plot 2 may occur in Plot 3. Figure 1 and drawing 3. If processed in the original order, drawing 2 would result in the cache being stored by drawing Figure 1 The resulting information is removed from the cache and the removed data will have to be retrieved for drawing 3. Figure 1 Then reorder drawing 3 to save the cached drawing. Figure 1 data for more efficient use by draw 3. If the compiler cannot determine that reordering the draw call will not violate the data dependency, then the draw call will not be reordered.
[0162] For example, in many three-dimensional (3D) games, the compiler / driver may be able to determine what the input and output surfaces are for each draw call. The compiler / driver may also be able to determine that a draw call is working on an independent surface (e.g., not created or consumed by another draw call). The compiler / driver may also be able to determine that a draw call is working on an independent surface. Figure 1 The output of is not used by plot 2, but by plot 3, so Figure 1 There is no order dependency between drawing 1 and drawing 2, but in drawing Figure 1 There is a sequential dependency between and drawing 3.
[0163] Now go to Figure 7F , some embodiments may additionally or alternatively initiate some draw calls in parallel. For example, if any draw calls are independent of the remaining draw calls, they may be initiated out of order and / or in parallel with the remaining draw calls. In some embodiments, the compiler / driver may first determine which draw calls are independent, and then determine the order dependencies of the remaining draw calls. For example, if Draw 2 has no dependencies on other draw calls, Draw 2 may be initiated in parallel to better utilize the graphics subsystem (see Figure 7F ).
[0164] The driver forms a command queue that is passed to the hardware, so the driver can effectively reorder draw calls by pushing commands into the command queue in a different order to create a reordered command queue. If the driver cannot resolve the dependency, it can preserve the original order of the draw calls.
[0165] Workload Resequencer Example
[0166] Now go to Fig. 8A , an embodiment of the graphics device 800 may include: a workload analyzer 821 for determining a work split for two or more work items using a sequential independent mode; and a workload reorderer 822, communicatively coupled to the workload analyzer 821 to reorder the two or more work items based on the work split determined using the sequential independent mode. For example, the sequential independent mode may be set by an application (e.g., via an API call). The workload reorderer 822 may be configured to reorder the two or more work items to increase utilization of the graphics processor. For example, the two or more work items may include graphics primitives.
[0167] In some embodiments, the device 800 may optionally further include one or more of the following: a queue primitive included in at least one of the two or more work items to define a producer phase and a consumer phase; and / or a sequential independent executor communicatively coupled to the workload analyzer 821 to provide tile-based sequential independent execution of the computation phases.
[0168] Embodiments of each of the above-described workload analyzer 821, workload resequencer 822, and other components of device 800 may be implemented in hardware, software, or any combination thereof. For example, part or all of device 800 may be implemented as part of parallel processor 200, further configured with a workload analyzer and / or workload resequencer as described herein. Device 800 may also be adapted to be used with a stereo head-mounted system (such as, for example, in conjunction with the following Figure 11-15 The system described herein can be operated by a computer or a computer program. For example, the hardware implementation may include configurable logic, such as, for example, a PLA, an FPGA, a CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, an ASIC, a CMOS or a TTL technology, or any combination thereof. Alternatively, or additionally, these components may be implemented in one or more modules as a set of logic instructions to be executed by a processor or a computing device and stored in a machine or computer readable storage medium, such as a RAM, a ROM, a PROM, a firmware, a flash memory, etc. For example, the computer program code for implementing the operation of the components may be written in any combination of one or more operating system-appropriate / suitable programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as the "C" programming language or similar programming languages).
[0169] Now turn to Figures 8B to 8C , an embodiment of the method 830 for reordering work items may include determining a work split for two or more work items in a sequentially independent manner at block 831, and reordering the two or more work items based on the work split determined using the sequentially independent mode at block 832. For example, the method 830 may include setting the sequentially independent mode by an application at block 833. In some embodiments, the method 830 may also include reordering the two or more work items to increase utilization of a graphics processor at block 834. For example, at block 835, the two or more work items may include graphics primitives.
[0170] In some embodiments, method 830 may optionally further include one or more of: defining producer and consumer stages via queue primitives at block 836 , and / or providing tile-based sequential independent execution of computation stages at block 837 .
[0171] Embodiments of method 830 may be implemented in a system, device, GPU, PPU, or graphics processor pipeline device, such as, for example, those described herein. More specifically, the hardware implementation of method 830 may include configurable logic, such as, for example, PLA, FPGA, CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, ASIC, CMOS or TTL technology, or any combination thereof. Alternatively, or additionally, method 830 may be implemented in one or more modules as a set of logic instructions to be executed by a processor or computing device, stored in a machine or computer readable storage medium, such as RAM, ROM, PROM, firmware, flash memory, etc. For example, the computer program code for implementing the operation of the component may be written in any combination of one or more operating system-appropriate / appropriate programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C#, or the like), and conventional procedural programming languages (such as "C" programming language or similar programming languages). For example, method 830 may be implemented on a computer-readable medium as described in conjunction with Examples 46 to 51 below.
[0172] For example, embodiments or portions of method 830 may be implemented using an application (e.g., via an API) or driver software. Other embodiments or portions of method 830 may be implemented using specialized code (e.g., a shader) to be executed on a GPU. Other embodiments or portions of method 830 may be implemented using fixed-function logic or specialized hardware (e.g., using a GPU).
[0173] Now go to Fig.8D , the input graphics workload can include primitives T in this order 0 , T 1 and T 2 According to some embodiments, the work resequencer may resequence the output graphics workload to include the primitives T in this new order. 2 , T 0 and T 1. Some embodiments may advantageously provide out-of-order rendering. In some systems, primitives are always processed in order, which may not be an efficient use of resources. Some embodiments may advantageously provide a structure in which out-of-order execution of primitives is supported. As resources become available, the graphics hardware and / or software may subsequently classify / process the primitives / dispatches. For example, an API may provide information to the graphics engine to indicate that out-of-order execution of primitives is allowed for a particular processing operation (e.g., a drawing call). In out-of-order mode, various improvements and / or optimizations may be used for the graphics engine to sort-on-the-fly by attributes such as depth (Z) to avoid unclassified primitives and improve the efficiency of early Z in applications that may not otherwise be well supported for such processing. For example, some embodiments may support sorting triangles by depth (e.g., in addition to sorting by tile) to improve the efficiency of occlusion picking. Out-of-order rendering may also be employed for rendering geometry buffer (G-buffer) passes for opaque objects.
[0174] By way of background and not limitation, some 3D APIs may guarantee order in processing commands within a group submitted to the GPU. An example may be multiple draw calls invoking a pipeline that then processes multiple primitives to rasterize additive effects like blending to transparent for such features. Strict ordering of operations requires synchronization of processing work within the GPU. While this can sometimes be a benefit (e.g., reduced redundant shading, memory fetches, functional correctness), it can also result in large portions of the GPU's potential being underutilized unless very specific scenarios can be detected that prove there are no dependencies between calls.
[0175] Some embodiments may advantageously create a guarantee between the application and the driver (e.g., through an API or API extension) that memory is the only dependency, and that the application will use techniques that are able to resolve sequential dependencies at some later point in the process. The guarantee may be implemented as a state or mode set by the application and checked by the driver and / or graphics engine. For example, the guarantee may be local to a particular rendering pass / stage, or the guarantee may be a global or static guarantee of the application. The guarantee may allow the driver, GPU, GPU scheduler, etc. to reorder or co-issue work without violating strict API guarantees. Advantageously, some embodiments may provide better performance when such large-grained synchronization points would be detrimental to efficient GPU utilization.
[0176] Now go to Fig. 8E, an input draw call 851 may include state group A and associated work item A, followed by state group B and associated work item B. The work resequencer may resequence the state groupings and associated work items so that an output draw call 851' has state group B and associated work item B before state group A and associated work item A. Some draw calls include associated state and workload (e.g., the application sends state and then sends some work). In out-of-order mode, work may be considered atomic and may be resequenced because the application has guaranteed that it can handle work that is executed out of order.
[0177] Now go to Fig.8F , an embodiment of the graphics system 860 may include storing a first primitive T 0 and the second primitive T 1 frame buffer 861. In some workloads, the second primitive T 1 In the first element T 0 Arrived after. System 860 may include a parallel processing engine 863 to process frame buffer 861. In conventional mode, there may be a delay between writing the first primitive T if there is an overlap between the two primitives. 0 The pixels for the second primitive T 1 spacing that occurs between pixels of the image (e.g., to obtain functional correctness). In out-of-order mode, a temporary memory allocation can be provided for each primitive so that work can be issued together (e.g., without spacing), and a full screen resolve pass can handle any out-of-order issues at a later point. An application can determine whether to set normal mode or out-of-order mode. Having an application specify out-of-order mode advantageously eliminates the need for complex detection logic that may not successfully detect many situations where the condition applies. In out-of-order mode, the driver and / or GPU can freely issue work without synchronization, and any work can be issued together in the pipeline as hardware resources become available (e.g., pixels, vertices, geometry, or any pipeline part). Some embodiments can also be used for basic sub-primitives (e.g., tessellated meshes) on a single primitive.
[0178] Now go to Figure 8G , an embodiment of the graphics system 870 may include storing a first primitive T 0 and the second primitive T 1 frame buffer 871. In some workloads, the second primitive T 1 It is possible that in the first element T 0Arrived afterwards. The system 870 may include a first parallel processing engine 873 and a second parallel processing engine 875 to process the frame buffer 871. Some embodiments may be extended to utilize more than two engines to perform out-of-order rendering. For example, a GPU may include multiple engines, or two or more GPUs may be linked together. Out-of-order mode may break the requirement to perform synchronization between two or more engines. In out-of-order mode, the driver and / or GPU may freely issue work without synchronization (except when parsing out-of-order work), and may jointly issue work distributed across multiple parallel processing devices (which would otherwise require synchronization). This may allow multiple GPUs to work on the same frame without synchronizing application resources internally. For example, a work reorderer may distribute work across GPUs / engines without having to maintain special registers, synchronization information, or other sequential dependency detection (e.g., because the application guarantees that it can handle out-of-order processing).
[0179] In some embodiments, a work analyzer and / or work resequencer may be included in the GPU scheduler. Additionally or alternatively, the work analyzer and / or work resequencer may be included in a higher level scheduler and may receive indications from the GPU regarding its current utilization. For example, when the GPU is not fully utilized, the scheduler may send more out-of-order / speculative work. Some embodiments may advantageously reduce the CPU utilization or GPU overhead required to detect dependencies. Some embodiments may also increase GPU utilization by entering out-of-order mode based on conditions determined by the application. Even if some work ends up being redundant, better utilization of the GPU may make up for any inefficiencies that arise.
[0180] Queue Element Example
[0181] Now go to Fig.9A , an embodiment of the graphics device 900 may include a queue primitive 921 for defining a producer phase and a consumer phase, and a scheduler 922 for alternating the execution of the producer phase and the consumer phase according to the queue primitive 921. For example, the queue primitive 921 is also used to define a producer and consumer relationship between a first dispatch call and a second dispatch call and one of the drawing calls. In some embodiments, the queue primitive 921 may be further configured to define a queue for storing results of a subset of a complete drawing call. For example, the scheduler 922 may be further configured to manage the utilization of the queue. In some embodiments, the device 900 may optionally further include a sequential independent executor communicatively coupled to the scheduler 922 to provide tile-based sequential independent execution of the computation phase.
[0182] Embodiments of each of the above-described queue primitives 921, scheduler 922, and other components of the device 900 may be implemented in hardware, software, or any combination thereof. For example, part or all of the device 900 may be implemented as part of a parallel processor 200, further configured with a queue primitive and / or scheduler as described herein. The device 900 may also be adapted to be used with a stereo head-mounted system (such as, for example, in conjunction with the following Figure 11-15 The system described herein can be operated by a computer or a computer program. For example, the hardware implementation may include configurable logic, such as, for example, a PLA, an FPGA, a CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, an ASIC, a CMOS or a TTL technology, or any combination thereof. Alternatively, or additionally, these components may be implemented in one or more modules as a set of logic instructions to be executed by a processor or a computing device and stored in a machine or computer readable storage medium, such as a RAM, a ROM, a PROM, a firmware, a flash memory, etc. For example, the computer program code for implementing the operation of the components may be written in any combination of one or more operating system-appropriate / suitable programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as the "C" programming language or similar programming languages).
[0183] Now go to Figures 9B to 9C , an embodiment of the method 930 for processing a graphics workload may include defining a producer phase and a consumer phase by a queue primitive at block 931, and alternating the producer phase and the consumer phase according to the queue primitive at block 932. For example, the method 930 may also include defining a producer and consumer relationship between a first dispatch call and a second dispatch call and one of the drawing calls by a queue primitive at block 933. Some embodiments may also include defining a queue for storing results of a subset of the complete drawing call by a queue primitive at block 934, and managing utilization of the queue at block 935. In some embodiments, the method 930 may optionally include providing tile-based sequential independent execution of the computation phases at block 936.
[0184] Embodiments of method 930 may be implemented in a system, device, GPU, PPU, or graphics processor pipeline device, such as, for example, those described herein. More specifically, the hardware implementation of method 930 may include configurable logic, such as, for example, PLA, FPGA, CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, ASIC, CMOS or TTL technology, or any combination thereof. Alternatively, or additionally, method 930 may be implemented in one or more modules as a set of logic instructions to be executed by a processor or computing device, stored in a machine or computer readable storage medium, such as RAM, ROM, PROM, firmware, flash memory, etc. For example, the computer program code for implementing the operation of the component may be written in any combination of one or more operating system applicable / appropriate programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as "C" programming language or similar programming languages). For example, method 930 may be implemented on a computer-readable medium as described in conjunction with Examples 68 through 72 below.
[0185] For example, embodiments or portions of method 930 may be implemented using an application (e.g., via an API) or driver software. Other embodiments or portions of method 930 may be implemented using specialized code (e.g., a shader) to be executed on a GPU. Other embodiments or portions of method 930 may be implemented using fixed-function logic or specialized hardware (e.g., using a GPU).
[0186] Advantageously, some embodiments may provide streaming drawing / dispatch indirect processing. Some embodiments may alternately schedule compute shader (CS) / raster stages for streaming processing. For example, some embodiments may stream work items between stages via attach / consume buffers. Some embodiments may advantageously use streaming to enable more flexible compute rendering on the GPU. Some embodiments may provide managed buffers that facilitate communication between compute stages or between a compute stage and a rasterization stage. The programming model may be extended to support queue primitives, and the hardware scheduler may manage buffers to work with application-defined queues (e.g., defined by queue primitives).
[0187] Now go to Fig.9DIn the embodiment of the present invention, the graphics system 950 may include a compute shader 951 that generates output and appends the output to a ring buffer 952 (e.g., tessellation). The rasterizer 953 may consume the output of the compute shader 951 from the ring buffer 952. The scheduler 954 may alternate between the compute shader 951 and the rasterizer 953, and monitor the buffer size of the ring buffer 952 (e.g., to control how much work is dispatched to the compute shader 951 based on the available capacity of the ring buffer 952). In some systems, the computationally generated data may need to be buffered up in global memory before further processing or rasterization. Advantageously, some embodiments may alternate the CS and raster stages for streaming processing, and rendering may become more computationally intensive. In some embodiments, the buffer (e.g., the ring buffer 952) may be transparent to the software (e.g., an application and / or a driver). In some embodiments, the application may allocate space for the append / consume buffer and specify the producer / consumer relationship between pipeline stages.
[0188] By way of background and not limitation, a graphics pipeline implemented in some GPUs may use streaming to efficiently render complex scenes. Such streaming may involve incremental processing of rendering primitives through a set of pipeline stages, where primitives are first batch loaded from global DRAM storage into fast (on-chip) local memory. While global DRAM allows for storage of complex scene definitions (potentially millions of primitives and large textures), its bandwidth is limited, and memory access may be a major source of power consumption. Local memory may provide orders of magnitude faster and more power-efficient access, but the capacity is very limited. Using streaming processing, the rendering pipeline ensures that only a small number of rendered primitives need to be present at the same time in the pipeline stage. This is achieved by scheduling pipeline stages connected by queues. These pipeline stages may be in a producer-consumer relationship. In terms of workload expansion, some types of pipeline stages may simply generate a single output from a single input work item (e.g., most programmable shaders of a D3D / OpenGL raster pipeline), while other types of pipeline stages may provide data amplification, where a single work item may produce if output (e.g., a rasterizer generates if fragments from a single triangle). It may be the responsibility of the hardware scheduler to execute the pipeline stages in an order that avoids queue overflows. Due to the limited programmability, this architecture may be referred to as a fixed-function graphics pipeline.
[0189] As graphics architectures evolve toward compute rendering, more flexible rendering pipelines may be needed, where applications can define custom stages in the pipeline that also allow programmable data amplification. In this scenario, a compute stage (e.g., a compute shader) can generate a variable amount of data from a single work item that needs to be processed in a streaming manner. On current graphics architectures, this cannot be implemented using the same hardware resources as those used in fixed-function pipelines because on-chip streaming is not exposed to programmers. Some systems can implement compute streaming by allocating large storage in global DRAM, which is capable of saving the entire output dispatched by the compute shader, and explicitly calling the next pipeline stage (such as compute or rasterization) after the compute shader has processed its entire input. Advantageously, some embodiments can provide an efficient and transparent implementation of programmable streaming on the GPU.
[0190] Some embodiments may provide a queue primitive that is exposed to applications via a graphics API. At a high level, the queue primitive may allow for the definition of a producer-consumer relationship between two dispatch calls or a dispatch call and a draw call. Unlike current graphics APIs, applications do not have to explicitly call dispatch or draw calls, but instead will be implicitly executed by a low-level scheduler that monitors the state of the queue primitive. By chaining multiple dispatch calls, a complete programmable pipeline can be defined.
[0191] In some embodiments, queue primitives may be allocated in shared on-chip memory or in global DRAM. If allocated on-chip, queue primitives may yield similar benefits to fixed-function pipelines, but require special attention to data locality. Specifically, the contents of on-chip memory may need to be preserved across multiple compute dispatch calls. Implementation of queue primitives via DRAM may not reduce bandwidth, but it may advantageously reduce the memory footprint for small buffers, allowing streaming processing.
[0192] In both cases, one possible implementation of the queue primitive is a ring buffer, where the state of the head and tail pointers is periodically monitored by the scheduler. The scheduler can execute a dispatch / rasterization loop, selecting in each loop a pipeline stage (dispatch or draw) where the input queue has data to consume and the output queue has enough space to store the result. The ring buffer implementation can be similar to the scheduling done for other processes in a fixed-function pipeline, where the goal of the scheduler is to maximize the utilization of the hardware while avoiding pipeline stalls (where the queue becomes full and prevents the execution of its production-side stages). Advantageously, the queue primitive introduces programmable functionality to the pipeline.
[0193] The queue primitive may have some important requirements for the compute shader in the intermediate pipeline stage. First, the output data can be written through a minimum unit append mechanism, where the application does not know the exact order and location of the data because it depends on the discretion of the queue to which the data is written. Secondly, the scheduler needs to ensure that the compute shader threads it executes (each thread consumes one work item from the input queue) have enough space in the output queue for their output. Those skilled in the art will recognize that there may be multiple mechanisms to achieve these requirements. As an example, the compute threads may limit the maximum number of output items they generate from a single input (e.g., similar to a geometry shader). With this restriction, the scheduler can always dispatch a safe number of threads for the worst-case expansion. Another example may involve preempting the compute shader if the output buffer becomes full.
[0194] Through the queue primitive, according to some embodiments, instead of explicitly dispatching the compute shader each time, the application can specify the number of triangles, the compute shader, and the queue size, which may be much smaller than the memory footprint required for the complete output set. Then, the scheduler can monitor the state of the queue and dispatch the appropriate number of compute shader threads for the available capacity of the queue. The compute shader can be considered as the producer of the queue, and there may also be another compute shader or rasterizer, which can be considered as the consumer of the queue. The scheduler can switch alternately between executing the producer and the consumer to manage the queue and keep the queue balanced. The queue can facilitate communication between the producer stage and the consumer stage, both of which can be executed on the GPU. The application can define the relationship and provide input data. Streaming can work with limited memory footprint to make it possible. The buffer does not need to save millions of triangles in memory at a time. The queue can use some windows (such as thousands) in the triangle, and the scheduler can schedule the producer and consumer to solve the triangle in a large block at a time. The embodiment is not necessarily based on tiles, but some embodiments can be implemented with a sub-tile system. Some embodiments can advantageously provide transparent scheduling of programmable pipelines.
[0195] Sequential Independent Executor Example
[0196] Now go to Fig. 10AIn, an embodiment of the graphics device 1000 may include: a work scheduler 1021 for asynchronously dispatching one or more rendering tiles and one or more computing tiles on a tile basis; a renderer 1022, communicatively coupled to the work scheduler 1021 to render the one or more rendering tiles; and an executor 1023, communicatively coupled to the work scheduler 1021 to execute the one or more computing tiles. For example, the renderer 1022 may be configured to render one of the rendering tiles in parallel with the execution of one of the computing tiles. For example, the one or more computing tiles may be identified as independent. In some embodiments, the computing tile size of the first computing tile may be a subset of the rendering tile size of the first rendering tile.
[0197] Embodiments of each of the above-described work scheduler 1021, renderer 1022, executor 1023, and other components of device 1000 may be implemented in hardware, software, or any combination thereof. For example, part or all of device 1000 may be implemented as part of parallel processor 200, further configured with a work scheduler, renderer 1022, and / or executor as described herein. Device 1000 may also be adapted to be used with a stereo head-mounted system (such as, for example, in conjunction with the following Figure 11-15 The system described herein can be operated by a computer or a computer program. For example, the hardware implementation may include configurable logic, such as, for example, a PLA, an FPGA, a CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, an ASIC, a CMOS or a TTL technology, or any combination thereof. Alternatively, or additionally, these components may be implemented in one or more modules as a set of logic instructions to be executed by a processor or a computing device and stored in a machine or computer readable storage medium, such as a RAM, a ROM, a PROM, a firmware, a flash memory, etc. For example, the computer program code for implementing the operation of the components may be written in any combination of one or more operating system-appropriate / suitable programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C# or the like), and conventional procedural programming languages (such as the "C" programming language or similar programming languages).
[0198] Now go to Fig. 10B, an embodiment of the method 1030 for processing a graphics workload may include asynchronously dispatching one or more rendering tiles and one or more compute tiles on a tile basis at block 1031, rendering the one or more rendering tiles at block 1032, and executing the one or more compute tiles at block 1033. For example, the method 1030 may include rendering one of the rendering tiles in parallel with the execution of one of the compute tiles at block 1034. Some embodiments may also include identifying the one or more compute tiles as independent at block 1035. For example, at block 1036, the compute tile size of the first compute tile is a subset of the render tile size of the first rendering tile.
[0199] Embodiments of method 1030 may be implemented in a system, device, GPU, PPU, or graphics processor pipeline device, such as, for example, those described herein. More specifically, a hardware implementation of method 1030 may include configurable logic, such as, for example, PLA, FPGA, CPLD, or fixed-functional logic hardware using circuit technology, such as, for example, ASIC, CMOS or TTL technology, or any combination thereof. Alternatively, or additionally, method 1030 may be implemented in one or more modules as a set of logic instructions to be executed by a processor or computing device, stored in a machine or computer readable storage medium, such as RAM, ROM, PROM, firmware, flash memory, etc. For example, a computer program code for implementing the operation of a component may be written in any combination of one or more operating system-appropriate / appropriate programming languages, including object-oriented programming languages (such as PYTHON, PERL, JAVA, SMALLTALK, C++, C#, or the like), and conventional procedural programming languages (such as "C" programming language or similar programming languages). For example, method 1030 may be implemented on a computer-readable medium as described in conjunction with Examples 86 through 89 below.
[0200] For example, embodiments or portions of method 1030 may be implemented using an application (e.g., via an API) or driver software. Other embodiments or portions of method 1030 may be implemented using specialized code (e.g., a shader) to be executed on a GPU. Other embodiments or portions of method 1030 may be implemented using fixed-function logic or specialized hardware (e.g., using a GPU).
[0201] Some embodiments may advantageously provide asynchronous compute shader delivery for tile-based renderers. In some systems, compute shaders may not be able to take advantage of the benefits of tile-based rendering (e.g., spatial locality of texture access). Once the computational work begins, the previous tile-based work ends, and the computational work will proceed in sequence. Some embodiments may provide a single rendering target that is being used for both rendering and computational algorithms. For example, an API may specify that there are tiles on the rendering target, and that they are independent of each other for a specific rendering / computational delivery. Since the tile / thread groups are independent, the hardware and / or driver may schedule the rendering and computational components asynchronously. In some embodiments, parallel execution and / or out-of-order execution of tiles may be supported. The GPU may run a compute shader thread group within a rendering target tile. In some embodiments, computational work for one tile may be performed in parallel with 3D work for another tile. For example, a post-processing compute shader may be more easily scheduled out of order within a frame. Advantageously, latency may be reduced for some VR applications.
[0202] Now go to Fig. 10C , an embodiment of a graphics system 1040 may include a GPU 1041 that supports a rendering context 1042 and a compute context 1043. The GPU 1041 may also include a work scheduler 1044 that supports asynchronous dispatching of both the rendering context 1042 and the compute context 1043. The API may specify the compute shader and also identify the tile size and that the tiles are independent of each other. The API may also indicate how the rendering tile size maps to the compute tile size (e.g., a supported subset of the same size or a multiple of the compute tile size). The work scheduler 1044 may then dispatch the rendering context 1042 and the compute context 1043 on a tile basis.
[0203] Now go to Fig. 10D, an embodiment of the work scheduler 1050 may include two or more tile queues, including at least a first tile queue 1051 and a second tile queue 1052. The work scheduler 1050 may further include a rendering scheduler 1053 and a computation scheduler 1054. In some systems, all work will have to be completed in sequence, where all rendering and all computation of one tile are completed before starting work on another tile. In the case of two contexts, one context may be idle while the other context is busy. Advantageously, some embodiments may support different contexts for rendering and computation, and enable work to be performed on a rendering context and a computation context simultaneously. For example, rendering work may be performed on tile 0 from the first tile queue 1051 while a computation phase is being performed on tile 1 from the second tile queue 1052. Work may be divided into tile-based operations, and a single rendering target may perform a rendering pass while also performing computation work. Advantageously, some embodiments may provide better cache locality.
[0204] Now go to Figures 10E to 10F , render target 1060 may include four tiles (Tile A, Tile B, Tile C, and Tile D). A processing pass may include a compute pass (CP) followed by a render pass (RP). In some other systems, all work may have to be done sequentially for each tile (a CP followed by a render pass for each of A, B, C, and D). According to some embodiments, the compute phase for tile B may begin while tile A is being rendered (e.g., some compute work and some render work may be done simultaneously). A compute pass may include one or more separate compute shaders (e.g., CPs). 0 , C.S. 1 , to CS N ). The computation tile size may be a subset of the rendering tile size. For example, for rendering tile A, the computation tile subset may include computation tile A 0 , A 1 To A N .
[0205] Some embodiments may involve identifying work that can be done independently. For example, to determine independence within a compute shader sequence, an application may determine whether all input mappings to the same tile are from a previous pass, and / or all outputs go into that tile (e.g., all writes are local and nothing needs to be written to addresses or tiles outside of the tile). Advantageously, when the application recognizes that such processing is independent, it can take advantage of that recognition (e.g., by communicating the independence to the graphics hardware to support asynchronous computing). In some embodiments, independence may be determined at the driver or hardware level, but such independence may often be more easily identified at the application level.
[0206] Now go to Figures 10G to 10H , API extension 1071 (e.g., called CreateTilesForComputePass{}) can allow an application to specify tiles that can be processed independently. For a particular rendering pass / compute work, API 1071 can identify tiles, tile sizes, and identify tiles that are independent of other tiles in the compute shader sequence. For tile-based rendering, the compute tile size can be adapted inside the rendering tile (e.g., it can be the same tile size or some multiple, such as fitting four compute tiles inside one rendering tile).
[0207] For example, for a tile-based brightening stage, the API / application 1072 may specify that rendering passes are tile-based and independent (e.g., which allows the driver / hardware (HW) 1073) to perform scheduling. The API / application 1072 may submit them in this order for rendering pass 0, compute pass 0, and then rendering pass 1. For compute pass 0 (e.g., including compute shader CS 0 , CS 1 and CS 3 ), API 1071 can specify the tile size for compute pass 0 and that the tiles are independent. This information can be provided to driver / HW 1073 (e.g. depending on where the scheduling is done) and the work can be split into tiles A and B and scheduled so some compute work can run in parallel with some rendering work.
[0208] For example, dispatch queue 1074 may have a render pass 0 (RP 00100) for each of tiles A and B. 0 ), calculate pass 0 (CP 0 ) and Render Pass 1 (RP 1 ) queue. The scheduling queue can first send RP 0 -A is submitted to the rendering context 1075. The dispatch queue can then 0 -B is submitted to rendering context 1075 and CP 0 -A is submitted to the compute context 1076. The dispatch queue can then submit RP1 to the rendering context 1075 and also 0-B submits to compute context 1076. Advantageously, some embodiments can improve utilization and cache locality. For example, various graphics processing techniques may involve both rendering and compute phases (e.g., post-processing or brightening), where both the compute phase and the rendering phase operate on the same output. Some embodiments may perform clearing in a compute shader. For example, some embodiments may start by clearing the current tile, and then may perform some brightening operations (or other work) through another compute shader, and then perform rendering operations to perform post-processing operations. Advantageously, some embodiments may proceed immediately from compute to rendering without having to write anything back to an intermediate storage device (e.g., saving memory, processor bandwidth, and / or power).
[0209] Head-Mounted Display System Overview
[0210] Fig.11 A head mounted display (HMD) system 1100 is shown being worn by a user while experiencing an immersive environment, such as, for example, a virtual reality (VR) environment, an augmented reality (AR) environment, a multiplayer three-dimensional (3D) game, etc. In the example shown, one or more straps 1120 hold a frame 1102 of the HMD system 1100 in front of the user's eyes. Accordingly, a left eye display 1104 is positioned to be viewed by the user's left eye and a right eye display 1106 is positioned to be viewed by the user's right eye. In certain examples, such as, for example, a smartphone worn by a user, the left eye display 1104 and the right eye display 1106 may be optionally integrated into a single display. In the case of AR, the displays 1104, 1106 may be see-through displays that allow the user to view the physical environment while other rendered content (e.g., virtual characters, informational annotations, heads-up display / HUD) is presented above a live feed of the physical environment.
[0211] In one example, the frame 1102 includes a left bottom looking camera 1108 to capture images from an area generally in front of the user and below the left eye (e.g., a left hand gesture). Additionally, a right bottom looking camera 1110 can capture images from an area generally in front of the user and below the right eye (e.g., a right hand gesture). The illustrated frame 1102 also includes a left front looking camera 1112 and a right front looking camera 1114 to capture images in front of the user's left and right eyes, respectively. The frame 1102 can also include a left side looking camera 1116 to capture images from an area to the left of the user, and a right side looking camera 1118 to capture images from an area to the right of the user.
[0212] Images captured by cameras 1108, 1110, 1112, 1114, 1116, 1118, which may have overlapping fields of view, may be used to detect gestures made by the user and to analyze and / or reproduce the external environment on displays 1104, 1106. In one example, the detected gestures are used by a graphics processing architecture (e.g., internal and / or external) to render and / or control a virtual representation of the user in a 3D game. In fact, overlapping fields of view may enable the capture of gestures made by other individuals (e.g., in a multiplayer game), where the gestures of other individuals may also be used to render / control an immersive experience. Overlapping fields of view may also enable the HMD system 1100 to automatically detect obstructions or other hazards near the user. Such an approach is particularly advantageous in advanced driver assistance system (ADAS) applications.
[0213] In one example, a left bottom looking camera 1108 and a right bottom looking camera 1110 provided with overlapping fields of view provide a stereoscopic view with increased resolution. The increased resolution can in turn enable very similar user movements to be distinguished from each other (e.g., with sub-millimeter accuracy). The result can be an improved performance of the HMD system 1100 with respect to reliability. In fact, the solution shown is useful in a variety of applications, such as, for example, coloring information in an AR setting, exchanging virtual tools / devices between users in a multi-user environment, rendering virtual items (e.g., weapons, swords, personnel), etc. The postures of other objects, limbs, and / or body parts can also be detected and used to render / control the virtual environment. For example, myelogram signals, electroencephalogram signals, eye tracking, breathing or panting, hand movements, etc. can be tracked in real time, whether from the wearer or from another individual in a shared environment. Images captured by cameras 1108, 1110, 1112, 1114, 1116, 1118 can also be used as contextual input. For example, it may be determined that the user is indicating a specific word to be edited or a specific key to be pressed in a word processing application, a specific weapon to be deployed or a direction of travel in a game, and so on.
[0214] In addition, the images captured by the cameras 1108, 1110, 1112, 1114, 1116, 1118 can be used to implement shared communication or networked interaction in equipment operation, medical training and / or remote / teleoperation guidance applications. Task-specific gesture libraries or neural network machine learning can enable tool identification and feedback on tasks. For example, virtual tools converted into remote, real actions can be enabled. In another example, the HMD system 1100 converts the manipulation of a virtual drill within a virtual scene into remote operation of a drill on a robotic device deployed to search for collapsed buildings. Moreover, the HMD system 1100 can be programmable to the extent that it includes, for example, a protocol that enables a user to add a new gesture to a list of identifiable gestures associated with a user's action.
[0215] In addition, the various cameras in the HMD 1100 may be configurable to detect spectral frequencies outside of the visible wavelengths of the spectrum. The multispectral imaging capabilities in the input cameras allow for positional tracking of users and / or objects by eliminating non-essential image features (e.g., background noise). For example, in augmented reality (AR) applications such as surgery, instruments and equipment may be tracked by their infrared reflectivity without the need for additional tracking aids. Moreover, the HMD 1100 may be employed in low-visibility situations, where "live feeds" from the various cameras may be enhanced or augmented by computer analysis and displayed to the user as visual or audio cues.
[0216] The HMD system 1100 may also forgo performing any type of data communication with a remote computing system or requiring a power line (e.g., standalone operation mode). In this regard, the HMD system 1100 may be a "cordless" device having a power unit that enables the HMD system 1100 to operate independently of an external power system. Accordingly, a user may play a full-featured game without being tethered to another device (e.g., a game console) or a power supply. In a word processing example, the HMD system 1100 presents a virtual keyboard and / or a virtual mouse on displays 1104 and 1106 to provide a virtual desktop or word processing scene. Thus, gesture recognition data captured by one or more of the cameras may represent user typing activity on a virtual keyboard or movement of a virtual mouse. Advantages include, but are not limited to, portability and the freedom of privacy of a virtual desktop to isolate nearby individuals. The underlying graphics processing architecture may support compression and / or decompression of video and audio signals. Moreover, providing separate images to the user's left and right eyes may facilitate rendering, generation, and / or perception of 3D scenes. The relative positions of the left eye display 1104 and the right eye display 1106 may also be adjustable to match variations in interocular spacing between different users.
[0217] Fig.11 The number of cameras shown in is only to facilitate discussion. In fact, depending on the environment, the HMD system 1100 may include less than six or more than six cameras.
[0218] Functional components of an HMD system
[0219] Fig.12The HMD system is shown in more detail. In the example shown, the framework 1102 includes a power unit 1200 (e.g., battery power, adapter) that applies power to the HMD system. The illustrated framework 1102 also includes a motion tracking module 1220 (e.g., accelerometer, gyroscope), wherein the motion tracking module 1220 provides motion tracking data, orientation data, and / or position data to the processor system 1204. The processor system 1204 may include a network adapter 1224 coupled to the I / O bridge 1206. The I / O bridge 1206 can enable communication between the network adapter 1224 and various components such as, for example, the audio input module 1210, the audio output module 1208, the display device 1207, the input camera 1202, and the like.
[0220] In the example shown, the audio input module 1210 includes a right audio input 1218 and a left audio input 1216 that detect sounds that can be processed for the purpose of recognizing voice commands of the user and nearby individuals. Voice commands recognized in the captured audio signals can enhance gesture recognition during modal switching and other applications. Moreover, the captured audio signals can provide 3D information for improving the immersive experience.
[0221] The audio output module 1208 may include a right audio output 1214 and a left audio output 1212. The audio output module 1208 may deliver sound to the ears of the user and / or other nearby individuals. The audio output module 1208 may be in the form of earplugs, on-ear speakers, cover-ear speakers, loudspeakers, etc. or any combination thereof, and the audio output module 1208 may deliver stereo and / or 3D audio content to the user (e.g., spatial positioning). The illustrated framework 1102 also includes a wireless module 1222, which may facilitate communication between the HMD system and various other systems (e.g., computers, wearable devices, game consoles). In one example, the wireless module 1222 communicates with the processor system 1204 via a network adapter 1224.
[0222] The display device 1207 shown includes a left eye display 1104 and a right eye display 1106, wherein the visual content presented on the displays 1104, 1106 may be obtained from the processor system 1204 via the I / O bridge 1206. The input cameras 1202 may include the left looking camera 1116, the right looking camera 1118, the lower left looking camera 1108, the left front looking camera 1112, the right front looking camera 1114, and the lower right looking camera 1110 already discussed.
[0223] Now turn to Fig.13 , a general processing cluster (GPC) 1300 is shown. The GPC 1300 shown may be incorporated into a processor system such as, for example, the processor system 1204 ( Fig.12 ) in a processing system of a GPC 1300. GPC 1300 may include a pipeline manager 1302 that communicates with a scheduler. In one example, the pipeline manager 1302 receives tasks from the scheduler and distributes the tasks to one or more streaming multiprocessors (SMs) 1304. Each SM 1304 may be configured to process thread groups, where a thread group may be viewed as a plurality of related threads that perform the same or similar operations on different input data. Thus, each thread in a thread group may be assigned to a specific SM 1304. In another example, the number of threads may be greater than the number of execution units in SM 1304. In this regard, the threads in a thread group may operate in parallel. The pipeline manager 1302 may also specify the destination of the processed data to a work distribution crossbar 1308 that communicates with a memory crossbar.
[0224] Thus, as each SM 1304 passes processed tasks to the work distribution crossbar 1308, the processed tasks may be provided to another GPC 1300 for further processing. The output of the SM 1304 may also be sent to a pre-raster operation (preROP) unit 1314, which in turn directs the data to one or more raster operation units, or performs other operations (e.g., performing address translation, organizing picture color data, blending colors, etc.). The SM 1304 may include an internal level 1 (L1) cache (not shown) in which the SM 1304 may store data. The SM 1304 may also have access to a level 1.5 (L1.5) cache 1306 and a level 2 (L2) cache (not shown) via a memory management unit (MMU) 1310. The MMU 1310 may map virtual addresses to physical addresses. In this regard, the MMU 1310 may include page table entries (PTEs) used to map virtual addresses to physical addresses of tiles, memory pages, and / or cache line indexes. The illustrated GPU 1300 also includes a texture unit 1312 .
[0225] Graphics pipeline architecture
[0226] Now turn to Fig.14 , a graphics pipeline 1400 is shown. In the example shown, the world space pipeline 1420 includes a primitive distributor (PD) 1402. The PD 1402 may collect vertex data associated with high-order services, graphics primitives, triangles, etc., and transmit the vertex data to a vertex attribute fetch unit (VAF) 1404. The VAF 1404 may retrieve vertex attributes associated with each incoming vertex from a shared memory and store the vertex data and the associated vertex attributes in the shared memory.
[0227] The illustrated world space pipeline 1420 also includes a vertex, tessellation, geometry processing unit (VTG) 1406. The VTG 1406 may include, for example, a vertex processing unit, a tessellation initialization processing unit, a task distributor, a task generation unit, a topology generation unit, a geometry processing unit, a tessellation processing unit, the like, or any combination thereof. In one example, the VTG 1406 is a programmable execution unit configured to execute geometry programs, tessellation programs, and vertex shader programs. The program executed by the VTG 1406 may process vertex data and vertex attributes received from the VAF 1404. Furthermore, the program executed by the VTG 1406 may generate graphics primitives, color values, surface normalization factors, and transparency values at each vertex of the graphics primitives for further processing within the graphics processing pipeline 1400.
[0228] The vertex processing unit of VTG 1406 may be a programmable execution unit that executes a vertex shader program, lighting and transforming vertex data as specified by the vertex shader program. For example, the vertex processing unit may be programmed to transform vertex data from an object-based coordinate representation (e.g., object space) to an alternatively based coordinate system such as world space or normalized device coordinate (NDC) space. In addition, the vertex processing unit may read vertex data and vertex attributes stored in a shared memory by VAF 1404, and process the vertex data and vertex attributes. In one example, the vertex processing unit stores the processed vertices in a shared memory.
[0229] The tessellation initialization processing unit (e.g., hull shader, tessellation control shader) may execute a tessellation initialization shader program. In one example, the tessellation initialization processing unit processes vertices generated by the vertex processing unit and generates graphics primitives sometimes referred to as "patches". The tessellation initialization processing unit may also generate various patch attributes, wherein the patch data and patch attributes are stored in a shared memory. The task generation unit of the VTG 1406 may retrieve data and attributes of vertices and patches from the shared memory. In one example, the task generation unit generates tasks for processing vertices and patches for processing by a later stage in the graphics processing pipeline 1400.
[0230] The tasks generated by the task generation unit may be redistributed by the task distributor of VTG 1406. For example, the tasks generated by various instances of vertex shader programs and tessellation initialization programs may vary significantly between one graphics processing pipeline 1400 and another. Accordingly, the task distributor may redistribute these tasks so that each graphics processing pipeline 1400 has approximately the same workload during later pipeline stages.
[0231] As already noted, the VTG 1406 may also include a topology generation unit. In one example, the topology generation unit retrieves tasks distributed by the task distributor, indexes vertices including vertices associated with patches, and calculates indices that connect tessellated vertices to form graphics primitives and coordinates (UVs) of the tessellated vertices. The indexed vertices may be stored in a shared memory by the topology generation unit. The tessellation processing unit of the VTG 1406 may be configured to execute a tessellation shader program (e.g., a domain shader, a tessellation evaluation shader). The tessellation processing unit may read input data from the shared memory and write output data to the shared memory. The output data may be passed from the shared memory to a geometry processing unit (e.g., a next shader level) as input data.
[0232] The geometry processing unit of VTG 1406 may execute geometry shader programs to transform graphics primitives (e.g., triangles, line segments, points, etc.). In one example, vertices are grouped to construct graphics primitives, where the geometry processing unit subdivides the graphics primitives into one or more new graphics primitives. The geometry processing unit may also compute parameters that may be used to rasterize the new graphics primitives, such as, for example, plain equation coefficients.
[0233] The illustrated world space pipeline 1420 also includes a viewport scaling, picking, and clipping unit (VPC) 1408 that receives parameters and vertices that specify new graphics primitives from the VTG 1406. In one example, the VPC 1408 performs clipping, aliasing, perspective correction, and viewport transformation to identify graphics primitives that are potentially viewable in the final rendered image. The VPC 1408 may also identify graphics primitives that may not be viewable.
[0234] The graphics processing pipeline 1400 may also include a tile unit 1410 coupled to the world space pipeline 1420. The tile unit 1410 may be a graphics primitive classification engine, wherein the graphics primitives are processed in the world space pipeline 1420 and then transmitted to the tile unit 1410. In this regard, the graphics processing pipeline 1400 may also include a screen space pipeline 1422, wherein the screen space may be divided into cache tiles. Each cache tile may therefore be associated with a portion of the screen space. For each graphics primitive, the tile unit 1410 may identify a set of cache tiles that intersect the graphics primitive (e.g., a "tile"). After tiling a plurality of graphics primitives, the tile unit 1410 may process the graphics primitives cache tile by cache tile. In one example, the graphics primitives associated with a particular cache tile are transmitted to the setup unit 1412 in the screen space pipeline 1422 one tile at a time. Graphics primitives that intersect multiple cache tiles may be processed once in the world-space pipeline 1420 and transferred to the screen-space pipeline 1422 multiple times.
[0235] In one example, the setup unit 1412 receives vertex data from the VPC 1408 via the tiling unit 1410 and computes parameters associated with the graphics primitives. The parameters may include, for example, edge equations, partial plane equations, and depth plane equations. The screen space pipeline 1422 may also include a rasterizer 1414 coupled to the setup unit 1412. The rasterizer may scan-convert new graphics primitives and transmit fragments and coverage data to a pixel shading unit (PS) 1416. The rasterizer 1414 may also perform Z-picking and other Z-based optimizations.
[0236] The PS 1416, which can access the shared memory, can execute a fragment shader program that transforms the fragments received from the rasterizer 1414. More specifically, the fragment shader program can shade the fragments at a pixel level granularity (e.g., working as a pixel shader program). In another example, the fragment shader program shades the fragments at a sample level granularity, where each pixel includes multiple samples and each sample represents a portion of a pixel. Moreover, depending on the environment (e.g., sampling rate), the fragment shader program can shade the fragments at any other granularity. The PS 1416 can perform blending, shading, perspective correction, texture mapping, etc. to generate shaded fragments.
[0237] The illustrated screen space pipeline 1422 also includes a raster operations unit (ROP) 1418, which may perform operations such as, for example, stencil printing, Z testing, blending, etc. The ROP 1418 may then transmit the pixel data as processed graphics data to one or more rendered targets (e.g., graphics memory). The ROP 1418 may be configured to compress Z or color data written to memory and decompress Z or color data read from memory. The location of the ROP 1418 may vary depending on the environment.
[0238] Graphics processing pipeline 1400 may be implemented by one or more processing elements. For example, VTG 1406 and / or PS 1416 may be implemented in one or more SMs, PD 1402, VAF 1404, VPC 1408, tile unit 1410, setup unit 1412, rasterizer 1414, and / or ROP 1418 may be implemented in a processing element of a specific GPC along with a corresponding partition unit. Graphics processing pipeline 1400 may also be implemented in fixed functionality hardware logic. In fact, graphics processing pipeline 1400 may be implemented in a PPU.
[0239] Thus, the illustrated world space pipeline 1420 processes graphics objects in 3D space, where the position of each graphics object relative to other graphics objects and relative to a 3D coordinate system is known. In contrast, the screen space pipeline 1422 can process graphics objects that have been projected from a 3D coordinate system onto a 2D planar surface representing the surface of a display device. In addition, the world space pipeline 1420 can be divided into an alpha stage pipeline and a beta stage pipeline, wherein the alpha stage pipeline includes pipeline stages from PD 1402 to a task generation unit. The beta stage pipeline may include pipeline stages from a topology generation unit to VPC 1408. In such a case, the graphics processing pipeline 1400 may perform a first set of operations (e.g., a single thread, a thread group, a plurality of thread groups acting in concert) in the alpha stage pipeline and perform a second set of operations (e.g., a single thread, a thread group, a plurality of thread groups acting in concert) in the beta stage pipeline.
[0240] If multiple graphics processing pipelines 1400 are in use, the vertex data and vertex attributes associated with a set of graphics objects may be partitioned so that each graphics processing pipeline 1400 has a similar workload throughout the alpha stage. Accordingly, the alpha stage processing may substantially expand the amount of vertex data and vertex attributes, so that the amount of vertex data and vertex attributes generated by the task generation units is significantly greater than the amount of vertex data and vertex attributes processed by the PD 1402 and the VAF 1404. Moreover, even when the alpha stage is started with the same number of attributes, the task generation units associated with different graphics processing pipelines 1400 may generate vertex data and vertex attributes with different quality levels. In such cases, the task distributor may redistribute the attributes generated by the alpha stage pipelines so that each graphics processing pipeline 1400 has approximately the same workload at the beginning of the beta stage pipeline.
[0241] Now turn to Fig.15 , a stream delivery multiprocessor (SM) 1500 is shown. The illustrated SM 1500 includes K scheduler units 1504 coupled to an instruction cache 1502, wherein each scheduler unit 1504 receives a thread block array from a pipeline manager (not shown) and manages instruction scheduling of one or more thread blocks in each active thread block array. The scheduler unit 1504 can schedule threads for execution in parallel thread groups, wherein each group can be referred to as a "thread warp". Thus, each thread warp may include, for example, sixty-four threads. In addition, the scheduler unit 1504 can manage a plurality of different thread blocks, assigning thread blocks to thread warps for execution. The scheduler unit may then schedule instructions from a plurality of different thread warps on various functional units during each clock cycle. Each scheduler unit 1504 may include one or more instruction dispatch units 1522, wherein each dispatch unit 1522 transmits instructions to one or more of the functional units. The number of dispatch units 1522 may vary depending on the environment. In the example shown, the scheduler unit 1504 includes two dispatch units 1522 that enable two different instructions from the same warp to be dispatched during each clock cycle.
[0242] SM 1500 may also include a register file 1506. Register file 1506 may include a set of registers that are divided between functional units so that each functional unit is assigned a dedicated portion of register file 1506. Register file 1506 may also be divided between different thread warps being executed by SM 1500. In one example, register file 1506 provides temporary storage for operands of data paths connected to functional units. The illustrated SM 1500 also includes L processing cores 1508, where L may be a relatively large number (e.g., 192). Each core 1508 may be a single-precision processing unit that includes a pipeline of floating-point arithmetic logic units (e.g., IEEE 754-2008) and integer arithmetic logic units.
[0243] The illustrated SM 1500 also includes M double precision units (DPUs) 1510, N special function units (SFUs) 1512, and P load / store units (LSUs) 1514. Each DPU 1510 can implement double precision floating point arithmetic and each SFU 1512 can perform special functions such as, for example, rectangular copy pixel blending. In addition, each LSU 1514 can implement load and store operations between a shared memory 1518 and a register file 1506. In one example, the load and store operations are implemented through J texture units / L1 caches 1520 and an interconnect network 1516. In one example, the J texture units / L1 caches 1520 are also coupled to a crossbar (not shown). Thus, the interconnect network 1516 can connect each of the functional units to the register file 1506 and the shared memory 1518. In one example, the interconnect network 1516 acts as a crossbar that connects any of the functional units to any register in the register file 1506.
[0244] SM 1500 may be implemented within a graphics processor (e.g., a graphics processing unit / GPU), where a texture unit / L1 cache 1520 may access a texture map from memory and sample the texture map to produce sampled texture values for use in a shader program. Texture operations performed by texture unit / L1 cache 1520 include, but are not limited to, mipmap-based antialiasing.
[0245] Additional System Overview Examples
[0246] Fig.1616 is a block diagram of a processing system 1600 according to an embodiment. In various embodiments, the system 1600 includes one or more processors 1602 and one or more graphics processors 1608, and may be a server system, a single processor desktop system, or a multi-processor workstation system having a large number of processors 1602 or processor cores 1607. In one embodiment, the system 1600 is a processing platform incorporated within a system-on-chip (SoC) integrated circuit for use in a mobile, handheld, or embedded device.
[0247] Embodiments of system 1600 may include or be incorporated into: a server-based gaming platform, a gaming console (including gaming and media consoles, mobile gaming consoles, handheld gaming consoles, or online gaming consoles). In some embodiments, system 1600 is a mobile phone, a smart phone, a tablet computing device, or a mobile Internet device. Data processing system 1600 may also include, be coupled to, or be integrated into: a wearable device, such as a smart watch wearable device, a smart eye wearable device, an augmented reality device, or a virtual reality device. In some embodiments, data processing system 1600 is a television or set-top box device having one or more processors 1602 and a graphical interface generated by one or more graphics processors 1608.
[0248] In some embodiments, the one or more processors 1602 each include one or more processor cores 1607 for processing instructions, which when executed perform operations of the system and user software. In some embodiments, each of the one or more processor cores 1607 is configured to process a specific instruction set 1609. In some embodiments, the instruction set 1609 can facilitate complex instruction set computing (CISC), reduced instruction set computing (RISC), or computing via very long instruction words (VLIW). Multiple processor cores 1607 can each process different instruction sets 1609, which may include instructions for facilitating emulation of other instruction sets. The processor core 1607 may also include other processing devices, such as a digital signal processor (DSP).
[0249] In some embodiments, the processor 1602 includes a cache memory 1604. Depending on the architecture, the processor 1602 may have a single internal cache or multiple levels of internal cache. In some embodiments, the cache memory is shared among various components of the processor 1602. In some embodiments, the processor 1602 also uses an external cache (e.g., a level 3 (L3) cache or a last level cache (LLC)) (not shown), which may be shared among the processor core 1607 using known cache coherence techniques. A register file 1606 is additionally included in the processor 1602, which may include different types of registers (e.g., integer registers, floating point registers, status registers, and instruction pointer registers) for storing different types of data. Some registers may be general purpose registers, while other registers may be specific to the design of the processor 1602.
[0250] In some embodiments, the processor 1602 is coupled to a processor bus 1610 component for transmitting communication signals (such as address, data or control signals) between the processor 1602 and other components in the system 1600. In one embodiment, the system 1600 uses an exemplary 'hub' system architecture, including a memory controller hub 1616 and an input output (I / O) controller hub 1630. The memory controller hub 1616 facilitates communication between memory devices and other components of the system 1600, while the I / O controller hub (ICH) 1630 provides connections to the I / O devices via a local I / O bus. In one embodiment, the logic of the memory controller hub 1616 is integrated within the processor.
[0251] The memory device 1620 may be a dynamic random access memory (DRAM) device, a static random access memory (SRAM) device, a flash memory device, a phase change memory device, or some other memory device having suitable properties to act as a process memory. In one embodiment, the memory device 1620 may operate as a system memory of the system 1600 to store data 1622 and instructions 1621 for use when the one or more processors 1602 execute applications or processes. The memory controller hub 1616 is also coupled to an optional external graphics processor 1612, which may communicate with one or more graphics processors 1608 in the processor 1602 to perform graphics and media operations.
[0252] In some embodiments, the ICH 1630 enables peripheral devices to connect to the memory device 1620 and the processor 1602 via a high-speed I / O bus. The I / O peripheral devices include, but are not limited to, an audio controller 1646, a firmware interface 1628, a wireless transceiver 1626 (e.g., Wi-Fi, Bluetooth), a data storage device 1624 (e.g., a hard drive, flash memory, etc.), and a traditional I / O controller 1640 for coupling traditional (e.g., Personal System 2 (PS / 2)) devices to the system. One or more Universal Serial Bus (USB) controllers 1642 connect input devices (such as a keyboard and mouse 1644 combination). A network controller 1634 may also be coupled to the ICH 1630. In some embodiments, a high-performance network controller (not shown) is coupled to the processor bus 1610. It will be appreciated that the system 1600 shown is exemplary and not limiting, as other types of data processing systems configured in different ways may also be used. For example, the I / O controller hub 1630 may be integrated within the one or more processors 1602 , or the memory controller hub 1616 and the I / O controller hub 1630 may be integrated into a discreet external graphics processor, such as the external graphics processor 1612 .
[0253] Fig.17 is a block diagram of an embodiment of a processor 1700 having one or more processor cores 1702A- 1702N, an integrated memory controller 1714 , and an integrated graphics processor 1708 . Fig.17 Those elements having the same reference numbers (or names) as those of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto. Processor 1700 may include additional cores up to and including additional core 1702N represented by a dashed box. Each of processor cores 1702A-1702N includes one or more internal cache units 1704A-1704N. In some embodiments, each processor core is also capable of accessing one or more shared cache units 1706.
[0254] Internal cache units 1704A-1704N and shared cache unit 1706 represent a cache memory hierarchy within processor 1700. The cache memory hierarchy may include at least one level of instruction and data cache within each processor core and one or more levels of shared intermediate level caches (such as level 2 (L2), level 3 (L3), level 4 (L4), or other levels of cache), where the highest level cache in front of external memory is classified as LLC. In some embodiments, cache coherence logic maintains coherence between the various cache units 1706 and 1704A-1704N.
[0255] In some embodiments, the processor 1700 may also include a set of one or more bus controller units 1716 and a system agent core 1710. The one or more bus controller units 1716 manage a set of peripheral buses, such as one or more peripheral component interconnect buses (e.g., PCI, PCI Express). The system agent core 1710 provides management functionality for various processor components. In some embodiments, the system agent core 1710 includes one or more integrated memory controllers 1714 to manage access to various external memory devices (not shown).
[0256] In some embodiments, one or more of the processor cores 1702A-1702N include support for simultaneous multithreading. In such embodiments, the system agent core 1710 includes components for coordinating and operating the cores 1702A-1702N during multithreaded processing. The system agent core 1710 may additionally include a power control unit (PCU) that includes logic and components for regulating the power state of the processor cores 1702A-1702N and the graphics processor 1708.
[0257] In some embodiments, the processor 1700 further includes a graphics processor 1708 for performing graphics processing operations. In some embodiments, the graphics processor 1708 is coupled to a set of shared cache units 1706 and a system agent core 1710 (including the one or more integrated memory controllers 1714). In some embodiments, a display controller 1711 is coupled to the graphics processor 1708 to drive the graphics processor output to one or more coupled displays. In some embodiments, the display controller 1711 can be a separate module coupled to the graphics processor via at least one interconnect, or can be integrated within the graphics processor 1708 or the system agent core 1710.
[0258] In some embodiments, a ring-based interconnect unit 1712 is used to couple the internal components of the processor 1700. However, alternative interconnect units may be used, such as point-to-point interconnects, switched interconnects, or other technologies, including those well known in the art. In some embodiments, the graphics processor 1708 is coupled to the ring interconnect 1712 via an I / O link 1713.
[0259] Exemplary I / O links 1713 represent at least one of a variety of I / O interconnects, including an on-package I / O interconnect that facilitates communication between various processor components and high-performance embedded memory modules 1718 (such as eDRAM modules). In some embodiments, each of processor cores 1702-1702N and graphics processor 1708 use embedded memory modules 1718 as a shared last-level cache.
[0260] In some embodiments, processor cores 1702A-1702N are homogeneous cores that execute the same instruction set architecture. In another embodiment, processor cores 1702A-1702N are heterogeneous in terms of instruction set architecture (ISA), wherein one or more of processor cores 1702A-N execute a first instruction set, while at least one of the other cores executes a subset of the first instruction set or a different instruction set. In one embodiment, processor cores 1702A-1702N are heterogeneous in terms of microarchitecture, wherein one or more cores with relatively higher power consumption are coupled with one or more power cores with lower power consumption. In addition, processor 1700 may be implemented on one or more chips or as a SoC integrated circuit having the components shown in addition to other components.
[0261] Fig.18 1 is a block diagram of a graphics processor 1800, which may be a discrete graphics processing unit, or may be a graphics processor integrated with multiple processing cores. In some embodiments, the graphics processor communicates via a memory-mapped I / O interface to registers on the graphics processor and with commands placed into processor memory. In some embodiments, the graphics processor 1800 includes a memory interface 1814 for accessing memory. The memory interface 1814 may be an interface to local memory, one or more internal caches, one or more shared external caches, and / or to system memory.
[0262] In some embodiments, the graphics processor 1800 also includes a display controller 1802 for driving display output data to a display device 1820. The display controller 1802 includes hardware for one or more overlapping planes of the display and a composition of multiple layers of video or user interface elements. In some embodiments, the graphics processor 1800 includes a video codec engine 1806 for encoding, decoding, or transcoding media to, from, or between one or more media encoding formats, including but not limited to: Moving Picture Experts Group (MPEG) formats (such as MPEG-2), Advanced Video Coding (AVC) formats (such as H.264 / MPEG-4 AVC), and Society of Motion Picture & Television Engineers (SMPTE) 421M / VC-1, and Joint Photographic Experts Group (JPEG) formats (such as JPEG, and Motion JPEG (MJPEG) formats).
[0263] In some embodiments, graphics processor 1800 includes a block map transfer (BLIT) engine 1804 for performing two-dimensional (2D) rasterizer operations, including, for example, bit boundary block transfers. However, in one embodiment, 2D graphics operations are performed using one or more components of a graphics processing engine (GPE) 1810. In some embodiments, graphics processing engine 1810 is a compute engine for performing graphics operations, including three-dimensional (3D) graphics operations and media operations.
[0264] In some embodiments, GPE 1810 includes a 3D pipeline 1812 for performing 3D operations, such as rendering three-dimensional images and scenes using processing functions that act on 3D primitive shapes (e.g., rectangles, triangles, etc.). 3D pipeline 1812 includes programmable and fixed function elements that perform various tasks within the element and / or spawn execution threads to 3D / media subsystem 1815. While 3D pipeline 1812 can be used to perform media operations, embodiments of GPE 1810 also include a media pipeline 1816 that is specifically used to perform media operations, such as video post-processing and image enhancement.
[0265] In some embodiments, the media pipeline 1816 includes fixed-function or programmable logic units for performing one or more specialized media operations (such as video decoding acceleration, video deinterlacing, and video encoding acceleration) instead of or on behalf of the video codec engine 1806. In some embodiments, the media pipeline 1816 additionally includes a thread generation unit to generate threads for execution on the 3D / media subsystem 1815. The generated threads perform calculations for the media operations on one or more graphics execution units included in the 3D / media subsystem 1815.
[0266] In some embodiments, the 3D / media subsystem 1815 includes logic for executing threads generated by the 3D pipeline 1812 and the media pipeline 1816. In one embodiment, the pipeline sends thread execution requests to the 3D / media subsystem 1815, which includes thread dispatch logic for arbitrating and dispatching various requests for available thread execution resources. The execution resources include an array of graphics execution units for processing 3D and media threads. In some embodiments, the 3D / media subsystem 1815 includes one or more internal caches for thread instructions and data. In some embodiments, the subsystem also includes shared memory (including registers and addressable memory) to share data between threads and store output data.
[0267] 3D / Media Processing
[0268] Fig.19 is a block diagram of a graphics processing engine 1910 of a graphics processor in accordance with some embodiments. In one embodiment, GPE 1910 is Fig.18 A version of the GPE 1810 shown in . Fig.19 Elements in FIG. 1 having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0269] In some embodiments, the GPE 1910 is coupled to a command streamer 1903 that provides a command stream to the GPE 3D and media pipelines 1912, 1916. In some embodiments, the command streamer 1903 is coupled to a memory, which may be a system memory, or one or more of an internal cache memory and a shared cache memory. In some embodiments, the command streamer 1903 receives commands from the memory and sends the commands to the 3D pipeline 1912 and / or the media pipeline 1916. The commands are instructions obtained from a circular buffer storing commands for the 3D and media pipelines 1912, 1916. In one embodiment, the circular buffer may further include a batch command buffer storing multiple batches of multiple commands. The 3D and media pipelines 1912, 1916 process the commands by performing operations via logic within the corresponding pipeline or by dispatching one or more execution threads to the execution unit array 1914. In some embodiments, execution unit array 1914 is scalable such that the array includes a variable number of execution units based on the target power and performance level of GPE 1910 .
[0270] In some embodiments, sampling engine 1930 is coupled to a memory (e.g., cache memory or system memory) and execution unit array 1914. In some embodiments, sampling engine 1930 provides a memory access mechanism for execution unit array 1914 that allows execution array 1914 to read graphics and media data from memory. In some embodiments, sampling engine 1930 includes logic for performing specialized image sampling operations for media.
[0271] In some embodiments, the specialized media sampling logic in the sampling engine 1930 includes a denoising / de-interlacing module 1932, a motion estimation module 1934, and an image scaling and filtering module 1936. In some embodiments, the denoising / de-interlacing module 1932 includes logic for performing one or more of a denoising or de-interlacing algorithm on the decoded video data. The de-interlacing logic combines alternating fields of interlaced video content into a single frame of video. The denoising logic reduces or removes data noise from the video and image data. In some embodiments, the denoising logic and de-interlacing logic are motion adaptive and use spatial or temporal filtering based on the amount of motion detected in the video data. In some embodiments, the denoising / de-interlacing module 1932 includes dedicated motion detection logic (e.g., within the motion estimation engine 1934).
[0272] In some embodiments, the motion estimation engine 1934 provides hardware acceleration of video operations by performing video acceleration functions (such as motion vector estimation and prediction) on video data. The motion estimation engine determines motion vectors that describe transformations of image data between consecutive video frames. In some embodiments, the graphics processor media codec uses the video motion estimation engine 1934 to perform operations on video at the macroblock level that would otherwise be too computationally intensive to perform with a general purpose processor. In some embodiments, the motion estimation engine 1934 may be generally available to the graphics processor component to assist in video decoding and processing functions that are sensitive or adaptive to the direction or magnitude of motion within the video data.
[0273] In some embodiments, the image scaling and filtering module 1936 performs image processing operations to improve the visual quality of the generated images and videos. In some embodiments, the scaling and filtering module 1936 processes the image and video data during a sampling operation before providing the data to the execution unit array 1914.
[0274] In some embodiments, GPE 1910 includes a data port 1944 that provides an additional mechanism for the graphics subsystem to access memory. In some embodiments, data port 1944 facilitates memory access for operations including render target writes, constant buffer reads, scratch memory space reads / writes, and media surface accesses. In some embodiments, data port 1944 includes a cache memory space for caching accesses to memory. The cache memory can be a single data cache, or multiple caches (e.g., render buffer cache, constant buffer cache, etc.) separated into multiple subsystems that access memory via a data port. In some embodiments, threads executing on execution units in execution unit array 1914 communicate with the data port by exchanging messages via a data distribution interconnect that couples each subsystem of GPE 1910.
[0275] Execution Unit
[0276] Fig. 20 is a block diagram of another embodiment of a graphics processor 2000 . Fig. 20 Elements in FIG. 1 having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0277] In some embodiments, graphics processor 2000 includes ring interconnect 2002, pipeline front end 2004, media engine 2037, and graphics cores 2080A-2080N. In some embodiments, ring interconnect 2002 couples the graphics processor to other processing units, including other graphics processors or one or more general-purpose processor cores. In some embodiments, the graphics processor is one of many processors integrated into a multi-core processing system.
[0278] In some embodiments, the graphics processor 2000 receives batches of commands via the ring interconnect 2002. The incoming commands are interpreted by the command streamer 2003 in the pipeline front end 2004. In some embodiments, the graphics processor 2000 includes scalable execution logic for performing 3D geometry processing and media processing via the graphics cores 2080A-2080N. For 3D geometry processing commands, the command streamer 2003 supplies the commands to the geometry pipeline 2036. For at least some media processing commands, the command streamer 2003 supplies the commands to the video front end 2034, which is coupled to the media engine 2037. In some embodiments, the media engine 2037 includes a video quality engine (VQE) 2030 for video and image post-processing and a multi-format encoding / decoding (MFX) 2033 engine for providing hardware accelerated media data encoding and decoding. In some embodiments, the geometry pipeline 2036 and the media engine 2037 each generate execution threads for thread execution resources provided by at least one graphics core 2080A.
[0279] In some embodiments, the graphics processor 2000 includes scalable thread execution resources featuring modular cores 2080A-2080N (sometimes referred to as core slices), each modular core having multiple sub-cores 2050A-2050N, 2060A-2060N (sometimes referred to as core sub-slices). In some embodiments, the graphics processor 2000 can have any number of graphics cores 2080A to 2080N. In some embodiments, the graphics processor 2000 includes a graphics core 2080A, which has at least a first sub-core 2050A and a second sub-core 2060A. In other embodiments, the graphics processor is a low-power processor with a single sub-core (e.g., 2050A). In some embodiments, the graphics processor 2000 includes multiple graphics cores 2080A-2080N, each graphics core including a group of first sub-cores 2050A-2050N and a group of second sub-cores 2060A-2060N. Each sub-core in the group of first sub-cores 2050A-2050N includes at least a first group of execution units 2052A-2052N and a media / texture sampler 2054A-2054N. Each sub-core in the group of second sub-cores 2060A-2060N includes at least a second group of execution units 2062A-2062N and a sampler 2064A-2064N. In some embodiments, each sub-core 2050A-2050N, 2060A-2060N shares a group of shared resources 2070A-2070N. In some embodiments, the shared resources include a shared cache memory and a pixel operation logic. Other shared resources may also be included in various embodiments of the graphics processor.
[0280] Fig.21Thread execution logic 2100 is shown, including an array of processing elements employed in some embodiments of a GPE. Fig.21 Those elements in FIG. 1 having the same reference numbers (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0281] In some embodiments, the thread execution logic 2100 includes a pixel shader 2102, a thread dispatcher 2104, an instruction cache 2106, a scalable execution unit array (including a plurality of execution units 2108A-2108N), a sampler 2110, a data cache 2112, and a data port 2114. In one embodiment, the included components are interconnected via an interconnect structure that links to each of the components. In some embodiments, the thread execution logic 2100 includes one or more connections to a memory (such as a system memory or a cache memory) through one or more of the instruction cache 2106, the data port 2114, the sampler 2110, and the execution unit array 2108A-2108N. In some embodiments, each execution unit (e.g., 2108A) is a separate vector processor that is capable of executing multiple simultaneous threads and processing multiple data elements in parallel for each thread. In some embodiments, the execution unit array 2108A-2108N includes any number of separate execution units.
[0282] In some embodiments, execution unit arrays 2108A-2108N are primarily used to execute "shader" programs. In some embodiments, the execution units in arrays 2108A-2108N execute an instruction set that includes native support for many standard 3D graphics shader instructions, so that shader programs from graphics libraries (e.g., Direct 3D and OpenGL) are executed with minimal conversion. The execution units support vertex and geometry processing (e.g., vertex programs, geometry programs, vertex shaders), pixel processing (e.g., pixel shaders, fragment shaders), and general processing (e.g., compute and media shaders).
[0283] Each execution unit in the execution unit array 2108A-2108N operates on an array of data elements. The number of data elements is the "execution size" or the number of lanes for the instruction. An execution lane is a logical unit used for flow control, data element access, and masked execution within an instruction. The number of lanes may be independent of the number of physical arithmetic logic units (ALUs) or floating point units (FPUs) of a specific graphics processor. In some embodiments, the execution units 2108A-2108N support integer and floating point data types.
[0284] The execution unit instruction set includes single instruction multiple data (SIMD) instructions. Various data elements can be stored in registers as compact data types, and the execution unit will process various elements based on the data size of the element. For example, when operating on a 256-bit wide vector, the 256-bit vector is stored in a register, and the execution unit operates on the vector as four separate 64-bit compact data elements (data elements of quadruple word length (QW) size), eight separate 32-bit compact data elements (data elements of double word length (DW) size), sixteen separate 16-bit compact data elements (data elements of word length (W) size), or thirty-two separate 8-bit data elements (data elements of byte (B) size). However, different vector widths and register sizes are possible.
[0285] One or more internal instruction caches (e.g., 2106) are included in the thread execution logic 2100 to cache thread instructions for the execution unit. In some embodiments, one or more data caches (e.g., 2112) are included to cache thread data during thread execution. In some embodiments, a sampler 2110 is included to provide texture sampling for 3D operations and media sampling for media operations. In some embodiments, the sampler 2110 includes specialized texture or media sampling functionality to process texture or media data during the sampling process before providing the sampled data to the execution unit.
[0286] During execution, the graphics and media pipelines send thread initiation requests to the thread execution logic 2100 via the thread generation and dispatch logic. In some embodiments, the thread execution logic 2100 includes a local thread dispatcher 2104 that arbitrates thread initiation requests from the graphics and media pipelines and instantiates the requested threads on one or more execution units 2108A-2108N. For example, the geometry pipeline (e.g., Fig. 20 2036) dispatches vertex processing, tessellation or geometry processing threads to thread execution logic 2100 ( Fig.21 ). In some embodiments, thread dispatcher 2104 may also process execution time thread generation requests from executing shader programs.
[0287] Once the group of geometric objects has been processed and rasterized into pixel data, the pixel shader 2102 is called to further calculate output information and cause the results to be written to the output surface (e.g., color buffer, depth buffer, stencil buffer, etc.). In some embodiments, the pixel shader 2102 calculates the values of various vertex attributes to be interpolated across the rasterized objects. In some embodiments, the pixel shader 2102 then executes a pixel shader program supplied by an application programming interface (API). In order to execute the pixel shader program, the pixel shader 2102 dispatches threads to execution units (e.g., 2108A) via a thread dispatcher 2104. In some embodiments, the pixel shader 2102 uses texture sampling logic in a sampler 2110 to access texture data in a texture map stored in memory. Arithmetic operations performed on the texture data and the input geometric data operate on the pixel color data for each geometric fragment, or discard one or more pixels from further processing.
[0288] In some embodiments, data port 2114 provides a memory access mechanism for thread execution logic 2100 to output processed data to memory for processing on the graphics processor output pipeline. In some embodiments, data port 2114 includes or is coupled to one or more cache memories (e.g., data cache 2112) to cache data for memory access via the data port.
[0289] Fig. 22 is a block diagram illustrating a graphics processor instruction format 2200 according to some embodiments. In one or more embodiments, a graphics processor execution unit supports an instruction set having instructions in multiple formats. Solid line boxes show components that are typically included in an execution unit instruction, while dashed lines include components that are optional or included only in a subset of instructions. In some embodiments, the instruction format 2200 described and illustrated are macroinstructions in that they are instructions supplied to the execution unit, as opposed to micro-operations derived from instruction decoding (once the instruction is processed).
[0290] In some embodiments, the graphics processor execution unit natively supports instructions in 128-bit format 2210. A 64-bit compact instruction format 2230 is available for some instructions based on the selected instruction, instruction options, and the number of operands. The native 128-bit format 2210 provides access to all instruction options, while some options and operations are limited to the 64-bit format 2230. The native instructions available in the 64-bit format 2230 vary with the embodiment. In some embodiments, instructions are partially compacted using a set of index values in the index field 2213. The execution unit hardware references a set of compact tables based on the index values, and uses the compact table output to reconstruct the native instructions in 128-bit format 2210.
[0291] For each format, the instruction opcode 2212 defines the operation to be performed by the execution unit. The execution unit executes each instruction in parallel across multiple data elements of each operand. For example, in response to an addition instruction, the execution unit performs a simultaneous addition operation across each color channel representing a texture element or a picture element. By default, the execution unit executes each instruction across all data channels of the operand. In some embodiments, the instruction control field 2214 enables control of certain execution options such as channel selection (e.g., prediction) and data channel ordering (e.g., swizzling). For 128-bit instructions 2210, the execution size field 2216 limits the number of data channels that will be executed in parallel. In some embodiments, the execution size field 2216 is not available for use in the 64-bit compact instruction format 2230.
[0292] Some execution unit instructions have up to three operands, including two source operands src0 2220, src1 2222 and one destination 2218. In some embodiments, the execution unit supports dual destination instructions, where one of the destinations is implicit. Data manipulation instructions may have a third source operand (e.g., SRC2 2224), where the instruction opcode 2212 determines the number of source operands. The last source operand of an instruction may be an immediate (e.g., hard-coded) value passed by the instruction.
[0293] In some embodiments, the 128-bit instruction format 2210 includes access / addressing mode information 2226, which specifies (for example) whether to use direct register addressing mode or indirect register addressing mode. When using direct register addressing mode, the register address of one or more operands is provided directly through bits in the instruction 2210.
[0294] In some embodiments, the 128-bit instruction format 2210 includes an access / addressing mode field 2226, which specifies an addressing mode and / or access mode for the instruction. In one embodiment, the access mode is used to define the data access alignment for the instruction. Some embodiments support access modes including 16-byte aligned access modes and 1-byte aligned access modes, wherein the byte alignment of the access mode determines the access alignment of the instruction operand. For example, when in the first mode, the instruction 2210 may use byte-aligned addressing for the source and destination operands, and when in the second mode, the instruction 2210 may use 16-byte aligned addressing for all source and destination operands.
[0295] In one embodiment, the addressing mode portion of the access / addressing mode field 2226 determines whether the instruction will use direct or indirect addressing. When direct register addressing mode is used, the bits in the instruction 2210 directly provide the register address of one or more operands. When indirect register addressing mode is used, the register address of one or more operands can be calculated based on the address immediate field and the address register value in the instruction.
[0296] In some embodiments, instructions are grouped based on the opcode 2212 bit field to simplify opcode decoding 2240. For 8-bit opcodes, bits 4, 5, and 6 allow the execution unit to determine the type of opcode. The precise opcode grouping shown is only an example. In some embodiments, the move and logic opcode group 2242 includes data movement and logic instructions (e.g., move (mov), compare (cmp)). In some embodiments, the move and logic group 2242 shares five most significant bits (MSBs), wherein the move (mov) instruction adopts the form of 0000xxxxb, and the logic instruction adopts the form of 0001xxxxb. The flow control instruction group 2244 (e.g., call, jump (jmp)) includes instructions in the form of 0010xxxxb (e.g., 0x20). The miscellaneous instruction group 2246 includes a mixture of instructions, which includes synchronization instructions (e.g., wait, send) in the form of 0011xxxxb (e.g., 0x30). The parallel math instruction group 2248 includes component-wise arithmetic instructions (e.g., add, multiply (mul)) in the form of 0100xxxxb (e.g., 0x40). The parallel math group 2248 performs arithmetic operations in parallel across data lanes. The vector math group 2250 includes arithmetic instructions (e.g., dp4) in the form of 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic such as dot product operations on vector operands.
[0297] Graphics Pipeline
[0298] Fig.23 is a block diagram of another embodiment of a graphics processor 2300 . Fig.23 Elements in FIG. 1 having the same reference number (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.
[0299] In some embodiments, the graphics processor 2300 includes a graphics pipeline 2320, a media pipeline 2330, a display engine 2340, a thread execution logic 2350, and a rendering output pipeline 2370. In some embodiments, the graphics processor 2300 is a graphics processor within a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or via commands issued to the graphics processor 2300 via a ring interconnect 2302. In some embodiments, the ring interconnect 2302 couples the graphics processor 2300 to other processing components, such as other graphics processors or general-purpose processors. Commands from the ring interconnect 2302 are interpreted by a command stream transmitter 2303, which supplies instructions to individual components of the graphics pipeline 2320 or the media pipeline 2330.
[0300] In some embodiments, the command streamer 2303 directs the operation of the vertex fetcher 2305, which reads vertex data from memory and executes vertex processing commands provided by the command streamer 2303. In some embodiments, the vertex fetcher 2305 provides the vertex data to the vertex shader 2307, which performs coordinate space transformation and lighting operations on each vertex. In some embodiments, the vertex fetcher 2305 and the vertex shader 2307 execute the vertex processing instructions by dispatching execution threads to the execution units 2352A, 2352B via the thread dispatcher 2331.
[0301] In some embodiments, execution units 2352A, 2352B are arrays of vector processors with instruction sets for performing graphics and media operations. In some embodiments, execution units 2352A, 2352B have an attached L1 cache 2351 specific for each array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or a single cache that is partitioned to contain data and instructions in different partitions.
[0302] In some embodiments, the graphics pipeline 2320 includes a tessellation component for performing hardware accelerated tessellation of 3D objects. In some embodiments, a programmable hull shader 2311 configures the tessellation operation. A programmable domain shader 2317 provides back-end evaluation of the tessellation output. The tessellation unit 2313 operates at the direction of the hull shader 2311 and contains dedicated logic for generating a set of detailed geometric objects based on a coarse geometric model that is provided as input to the graphics pipeline 2320. In some embodiments, the tessellation components 2311, 2313, 2317 can be bypassed if tessellation is not used.
[0303] In some embodiments, the complete geometric object may be processed by the geometry shader 2319 via one or more threads dispatched to the execution units 2352A, 2352B, or may proceed directly to the clipper 2329. In some embodiments, the geometry shader operates on entire geometric objects (rather than patches or vertices of vertices as in previous stages of the graphics pipeline). If tessellation is disabled, the geometry shader 2319 receives input from the vertex shader 2307. In some embodiments, if the tessellation unit is disabled, the geometry shader 2319 may be programmed by a geometry shader program to perform geometry tessellation.
[0304] Before rasterization, the clipper 2329 processes the vertex data. The clipper 2329 can be a programmable clipper or a fixed function clipper with clipping and geometry shader functions. In some embodiments, a rasterizer 2373 (e.g., a depth test component) in the render output pipeline 2370 dispatches a pixel shader to convert geometric objects into their pixel-by-pixel representations. In some embodiments, the pixel shader logic is included in the thread execution logic 2350. In some embodiments, the application can bypass the rasterizer 2373 and access the unrasterized vertex data via the stream out unit 2323.
[0305] The graphics processor 2300 has an interconnect bus, interconnect structure, or some other interconnect mechanism that allows data and messages to be passed among the main components of the processor. In some embodiments, the execution units 2352A, 2352B and associated cache(s) 2351, texture and media samplers 2354, and texture / sampler cache 2358 are interconnected via data ports 2356 to perform memory accesses and communicate with the rendering output pipeline components of the processor. In some embodiments, the samplers 2354, caches 2351, 2358, and execution units 2352A, 2352B each have separate memory access paths.
[0306] In some embodiments, the rendering output pipeline 2370 includes a rasterizer 2373 that converts vertex-based objects into associated pixel-based representations. In some embodiments, the rasterizer logic includes a windower / masker unit for performing fixed-function triangle and line rasterization. An associated rendering cache 2378 and depth cache 2379 are also available in some embodiments. The pixel operation component 2377 performs pixel-based operations on data, although in some examples, pixel operations associated with 2D operations (e.g., bitmaps are transferred using blending) are performed by the 2D engine 2341, or replaced by the display controller 2343 using overlapping display planes at display time. In some embodiments, a shared L3 cache 2375 can be used for all graphics components, allowing data to be shared without using main system memory.
[0307] In some embodiments, the graphics processor media pipeline 2330 includes a media engine 2337 and a video front end 2334. In some embodiments, the video front end 2334 receives pipeline commands from the command streamer 2303. In some embodiments, the media pipeline 2330 includes a separate command streamer. In some embodiments, the video front end 2334 processes the media commands before sending them to the media engine 2337. In some embodiments, the media engine 2337 includes thread generation functionality for generating threads for dispatching to the thread execution logic 2350 via the thread dispatcher 2331.
[0308] In some embodiments, the graphics processor 2300 includes a display engine 2340. In some embodiments, the display engine 2340 is external to the processor 2300 and is coupled to the graphics processor via the ring interconnect 2302, or some other interconnect bus or structure. In some embodiments, the display engine 2340 includes a 2D engine 2341 and a display controller 2343. In some embodiments, the display engine 2340 contains dedicated logic that can operate independently of the 3D pipeline. In some embodiments, the display controller 2343 is coupled to a display device (not shown), which can be a system-integrated display device (such as in a laptop computer), or can be an external display device attached via a display device connector.
[0309] In some embodiments, the graphics pipeline 2320 and the media pipeline 2330 can be configured to perform operations based on multiple graphics and media programming interfaces, and are not specific to any one application programming interface (API). In some embodiments, the driver software for the graphics processor converts API calls specific to a specific graphics or media library into commands that can be processed by the graphics processor. In some embodiments, support is provided for the Open Graphics Library (OpenGL) and Open Computing Language (OpenCL) from the Khronos Group, the Direct3D library from Microsoft Corporation, or support can be provided for both OpenGL and D3D. Support can also be provided for the open source computer vision library (OpenCV). If a mapping from the pipeline of a future API to the pipeline of a graphics processor can be performed, a future API with a compatible 3D pipeline will also be supported.
[0310] Graphics Pipeline Programming
[0311] Fig.24A is a block diagram of a graphics processor command format 2400 according to some embodiments. Fig. 24B is a block diagram of a graphics processor command sequence 2410 according to an embodiment. Fig.24A The solid-line boxes in show components that are generally included in the graphics command, while the dashed lines include components that are optional or included only in a subset of the graphics commands. Fig.24A The exemplary graphics processor command format 2400 includes a data field for identifying the target client 2402 of the command, a command operation code (opcode) 2404, and associated data for the command 2406. In some commands, a sub-opcode 2405 and a command size 2408 are also included.
[0312] In some embodiments, client 2402 specifies a client unit of a graphics device that processes command data. In some embodiments, a graphics processor command parser checks the client field of each command to adjust further processing of the command and routes the command data to an appropriate client unit. In some embodiments, a graphics processor client unit includes a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline for processing commands. Once a command is received by a client unit, the client unit reads an opcode 2404 and (if present) a sub-opcode 2405 to determine the operation to be performed. The client unit uses the information in data field 2406 to execute the command. For some commands, an explicit command size 2408 is expected to specify the size of the command. In some embodiments, the command parser automatically determines the size of at least some of the commands in the command based on the command opcode. In some embodiments, the commands are aligned via multiples of a double word length.
[0313] Fig. 24B An exemplary graphics processor command sequence 2410 is shown in the flowchart in FIG. 2410. In some embodiments, software or firmware of a data processing system featuring an embodiment of a graphics processor uses a version of the command sequence shown to set up, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for exemplary purposes only, as embodiments are not limited to these particular commands or this command sequence. In addition, the commands may be issued as a batch of commands in a command sequence so that the graphics processor will process the sequence of commands at least partially simultaneously.
[0314] In some embodiments, the graphics processor command sequence 2410 may begin with a pipeline dump clear command 2412 to cause any active graphics pipeline to complete the current pending commands of the pipeline. In some embodiments, the 3D pipeline 2422 and the media pipeline 2424 do not operate simultaneously. The pipeline dump clear is performed to cause the active graphics pipeline to complete any pending commands. In response to the pipeline dump clear, the command parser for the graphics processor will suspend command processing until the active drawing engine completes the pending operation and the related read cache is invalid. Optionally, any data marked as 'dirty' in the rendering cache can be dumped and cleared to memory. In some embodiments, the pipeline dump clear command 2412 can be used for pipeline synchronization or before the graphics processor is placed in a low power state.
[0315] In some embodiments, when a command sequence requires the graphics processor to explicitly switch between pipelines, pipeline select command 2413 is used. In some embodiments, pipeline select command 2413 is required only once within an execution context before issuing pipeline commands unless the context is to issue commands for both pipelines. In some embodiments, pipeline flush command 2412 is required immediately prior to a pipeline switch via pipeline select command 2413.
[0316] In some embodiments, pipeline control commands 2414 configure the graphics pipeline for operation and are used to program 3D pipeline 2422 and media pipeline 2424. In some embodiments, pipeline control commands 2414 configure the pipeline state for the active pipeline. In one embodiment, pipeline control commands 2414 are used for pipeline synchronization and for clearing data from one or more cache memories within the active pipeline before processing a batch of commands.
[0317] In some embodiments, a set of return buffers for the corresponding pipeline to write data is configured using return buffer state commands 2416. Some pipeline operations require the allocation, selection, or configuration of one or more return buffers into which the operation writes intermediate data during processing. In some embodiments, the graphics processor also uses one or more return buffers to store output data and perform cross-thread communication. In some embodiments, return buffer state 2416 includes selecting the size and number of return buffers to use for a set of pipeline operations.
[0318] The remaining commands in the command sequence differ based on the active pipeline for operation. Based on pipeline determination 2420 , the command sequence is tailored for either 3D pipeline 2422 , which starts with 3D pipeline state 2430 , or media pipeline 2424 , which starts with media pipeline state 2440 .
[0319] The commands for 3D pipeline state 2430 include 3D state setting commands for the following: vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables that will be configured before processing 3D primitive commands. The values of these commands are determined at least in part based on the specific 3D API in use. In some embodiments, the 3D pipeline state 2430 commands can also selectively disable or bypass certain pipeline elements (if those elements will not be used).
[0320] In some embodiments, 3D primitives 2432 commands are used to submit 3D primitives to be processed by the 3D pipeline. The commands and associated parameters passed to the graphics processor via the 3D primitives 2432 are forwarded to the vertex acquisition function in the graphics pipeline. The vertex acquisition function uses the 3D primitives 2432 command data to generate a vertex data structure. The vertex data structure is stored in one or more return buffers. In some embodiments, 3D primitives 2432 commands are used to perform vertex operations on the 3D primitives via vertex shaders. In order to process vertex shaders, the 3D pipeline 2422 dispatches the shader execution thread to the graphics processor execution unit.
[0321] In some embodiments, the 3D pipeline 2422 is triggered via an execution 2434 command or event. In some embodiments, a register write triggers the command execution. In some embodiments, the execution is triggered via a 'go' or 'kick' command in a command sequence. In one embodiment, the command execution is triggered using a pipeline synchronization command to dump and clear the command sequence through the graphics pipeline. The 3D pipeline will perform geometry processing for 3D primitives. Once the operation is completed, the resulting geometric object is rasterized and the pixel engine colors the resulting pixels. Additional commands for controlling pixel shading and pixel backend operations may also be included for those operations.
[0322] In some embodiments, when performing media operations, the graphics processor command sequence 2410 follows the media pipeline 2424 path. Generally, the specific use and manner of programming for the media pipeline 2424 depends on the media or computing operation to be performed. During media decoding, specific media decoding operations can be offloaded to the media pipeline. In some embodiments, the media pipeline can also be bypassed and media decoding can be performed in whole or in part (using resources provided by one or more general processing cores). In one embodiment, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operations, wherein the graphics processor is used to perform SIMD vector operations using compute shader programs that do not explicitly involve the rendering of graphics primitives.
[0323] In some embodiments, the media pipeline 2424 is configured in a similar manner to the 3D pipeline 2422. A set of media pipeline state commands 2440 are dispatched or placed into a command queue before the media object commands 2442. In some embodiments, the media pipeline state commands 2440 include data for configuring the media pipeline elements that will be used to process the media objects. This includes data (such as encoding or decoding formats) for configuring the video decoding and video encoding logic within the media pipeline. In some embodiments, the media pipeline state commands 2440 also support the use of one or more pointers to an "indirect" state element that contains a batch of state settings.
[0324] In some embodiments, media object commands 2442 supply pointers to media objects for processing by the media pipeline. The media object includes a memory buffer containing video data to be processed. In some embodiments, all media pipeline states must be valid before issuing media object commands 2442. Once the pipeline states are configured and media object commands 2442 are queued, the media pipeline 2424 is triggered via an execute command 2444 or an equivalent execution event (e.g., a register write). The output from the media pipeline 2424 can then be post-processed by operations provided by the 3D pipeline 2422 or the media pipeline 2424. In some embodiments, GPGPU operations are configured and executed in a manner similar to media operations.
[0325] Graphics software architecture
[0326] Fig.25 An exemplary graphics software architecture for data processing system 2500 is shown in accordance with some embodiments. In some embodiments, the software architecture includes 3D graphics application 2510, operating system 2520, and at least one processor 2530. In some embodiments, processor 2530 includes graphics processor 2532 and one or more general purpose processor cores 2534. Graphics application 2510 and operating system 2520 are each executed in system memory 2550 of the data processing system.
[0327] In some embodiments, the 3D graphics application 2510 includes one or more shader programs, which include shader instructions 2512. The shader language instructions can be in a high-level shader language, such as a high-level shader language (HLSL) or an OpenGL shader language (GLSL). The application also includes executable instructions 2514 in a machine language suitable for execution by a general-purpose processor core 2534. The application also includes graphics objects 2516 defined by vertex data.
[0328] In some embodiments, the operating system 2520 is a Microsoft® Windows® operating system, a proprietary UNIX-like operating system, or an open source UNIX-like operating system (using a variant of the Linux kernel) from Microsoft Corporation. When the Direct3D API is in use, the operating system 2520 uses a front-end shader compiler 2524 to compile any shader instructions 2512 in HLSL into a lower-level shader language. The compilation can be a just-in-time (JIT) compilation, or the application can execute shader pre-compilation. In some embodiments, during the compilation of the 3D graphics application 2510, high-level shaders are compiled into low-level shaders.
[0329] In some embodiments, the user mode graphics driver 2526 includes a backend shader compiler 2527 for converting shader instructions 2512 into hardware specific representations. When the OpenGL API is in use, the shader instructions 2512 in the GLSL high level language are passed to the user mode graphics driver 2526 for compilation. In some embodiments, the user mode graphics driver 2526 uses the operating system kernel mode function 2528 to communicate with the kernel mode graphics driver 2529. In some embodiments, the kernel mode graphics driver 2529 communicates with the graphics processor 2532 to dispatch commands and instructions.
[0330] IP Core Implementation
[0331] One or more aspects of at least one embodiment may be implemented by representative code stored on a machine-readable medium, which represents and / or defines logic within an integrated circuit such as a processor. For example, a machine-readable medium may include instructions representing various logic within a processor. When read by a machine, the instructions may cause the machine to make logic for performing the techniques described herein. Such representations (referred to as "IP cores") are reusable units of logic for an integrated circuit that may be stored on a tangible machine-readable medium as a hardware model describing the structure of the integrated circuit. The hardware model may be supplied to various consumers or manufacturing facilities, which load the hardware model on a manufacturing machine that manufactures the integrated circuit. The integrated circuit may be manufactured so that the circuit performs the operations described in association with any embodiment described herein.
[0332] Fig.26 26 is a block diagram showing an IP core development system 2600 according to an embodiment, which can be used to manufacture an integrated circuit to perform an operation. The IP core development system 2600 can be used to generate a modular, reusable design that can be incorporated into a larger design or used to build an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 2630 can generate a software simulation 2610 of the IP core design using a high-level programming language (e.g., C / C++). The software simulation 2610 can be used to design, test, and verify the behavior of the IP core. A register transfer level (RTL) design can then be created or synthesized from the simulation model 2600. The RTL design 2615 is an abstraction of the behavior of an integrated circuit (including associated logic executed using the modeled digital signals) that models the flow of digital signals between hardware registers. In addition to the RTL design 2615, a lower-level design at the logic level or transistor level can also be created, designed, or synthesized. Therefore, the specific details of the initial design and simulation can vary.
[0333] The RTL design 2615 or equivalent may be further synthesized by the design facility into a hardware model 2620, which may be in a hardware description language (HDL) or some other representation of physical design data. The HDL may be further simulated or tested to verify the IP core design. The IP core design may be stored using a non-volatile memory 2640 (e.g., a hard disk, a flash memory, or any non-volatile storage medium) for delivery to a third-party fabrication facility 2665. Alternatively, the IP core design may be transmitted (e.g., via the Internet) via a wired connection 2650 or a wireless connection 2660. The fabrication facility 2665 may then fabricate an integrated circuit based at least in part on the IP core design. The fabricated integrated circuit may be configured to perform operations in accordance with at least one embodiment described herein.
[0334] Fig. 27 2700, which can be fabricated using one or more IP cores. The exemplary integrated circuit includes one or more application processors 2705 (e.g., CPUs), at least one graphics processor 2710, and may additionally include an image processor 2715 and / or a video processor 2720, any of which may be modular IP cores from the same or multiple different design facilities. The integrated circuit includes peripheral or bus logic, which includes a USB controller 2725, a UART controller 2730, an SPI / SDIO controller 2735, an I 2 S / I 2 C controller 2740. In addition, the integrated circuit may include a display device 2745, which is coupled to one or more of a high-definition multimedia interface (HDMI) controller 2750 and a mobile industry processor interface (MIPI) display interface 2755. Storage may be provided by a flash memory subsystem 2760 (including flash memory and a flash memory controller). A memory interface may be provided via a memory controller 2765 for accessing SDRAM or SRAM memory devices. Some integrated circuits additionally include an embedded security engine 2770.
[0335] Additionally, other logic and circuitry may be included in the processor of integrated circuit 2700, including additional graphics processors / cores, peripheral interface controllers, or general purpose processor cores.
[0336] This disclosure / application provides the following technical solutions:
[0337] 1. An electronic processing system comprising:
[0338] Application processor;
[0339] a persistent storage medium communicatively coupled to the application processor;
[0340] a graphics subsystem communicatively coupled to the application processor;
[0341] a draw call reorderer communicatively coupled to the application processor and the graphics subsystem for reordering two or more draw calls;
[0342] a workload resequencer communicatively coupled to the application processor and the graphics subsystem for resequencing two or more work items in a sequential independent mode;
[0343] A queue primitive included in at least one of the two or more draw calls, defining a producer phase and a consumer phase; and
[0344] A sequential independent executor is communicatively coupled to the application processor and the graphics subsystem for providing tile-based sequential independent execution of computation stages.
[0345] 2. The system of technical solution 1, wherein the drawing call reorderer comprises:
[0346] A sequence dependency analyzer is configured to determine sequence dependencies between the two or more draw calls, wherein the draw call reorderer is further configured to reorder the two or more draw calls based on the determined sequence dependencies.
[0347] 3. The system of technical solution 1, wherein the workload resequencer comprises:
[0348] A workload analyzer is configured to determine a work split for the two or more work items, wherein the workload resequencer is further configured to resequence the two or more work items based on the determined work split.
[0349] 4. The system according to technical solution 1 further comprises:
[0350] A scheduler is used to alternately execute the producer phase and the consumer phase according to the queue primitive.
[0351] 5. A system as described in technical solution 1, wherein the sequential independent actuator comprises:
[0352] Computation context;
[0353] The rendering context; and
[0354] A work scheduler is provided for asynchronously dispatching work to the rendering context and the compute context on a tile basis.
[0355] 6. A graphics device comprising:
[0356] a sequential dependency analyzer for determining sequential dependencies between two or more draw calls; and
[0357] A draw call reorderer, communicatively coupled to the order dependency analyzer, is configured to reorder the two or more draw calls based on the determined order dependency.
[0358] 7. The apparatus as described in technical solution 6, wherein the sequential dependency analyzer is further used to determine resource requirements and data address ranges for the two or more drawing calls.
[0359] 8. The apparatus of technical solution 6, wherein the draw call reorderer is further configured to reorder the two or more draw calls to increase utilization of parallel execution.
[0360] 9. The apparatus of technical solution 9, wherein the draw call reorderer is further configured to determine that data dependencies are not violated when the two or more draw calls are reordered.
[0361] 10. The device according to technical solution 6 further comprises:
[0362] A workload resequencer, communicatively coupled to the sequence dependency analyzer, is configured to resequence two or more work items in a sequence independence mode.
[0363] 11. The device according to technical solution 6 further comprises:
[0364] A queue primitive included in at least one of the two or more draw calls is used to define a producer phase and a consumer phase.
[0365] 12. The device according to technical solution 6 further comprises:
[0366] A sequence-independent executor, communicatively coupled to the sequence-dependency analyzer, is configured to provide tile-based sequence-independent execution of computation stages.
[0367] 13. A method for reordering drawing calls, comprising:
[0368] determining sequential dependencies between two or more draw calls; and
[0369] The two or more draw calls are reordered based on the determined sequential dependency.
[0370] 14. The method according to technical solution 13 further comprises:
[0371] Resource requirements and data address ranges for the two or more draw calls are determined.
[0372] 15. The method according to technical solution 13 further comprises:
[0373] The two or more draw calls are reordered to increase utilization of parallel execution.
[0374] 16. The method according to technical solution 15 further comprises:
[0375] It is determined that data dependencies are not violated when the two or more draw calls are reordered.
[0376] 17. The method according to technical solution 13 further comprises:
[0377] Use sequential independent mode to reorder two or more work items.
[0378] 18. The method according to technical solution 13 further comprises:
[0379] The producer and consumer phases are defined by the queue primitive.
[0380] 19. The method according to technical solution 13 further comprises:
[0381] Provides tile-based, sequential, independent execution of computation stages.
[0382] 20. At least one computer readable medium comprising a set of instructions which, when executed by a computing device, cause the computing device to:
[0383] determining sequential dependencies between two or more draw calls; and
[0384] The two or more draw calls are reordered based on the determined sequential dependency.
[0385] 21. The at least one computer-readable medium of technical solution 20 comprises another set of instructions, which when executed by a computing device, causes the computing device to:
[0386] Resource requirements and data address ranges for the two or more draw calls are determined.
[0387] 22. The at least one computer-readable medium of technical solution 20 comprises another set of instructions, which when executed by a computing device, causes the computing device to:
[0388] The two or more draw calls are reordered to increase utilization of parallel execution.
[0389] 23. The at least one computer-readable medium of technical solution 22 comprises another set of instructions, which when executed by a computing device, causes the computing device to:
[0390] It is determined that data dependencies are not violated when the two or more draw calls are reordered.
[0391] 24. The at least one computer-readable medium of technical solution 20 comprises another set of instructions, which when executed by a computing device causes the computing device to:
[0392] Use sequential independent mode to reorder two or more work items.
[0393] 25. The at least one computer-readable medium of technical solution 20 comprises another set of instructions, which when executed by a computing device causes the computing device to:
[0394] The producer and consumer phases are defined by the queue primitive.
[0395] Advantageously, any of the above systems, processors, graphics processors, devices, and / or methods may be integrated with or configured with any of the various embodiments described herein (e.g., or portions thereof), including, for example, those described in the following additional notes and examples.
[0396] Additional Notes and Examples
[0397] Example 1 may include an electronic processing system including an application processor, a persistent storage medium communicatively coupled to the application processor, a graphics subsystem communicatively coupled to the application processor, a draw call resequencer communicatively coupled to the application processor and the graphics subsystem to reorder two or more draw calls, a workload resequencer communicatively coupled to the application processor and the graphics subsystem to reorder two or more work items in a sequential independent mode, a queue primitive included in at least one of the two or more draw calls to define a producer phase and a consumer phase, and a sequence independent executor communicatively coupled to the application processor and the graphics subsystem to provide tile-based sequential independent execution of compute phases.
[0398] Example 2 may include the system of Example 1, wherein the draw call reorderer includes an order dependency analyzer to determine an order dependency between the two or more draw calls, wherein the draw call reorderer further reorders the two or more draw calls based on the determined order dependency.
[0399] Example 3 may include the system of any of Examples 1 to 2, wherein the workload resequencer includes a workload analyzer for determining a work split for the two or more work items, wherein the workload resequencer further resequences the two or more work items based on the determined work split.
[0400] Example 4 may include the system of any one of Examples 1 to 3, further comprising a scheduler for alternating execution of the producer phase and the consumer phase according to the queue primitives.
[0401] Example 5 may include the system of any of Examples 1 to 4, wherein the sequential independent executor includes a compute context, a rendering context, and a work scheduler for asynchronously dispatching work to the rendering context and the compute context on a tile basis.
[0402] Example 6 may include a graphics device including an order dependency analyzer to determine an order dependency between two or more draw calls, and a draw call reorderer communicatively coupled to the order dependency analyzer to reorder the two or more draw calls based on the determined order dependency.
[0403] Example 7 may include the apparatus of Example 6, wherein the sequential dependency analyzer is further to determine resource requirements and data address ranges for the two or more draw calls.
[0404] Example 8 may include the apparatus of Example 6, wherein the draw call reorderer is further to reorder the two or more draw calls to increase utilization of parallel execution.
[0405] Example 9 may include the apparatus of Example 9, wherein the draw call reorderer is further to determine that data dependencies are not violated when the two or more draw calls are reordered.
[0406] Example 10 may include the apparatus of any of Examples 6 to 9, further comprising a workload resequencer communicatively coupled to the sequence dependency analyzer to resequence the two or more work items in a sequence independence mode.
[0407] Example 11 may include the apparatus of any of Examples 6 to 9, further comprising a queue primitive included in at least one of the two or more draw calls to define a producer phase and a consumer phase.
[0408] Example 12 may include the apparatus of any of Examples 6 to 9, further comprising a sequence-independent executor communicatively coupled to the sequence dependency analyzer to provide tile-based sequence-independent execution of the computation phases.
[0409] Example 13 may include a method of reordering draw calls, comprising determining an order dependency between two or more draw calls, and reordering the two or more draw calls based on the determined order dependency.
[0410] Example 14 may include the method of Example 13, further comprising determining resource requirements and data address ranges for the two or more draw calls.
[0411] Example 15 may include the method of Example 13, further comprising reordering the two or more draw calls to increase utilization of parallel execution.
[0412] Example 16 may include the method of Example 15, further comprising determining that data dependencies are not violated when the two or more draw calls are reordered.
[0413] Example 17 may include the method of any of Examples 13 to 16, further comprising reordering the two or more work items in a sequential independent mode.
[0414] Example 18 may include the method of any one of Examples 13 to 16, further comprising defining a producer phase and a consumer phase by a queue primitive.
[0415] Example 19 may include the method of any one of Examples 13 to 16, further comprising providing tile-based sequential independent execution of the computation stages.
[0416] Example 20 may include at least one computer-readable medium including a set of instructions that, when executed by a computing device, cause the computing device to determine an order dependency between two or more draw calls and reorder the two or more draw calls based on the determined order dependency.
[0417] Example 21 may include the at least one computer-readable medium of Example 20, comprising another set of instructions that, when executed by a computing device, cause the computing device to determine resource requirements and data address ranges for the two or more draw calls.
[0418] Example 22 may include the at least one computer readable medium of Example 20, comprising another set of instructions that, when executed by a computing device, cause the computing device to reorder the two or more draw calls to increase utilization of parallel execution.
[0419] Example 23 may include the at least one computer-readable medium of Example 22, comprising another set of instructions that, when executed by a computing device, cause the computing device to determine that data dependencies are not violated when the two or more draw calls are reordered.
[0420] Example 24 may include the at least one computer readable medium of any of Examples 20 to 23, comprising another set of instructions that, when executed by a computing device, cause the computing device to employ a sequential independent mode to reorder two or more work items.
[0421] Example 25 may include the at least one computer-readable medium of any one of Examples 20 to 23, comprising another set of instructions that, when executed by a computing device, cause the computing device to define a producer phase and a consumer phase via a queue primitive.
[0422] Example 26 may include the at least one computer readable medium of any one of Examples 20 to 23, comprising another set of instructions that, when executed by a computing device, cause the computing device to provide tile-based sequential independent execution of computation phases.
[0423] Example 27 may include a graphics device including a component for determining an order dependency between two or more draw calls, and a component for reordering the two or more draw calls based on the determined order dependency.
[0424] Example 28 may include the apparatus of Example 27, further comprising a component for determining resource requirements and data address ranges for the two or more draw calls.
[0425] Example 29 may include the apparatus of Example 27, further comprising a component for reordering the two or more draw calls to increase utilization of parallel execution.
[0426] Example 30 may include the apparatus of Example 29, further comprising a component for determining that data dependencies are not violated when the two or more draw calls are reordered.
[0427] Example 31 may include the apparatus of any of Examples 27 to 30, further comprising a component for reordering two or more work items in a sequential independent mode.
[0428] Example 32 may include the apparatus of any one of Examples 27 to 30, further comprising a component for defining a producer phase and a consumer phase by a queue primitive.
[0429] Example 33 may include the apparatus of any one of Examples 27 to 30, further comprising a component for providing tile-based sequential independent execution of computation stages.
[0430] Example 34 may include a graphics device comprising: a workload analyzer for determining a work split for two or more work items using a sequential independence mode; and a workload resequencer communicatively coupled to the workload analyzer to resequence the two or more work items based on the work split determined using the sequential independence mode.
[0431] Example 35 may include the device of Example 34, wherein the sequential independent mode is set by an application.
[0432] Example 36 may include the apparatus of Example 34, wherein the workload resequencer is further for reordering the two or more work items to increase utilization of the graphics processor.
[0433] Example 37 may include the apparatus of any one of Examples 34 to 36, wherein the two or more work items include graphics primitives.
[0434] Example 38 may include the apparatus of any one of Examples 34 to 36, further comprising a queue primitive included in at least one of the two or more work items to define a producer phase and a consumer phase.
[0435] Example 39 may include the apparatus of any of Examples 34 to 36, further comprising a sequential independent executor communicatively coupled to the workload analyzer to provide tile-based sequential independent execution of the computation phases.
[0436] Example 40 may include a method of reordering work items, comprising determining a work split for two or more work items employing a sequential independence pattern, and reordering the two or more work items based on the work split determined employing the sequential independence pattern.
[0437] Example 41 may include the method of Example 40, further comprising setting, by the application, a sequential independent mode.
[0438] Example 42 may include the method of Example 40, further comprising reordering the two or more work items to increase utilization of the graphics processor.
[0439] Example 43 may include the method of any one of Examples 40 to 42, wherein the two or more work items include graphics primitives.
[0440] Example 44 may include the method of any one of Examples 40 to 42, further comprising defining a producer phase and a consumer phase by a queue primitive.
[0441] Example 45 may include the method of any one of Examples 40 to 42, further comprising providing tile-based sequential independent execution of computation stages.
[0442] Example 46 may include at least one computer-readable medium, which includes a set of instructions that, when executed by a computing device, cause the computing device to adopt a sequential independence mode to determine a work split for two or more work items, and reorder the two or more work items based on the work split determined using the sequential independence mode.
[0443] Example 47 may include the at least one computer-readable medium of Example 46, comprising another set of instructions that, when executed by a computing device, cause the computing device to set, by an application, a sequential independent mode.
[0444] Example 48 may include the at least one computer readable medium of Example 46, comprising another set of instructions that, when executed by a computing device, cause the computing device to reorder the two or more work items to increase utilization of the graphics processor.
[0445] Example 49 may include the at least one computer readable medium of any one of Examples 46 to 48, wherein the two or more work items include graphics primitives.
[0446] Example 50 may include at least one computer-readable medium of any one of Examples 46 to 48, comprising another set of instructions that, when executed by a computing device, cause the computing device to define a producer phase and a consumer phase via a queue primitive.
[0447] Example 51 may include the at least one computer readable medium of any one of Examples 46 to 48, comprising another set of instructions that, when executed by a computing device, cause the computing device to provide tile-based sequential independent execution of computation phases.
[0448] Example 52 may include a graphics device including a component for determining a work split for two or more work items in a sequential independent mode, and a component for reordering the two or more work items based on the work split determined in the sequential independent mode.
[0449] Example 53 may include the apparatus of Example 52, further comprising a component for setting the sequential independent mode by an application.
[0450] Example 54 may include the apparatus of Example 52, further comprising means for reordering the two or more work items to increase utilization of the graphics processor.
[0451] Example 55 may include the apparatus of any one of Examples 52 to 54, wherein the two or more work items include graphics primitives.
[0452] Example 56 may include the apparatus of any one of Examples 52 to 54, further comprising a component for defining a producer phase and a consumer phase by a queue primitive.
[0453] Example 57 may include the apparatus of any one of Examples 52 to 54, further comprising a component for providing tile-based sequential independent execution of computation stages.
[0454] Example 58 may include a graphics device including a queue primitive for defining a producer phase and a consumer phase, and a scheduler for alternately executing the producer phase and the consumer phase according to the queue primitive.
[0455] Example 59 may include the apparatus of Example 58, wherein the queue primitive is further for defining a producer and consumer relationship between the first dispatch call and the second dispatch call and one of the draw calls.
[0456] Example 60 may include the apparatus of Example 58, wherein the queue primitive is further for defining a queue for storing results of a subset of the complete draw calls.
[0457] Example 61 may include the apparatus of Example 60, wherein the scheduler is further for managing utilization of the queue.
[0458] Example 62 may include the apparatus of any of Examples 58 to 61, further comprising a sequential independent executor communicatively coupled to the scheduler to provide tile-based sequential independent execution of the computation stages.
[0459] Example 63 may include a method of processing a graphics workload, comprising defining a producer phase and a consumer phase by a queue primitive, and alternating execution of the producer phase and the consumer phase according to the queue primitive.
[0460] Example 64 may include the method of Example 63, further comprising defining, by a queue primitive, a producer and consumer relationship between the first dispatch call and the second dispatch call and one of the draw calls.
[0461] Example 65 may include the method of Example 63, further comprising defining, by a queue primitive, a queue for storing results of a subset of the complete draw call.
[0462] Example 66 may include the method of Example 65, further comprising managing utilization of the queue.
[0463] Example 67 may include the method of any one of Examples 63 to 66, further comprising providing tile-based sequential independent execution of computation stages.
[0464] Example 68 may include at least one computer-readable medium, which includes a set of instructions that, when executed by a computing device, cause the computing device to define a producer phase and a consumer phase through a queue primitive, and to alternately execute the producer phase and the consumer phase according to the queue primitive.
[0465] Example 69 may include at least one computer-readable medium of Example 68, comprising another set of instructions that, when executed by a computing device, cause the computing device to define a producer and consumer relationship between the first dispatch call and the second dispatch call and one of the draw calls by a queue primitive.
[0466] Example 70 may include the at least one computer readable medium of Example 68, comprising another set of instructions that, when executed by a computing device, cause the computing device to define, by a queue primitive, a queue for storing results of a subset of a complete draw call.
[0467] Example 71 may include the at least one computer readable medium of Example 70, comprising another set of instructions that, when executed by a computing device, cause the computing device to manage utilization of a queue.
[0468] Example 72 may include the at least one computer readable medium of any one of Examples 68 to 71, comprising another set of instructions that, when executed by a computing device, cause the computing device to provide tile-based sequential independent execution of computation phases.
[0469] Example 73 may include a graphics device including a component for defining a producer phase and a consumer phase by a queue primitive, and a component for alternately executing the producer phase and the consumer phase according to the queue primitive.
[0470] Example 74 may include the apparatus of Example 73, further comprising a component for defining a producer and consumer relationship between the first dispatch call and the second dispatch call and one of the draw calls by a queue primitive.
[0471] Example 75 may include the apparatus of Example 73, further comprising a component for defining, by a queue primitive, a queue for storing results of a subset of the complete draw call.
[0472] Example 76 may include the apparatus of Example 75, further comprising a component for managing queue utilization.
[0473] Example 77 may include the apparatus of any one of Examples 73 to 76, further comprising a component for providing tile-based sequential independent execution of computation stages.
[0474] Example 78 may include a graphics device comprising: a work scheduler for asynchronously dispatching one or more rendering tiles and one or more compute tiles on a tile basis; a renderer communicatively coupled to the work scheduler to render the one or more rendering tiles; and an executor communicatively coupled to the work scheduler to execute the one or more compute tiles.
[0475] Example 79 may include the device of Example 78, wherein the renderer is further for rendering one of the rendering tiles in parallel with executing one of the computation tiles.
[0476] Example 80 may include the device of Example 78, wherein the one or more computational tiles are identified as independent.
[0477] Example 81 may include the device of Example 78, wherein a computation tile size of the first computation tile is a subset of a rendering tile size of the first rendering tile.
[0478] Example 82 may include a method of processing a graphics workload, comprising: asynchronously dispatching one or more rendering tiles and one or more compute tiles on a tile basis, rendering the one or more rendering tiles, and executing the one or more compute tiles.
[0479] Example 83 may include the method of Example 82, further comprising rendering one of the rendering tiles in parallel with executing one of the compute tiles.
[0480] Example 84 may include the method of Example 82, further comprising identifying the one or more computational tiles as independent.
[0481] Example 85 may include the method of Example 82, wherein a computation tile size of the first computation tile is a subset of a rendering tile size of the first rendering tile.
[0482] Example 86 may include at least one computer-readable medium comprising a set of instructions that, when executed by a computing device, cause the computing device to asynchronously dispatch one or more rendering tiles and one or more computing tiles on a tile basis, render the one or more rendering tiles, and execute the one or more computing tiles.
[0483] Example 87 may include the at least one computer-readable medium of Example 86, comprising another set of instructions that, when executed by a computing device, cause the computing device to render one of the rendering tiles in parallel with executing one of the computing tiles.
[0484] Example 88 may include the at least one computer-readable medium of Example 86, comprising another set of instructions that, when executed by a computing device, cause the computing device to identify the one or more computational tiles as independent.
[0485] Example 89 may include the at least one computer-readable medium of Example 86, wherein a computation tile size of the first computation tile is a subset of a rendering tile size of the first rendering tile.
[0486] Example 90 may include a graphics device comprising a component for asynchronously dispatching one or more rendering tiles and one or more compute tiles on a tile basis, a component for rendering the one or more rendering tiles, and a component for executing the one or more compute tiles.
[0487] Example 91 may include the apparatus of Example 90, further comprising a component for rendering one of the rendering tiles in parallel with executing one of the computation tiles.
[0488] Example 92 may include the apparatus of Example 90, further comprising a component for identifying the one or more computational tiles as independent.
[0489] Example 93 may include the device of Example 90, wherein a computation tile size of the first computation tile is a subset of a rendering tile size of the first rendering tile.
[0490] Embodiments are applicable to use with all types of semiconductor integrated circuit ("IC") chips. Examples of these IC chips include, but are not limited to, processors, controllers, chipset components, programmable logic arrays (PLA), memory chips, network chips, systems on chips (SoC), SSD / NAND controller ASICs, and the like. In addition, in some drawings, signal conductors are represented by lines. Some may be different to indicate more component signal paths, have number labels to indicate multiple component signal paths, and / or have arrows at one or more ends to indicate the main information flow direction. However, this should not be interpreted literally in a limiting manner. Instead, such added details may be used in conjunction with one or more exemplary embodiments to facilitate a simpler understanding of the circuit. Any signal line represented, whether or not there is additional information, may actually include one or more signals that can travel in multiple directions and can be implemented with any suitable type of signal scheme, for example, digital or analog lines implemented with differential pairs, optical fiber lines, and / or lines at a single end.
[0491] Example sizes / models / values / ranges may have been given, although embodiments are not limited to being the same. As manufacturing techniques (e.g., photolithography) mature over time, it is expected that smaller-sized devices can be manufactured. In addition, the well-known power / ground connections to IC chips and other components may or may not be shown in the accompanying drawings for simplicity of description and discussion, and so as not to obscure certain aspects of the embodiments. In addition, the arrangement may be shown in block diagram form in order to avoid obscuring the embodiments, and also in view of the fact that the details of the implementation relative to such block diagram arrangements are highly dependent on the platform (the embodiments are to be implemented therein), that is, such details should be fully within the knowledge of those skilled in the art. Where specific details (e.g., circuits) are set forth in order to describe example embodiments, it should be apparent to those skilled in the art that the embodiments can be practiced without or with changes in these specific details. This description is therefore considered to be illustrative rather than restrictive.
[0492] The term "coupled" may be used herein to refer to any type of direct or indirect relationship between the components in question, and may apply to electrical, mechanical, fluid, optical, electromagnetic, electromechanical or other connections. In addition, the terms "first", "second", etc. may be used herein merely to facilitate discussion, and do not carry any particular temporal or temporal order significance unless otherwise indicated. Moreover, the indefinite article "a" or "an" should be understood to carry the meaning of "one or more" or "at least one".
[0493] As used in this application and in the claims, a list of items linked by the term "one or more" may mean any combination of the listed items. For example, the phrase "one or more of A, B, or C" may mean A, B, C; A and B; A and C; B and C; or A, B, and C.
[0494] Embodiments have been described above with reference to specific embodiments. However, it will be appreciated by those skilled in the art that various modifications and changes may be made thereto without departing from the broader spirit and scope of the embodiments as set forth in the appended claims. The foregoing description and drawings are therefore considered to be illustrative rather than restrictive.
Claims
1. An electronic processing system comprising: Application processor; a persistent storage medium communicatively coupled to the application processor; a graphics subsystem communicatively coupled to the application processor; a draw call reorderer communicatively coupled to the application processor and the graphics subsystem, the draw call reorderer comprising an order dependency analyzer to determine an order dependency between two or more draw calls, wherein the draw call reorderer is further configured to reorder the two or more draw calls based on the determined order dependency; wherein the draw call reorderer is further adapted to determine that data dependencies are not violated when the two or more draw calls are reordered, and, in response to determining that data dependencies are not violated when the two or more draw calls are reordered, further adapted to schedule draw calls that use the same data address range adjacent to each other, wherein scheduling includes reordering the draw calls to ensure that a draw call that uses data produced by another draw call is sequenced directly after the other draw call.
2. The system of claim 1, further comprising: A workload resequencer is communicatively coupled to the application processor and the graphics subsystem for resequencing two or more work items in a sequential independent mode.
3. The system of claim 1 or 2, further comprising: A queue primitive included in at least one of the two or more draw calls is used to define a producer phase and a consumer phase.
4. The system of claim 1 or 2, further comprising: A sequential independent executor is communicatively coupled to the application processor and the graphics subsystem for providing tile-based sequential independent execution of computation stages.
5. The system of claim 2, wherein the workload resequencer comprises: A workload analyzer is configured to determine a work split for the two or more work items, wherein the workload resequencer is further configured to resequence the two or more work items based on the determined work split.
6. The system of claim 3, further comprising: A scheduler is used to alternately execute the producer phase and the consumer phase according to the queue primitive.
7. The system of claim 4, wherein the sequential independent executor comprises: Computation context; Rendering context; as well as A work scheduler is provided for asynchronously dispatching work to the rendering context and the compute context on a tile basis.
8. A graphics device comprising: A sequential dependency analyzer for determining sequential dependencies between two or more draw calls; as well as a draw call reorderer, communicatively coupled to the order dependency analyzer, for reordering the two or more draw calls based on the determined order dependency; wherein the draw call reorderer is further adapted to determine that data dependencies are not violated when the two or more draw calls are reordered, and, in response to determining that data dependencies are not violated when the two or more draw calls are reordered, further adapted to schedule draw calls that use the same data address range adjacent to each other, wherein scheduling includes reordering the draw calls to ensure that a draw call that uses data produced by another draw call is sequenced directly after the other draw call.
9. The apparatus of claim 8, wherein the sequential dependency analyzer is further for determining resource requirements and data address ranges for the two or more draw calls.
10. The apparatus of any one of claims 8 to 9, further comprising: A workload resequencer, communicatively coupled to the sequence dependency analyzer, is configured to resequence two or more work items in a sequence independence mode.
11. The apparatus of any one of claims 8 to 9, further comprising: A queue primitive included in at least one of the two or more draw calls is used to define a producer phase and a consumer phase.
12. The apparatus of any one of claims 8 to 9, further comprising: A sequence-independent executor, communicatively coupled to the sequence-dependency analyzer, is configured to provide tile-based sequence-independent execution of computation stages.
13. A method for reordering drawing calls, comprising: Determine sequential dependencies between two or more draw calls; as well as reordering the two or more draw calls based on the determined sequential dependency; The method further includes determining that data dependencies are not violated when the two or more draw calls are reordered, and, in response to determining that data dependencies are not violated when the two or more draw calls are reordered, scheduling draw calls that use the same data address range adjacent to each other, wherein scheduling includes reordering the draw calls to ensure that a draw call that uses data generated by another draw call is ordered directly after the other draw call.
14. The method of claim 13, further comprising: Resource requirements and data address ranges for the two or more draw calls are determined.
15. The method of any one of claims 13 to 14, further comprising: Use sequential independent mode to reorder two or more work items.
16. The method of any one of claims 13 to 14, further comprising: The producer and consumer phases are defined by the queue primitive.
17. The method of any one of claims 13 to 14, further comprising: Provides tile-based, sequential, independent execution of computation stages.
18. A graphics device comprising: A component for determining sequential dependencies between two or more draw calls; as well as components for reordering the two or more draw calls based on the determined sequential dependency; The graphics device further comprises a component for determining that data dependencies are not violated when the two or more draw calls are reordered, and, in response to determining that data dependencies are not violated when the two or more draw calls are reordered, scheduling draw calls that use the same data address range adjacent to each other, wherein scheduling includes reordering the draw calls to ensure that a draw call that uses data produced by another draw call is ordered directly after the other draw call.
19. The apparatus of claim 18, further comprising: Components for determining resource requirements and data address ranges for the two or more draw calls.
20. The apparatus of any one of claims 18 to 19, further comprising: A component used to reorder two or more work items in sequential independence mode.
21. The apparatus of any one of claims 18 to 19, further comprising: Component used to define producer and consumer stages using queue primitives.
22. The apparatus of any one of claims 18 to 19, further comprising: A component that provides tile-based, sequential, independent execution of computation stages.
23. A computer readable medium having stored thereon instructions which, when executed, cause a computing system to perform the method of any one of claims 13-17.
